stable-diffusion icon indicating copy to clipboard operation
stable-diffusion copied to clipboard

Blue or black artifacts in many images

Open Chryseus opened this issue 2 years ago • 8 comments

When generating an image there is a high chance of the appearance of small blue or black blobs, this is mainly noticeable in simpler images such as smooth textures, however it can appear in much more complex images as well, I've noticed this using txt2img, img2img and in-painting.

I have replicated this problem 100% reliably on a number of different local installations and online generators, from other people reporting this issue it appears to effect all operating systems and GPU's, different samplers, steps, CFG, etc have practically no effect on it.

1 2 3 6 "A sheet of white paper texture"

4 Credit: u/mikenew02 - reddit

4 Credit: abesmon - github

5 Credit: hd-x - github

This creates quite a bit of additional work to correct so I'd be very happy if this could be fixed if possible.

Chryseus avatar Oct 13 '22 21:10 Chryseus

This problem appears to be related to prompt complexity and image depth, flat textures are a particular problem with the artefact appearing roughly between 40% to 90% of the time depending on the amount of detail, this makes stable diffusion very unreliable with texture generation, simple prompts also seem to be a major cause regardless of the image complexity.

Chryseus avatar Oct 15 '22 22:10 Chryseus

I just encountered this today, usually I run a quick test to make sure SD is working after a git pull and sure enough blue spots with a simple prompt like "1girl" but it seems limited to simple 1-2 word prompts such as what I provided. If you were to use a prompt like "1girl, blonde hair" then the problem seems to not happen or very rarely. So basic take away is avoid very basic prompts.

Evil-Dragon avatar Oct 19 '22 20:10 Evil-Dragon

I've had the same issues.. you all need to update to the latest VAE. Problem gone :)

Refused56 avatar Nov 23 '22 12:11 Refused56

I've had the same issues.. you all need to update to the latest VAE. Problem gone :)

I tested again with v1-5-pruned.ckpt [a9263745] with vae-ft-mse-840000-ema-pruned.ckpt [ c6a580b13a5bc05a5e16e4dbb80608ff2ec251a162311590c1f34c013d7f3dab] which is the latest as far as I'm aware. Things like landscapes appear significantly better with perhaps less than 1 in 10 having a noticeable artifact, however textures are still a big problem unfortunately.

Chryseus avatar Nov 23 '22 16:11 Chryseus

Have you followed these instructions? I recommend to configure usage for all models - how to is in the description. https://www.reddit.com/r/StableDiffusion/comments/yaknek/you_can_use_the_new_vae_on_old_models_as_well_for/

Refused56 avatar Nov 23 '22 18:11 Refused56

Have you followed these instructions? I recommend to configure usage for all models - how to is in the description. https://www.reddit.com/r/StableDiffusion/comments/yaknek/you_can_use_the_new_vae_on_old_models_as_well_for/

Yes the latest VAE is definitely being loaded. image Prompt: a sheet of white paper texture Seed: 784215236 CFG: 7

It's definitely a lot better, this took several tries to get something so bad, in most cases now it's not noticeable unless you're really looking for it, so for most practical purposes it may no longer be an issue.

Chryseus avatar Nov 23 '22 23:11 Chryseus

Great. Thanks for the follow-up and the extensive testing. Appreciated by a nerdish mind like me :)

Refused56 avatar Nov 24 '22 11:11 Refused56

im having this issue with a hypernetwork trained on huggingface 1.4 without any vae, and i've successfully mitigated it by adding "blue spot, blue dot" to my negative prompts. its hacky, but it works. my model was trained on an artstyle where this will basically never disclude proper style creation. if you wanted pictures of earth from space, maybe not great.

Ubermeisters avatar Jan 21 '23 21:01 Ubermeisters

This is definitely still an issue. I can't produce any textures without having these artifacts in them. Changing models, VAEs, samplers, steps or any other settings seems to have no effect.

image

Talkashie avatar May 12 '23 01:05 Talkashie