Remove 2px Pixel Grid Artifacts from AI Images in ComfyUI
Job to be done: Remove 2px pixel grid artifacts from images generated with specific VAEs in ComfyUI
🇳🇬 Ways to use this in Nigeria
Ideas to get you started, adapt to your situation.
- Student
Clean up AI-generated images for assignments by removing 2px grid artifacts using a ComfyUI workflow.
- 9-5 employee
Remove 2px pixel grid artifacts from AI-generated marketing visuals in ComfyUI for sharper presentation.
What you’ll get
You will get AI-generated images free from the distracting 2-pixel repeating grid pattern often left by VAEs like Qwen Image VAE or Wan 2.1 VAE. This method uses a special filter to detect and cancel out the grid, ensuring your images look cleaner and sharper, especially after applying other edits.
Tools you need
- ComfyUI (free): A powerful, visual tool that lets you build and run AI image generation workflows using nodes (blocks that perform specific tasks).
Steps
-
Download the grid removal workflow: Open the provided link in your web browser, then save the content as a JSON file on your computer.
The author provides a special ComfyUI workflow file to remove the grid.
https://pastebin.com/v7y1z0SHYou should see a page with a lot of code. Look for a “Download” or “Raw” button (often near the top right) and click it to save the file. If there isn’t one, copy all the text and paste it into a plain text editor (like Notepad on Windows or TextEdit on Mac), then save it as
remove_2px_grid.json.You should now have a file named
remove_2px_grid.jsonsaved on your device. -
Open ComfyUI: Launch the ComfyUI application on your computer.
You should see the ComfyUI interface, which is a large blank canvas where you can arrange different processing blocks (nodes).
-
Load the new workflow: Drag the
remove_2px_grid.jsonfile you just downloaded directly onto the ComfyUI canvas.A new group of nodes will appear on your canvas. These nodes represent the “notch filter” that removes the pixel grid.
-
Connect the filter into your workflow: Integrate the new filter nodes into your existing image generation setup.
In your ComfyUI workflow, find the
VAE Decodenode (this block converts compressed image data into a full image) and thePreview ImageorSave Imagenode (these show or save your final picture). Disconnect the line that goes directly fromVAE Decodeto the next image processing step. Then, connect the output of yourVAE Decodenode to the input of the first new filter node. Finally, connect the output of the last new filter node to the input of yourPreview ImageorSave Imagenode. The filter should now sit directly between your VAE decoding and your final output.Your image generation workflow now includes the grid removal filter.
-
Generate and check your images: Run your ComfyUI workflow to create an image, then inspect it closely.
Use a VAE that is known to cause the 2px grid, such as the Qwen Image VAE or Wan 2.1 VAE, to generate an image. Once the image is created, zoom in on it, ideally to 400% magnification. Compare this image to one generated without the filter (you can temporarily bypass the filter nodes or load your original workflow).
You should see that the image processed with the filter is free of the 2px pixel grid, especially when compared to an unfiltered image, which might still show the pattern.
Original source
This workflow was originally shared by Reddit user /u/Haiku-575 on July 4, 2026. They described how a special GLSL ComfyUI node could effectively remove the 2px repeating grid pattern caused by certain VAEs in AI-generated images.
Notes & variations
- Do you even need this? This specific filter is designed for a very particular problem: a 2px grid caused by Qwen Image VAE or Wan 2.1 VAE. If your images don’t show this specific grid, you likely don’t need this workflow.
- Common pitfall: The author stresses that the filter must be applied directly after the VAE decode step. If you apply it later in your workflow, it might not work correctly or could even introduce new issues.
- Tip for better results: The grid becomes more noticeable if you sharpen images. By removing the grid before sharpening, you can achieve much cleaner and sharper final images without amplifying an ugly pattern.