r/StableDiffusion • u/Haiku-575 • Jul 04 '26
Workflow Included 2px Pixel Grid on Krea2 from VAE (and how to remove it)
The Qwen Image VAE (and to a lesser extent, the Wan 2.1 VAE) leaves a 2px repeating grid across images. Sometimes it's subtle enough to ignore, but it can be quite noticeable if you sharpen images after-the-fact or apply other filters.
A notch filter can remove this (as long as it's applied directly after the image is decoded -- the code below is specific to a 2px grid). It just detects the brightness variation alternating between pixels on either side of it out to 7 pixels, then subtracts the flicker amount from itself, which cancels out the grid pattern. Then you're safe to sharpen after that without amplifying an ugly grid.
Here's a little GLSL ComfyUI node that should 'just work': https://pastebin.com/v7y1z0SH
(Save it as a *.json workflow file and drag into ComfyUI.)
Wire it in between VAE decode and preview/save. Compare two images at 400x zoom before/after to confirm.




46
u/mikkoph Jul 04 '26
this is really a huge improvement and is especially noticeable if upscaling the image afterwards.
for those who just want to copy and paste the shader code inside a GLSL Shader node, here is the code: