stable-diffusion-webui
stable-diffusion-webui copied to clipboard
[Bug]: Black image as result while generating picture in specific 2.0 checkpoint
Is there an existing issue for this?
- [X] I have searched the existing issues and checked the recent builds/commits
What happened?
after recent update when trying to generate pictures with fp32 2.0 custom checkpoint i am getting black images (tho it only happens with one particular checkpoint https://huggingface.co/kabachuha/gigafractal2-diffusion/
Steps to reproduce the problem
- Select checkpoint
gigafractal2-diffusionin safetensors format - Go to txt2img tab
- Press Generate
What should have happened?
in generating process and after finish non-black images should be as result
Commit where the problem happens
f8c512478568293155539f616dce26c5e4495055
What platforms do you use to access UI ?
Linux
What browsers do you use to access the UI ?
No response
Command Line Arguments
--opt-split-attention --opt-channelslast --medvram --always-batch-cond-uncond --opt-sub-quad-attention --no-half --precision full --no-half-vae
- cause my gpu is from amd so i am generating pictures w/o
xformers - also tried with default SD-2.0 checkpoint and generation process went as ti should be: pictures are normal
p.s. tried without --no-half --precision full --no-half-vae but again got black images as result
Additional information, context and logs
i've noticed that reverting 0c3feb202c5714abd50d879c1db2cd9a71ce93e3 allowing to generate normal pictures again.
removing sd_disable_initialization from
https://github.com/AUTOMATIC1111/stable-diffusion-webui/blob/0c3feb202c5714abd50d879c1db2cd9a71ce93e3/modules/sd_models.py#L16
and removing this line
https://github.com/AUTOMATIC1111/stable-diffusion-webui/blob/0c3feb202c5714abd50d879c1db2cd9a71ce93e3/modules/sd_models.py#L322
so i guess something offending is inside sd_disable_initialization.py
changing to another model and then back to the one that is causing black images also solved it for me.
@J-o-h-n-M, can you tell to which checkpoint you are switching to?
model.ckpt (so the standard SD one I think) I then created 1 image there and switched back to a .safetensors file It then worked
(the 2nd and 3rd time I just switched to model.ckpt and back (without creating anything in model.ckpt) and that also worked fine)
model.ckpt (so the standard SD one I think) I then created 1 image there and switched back to a .safetensors file It then worked
that didn't helped me
- switch to
sd-2.0-768-v-ema.safetensors - generate normal picture
- switch to
gigafractal2.safetensors - got black image
He switched to v1.4 model ckpt I guess. Try switching to model that used different version of ,yaml (in this case try any v1 models)
He switched to v1.4 model ckpt I guess. Try switching to model that used different version of ,yaml (in this case try any v1 models)
didn't helped too :O
Any VAE used? try turning it off. Long shot, try clip skip other than 1.
Any VAE used? try turning it off. Long shot, try clip skip other than 1.
no vae specified in options and no vae in command line arguements also deleted config files to regenerate them - still black images
My curiosity made me download this model and yes blacked.
But it is probably the models fault, look at this check:

thanks for your time!
curious what could possibly broke this one after https://github.com/AUTOMATIC1111/stable-diffusion-webui/commit/0c3feb202c5714abd50d879c1db2cd9a71ce93e3
because without disabling initialization model is generating normal pictures.
My curiosity made me download this model and yes blacked. But it is probably the models fault
6 AM, How about another workaround instead reverting back or modifying files? Since the model has no CLIP and a lot of BROKEN components, I merged it with SD v2 model, (0.05 Weighted Sum), and it works (Yes, I know it won't generate the same picture using the same seed etc). But it still got their style though.
Now it became:

In action:

Another test:

Sorry, I don't know how it supposed to look like and I don't know how to prompt this model (keywords etc). I'm not sleeping yet and need to drive my daughter to school LOL. Good luck.
@mclsugi, with latest master it working :D
BUT you gave me a nice idea how to avoid it next time :) lulz i love it :D
please, take care and thanks a lot for your time!!
closing this :)
My curiosity made me download this model and yes blacked. But it is probably the models fault, look at this check:
What extenstion is that? So to see the toolkit tab
What extenstion is that? So to see the toolkit tab
That's a secret toolkit for a shadowy government to inject codes for a distributed models that you can't find in extensions list tab... 😎 (joking)
Here it is: https://github.com/arenatemp/stable-diffusion-webui-model-toolkit
a fix for my problems with NaNs https://github.com/AUTOMATIC1111/stable-diffusion-webui/pull/7523