lllyasviel / stable-diffusion-webui-forge

GNU Affero General Public License v3.0
7.5k stars 723 forks source link

Corrupted image when generating images larger than 1024 x 1024 using Flux models #1821

Open toyssamurai opened 6 days ago

toyssamurai commented 6 days ago

When using a Flux checkpoints (I am using the nf4 v2), Img2Img generation of images larger than 1024 x 1024 will cause image corruption -- interestingly, it's not like SD based models where I would see double head/objects, the corrupted image has a very repetitive pattern of dots. I am attaching 4 images here, each corresponding different resolution:

1) 1024 x 1024 1024

Obviously, this one looks perfectly fine.

2) 2048 x 2048 2048

This one still looks ok, but if you look carefully, you will see some vaguely visible horizontal bands across the bottom left of the image (the lower portion of the old woman's dress)

3) 3072 x 2072 3072

The horizontal bands become a checkerboard pattern. It's still not very visible (except for the bottom left of the dress)

4) 4096 x 4096 4096

Now, the checkerboard pattern becomes some semi-random dots.

While there is some corruptions to the image, judging from the image behind the artifacts, the generated image appears to have more details benefited from the higher resolution. If the corruption is fixed, I think it will be extremely helpful for high resolution image generation.

BTW, would this be caused by tiled VAE?

Juqowel commented 6 days ago

You can see more info here: #1712 and #1633

toyssamurai commented 5 days ago

You can see more info here: #1712 and #1633

Too bad, because underneath the banding, the upscale quality is actually unbelieably great.