stable-diffusion-webui
stable-diffusion-webui copied to clipboard
[Bug]: initial black image on every launch, before changing settings
Is there an existing issue for this?
- [X] I have searched the existing issues and checked the recent builds/commits
What happened?
I updated my repo which was checked out a few days ago to 1a23dc3 via git pull. When generating images without changing any settings, all images are black, until some random settings are changed. Then the problem goes away.
Steps to reproduce the problem
- Check out the repo from a week ago.
- Do some work with it.
- Update to latest revision.
- Launch server.
- Generate, get only black images.
- Change model, twiddle with sampling method, CFG, iterations etc. I'm not entirely sure what does it.
- Generate again, problem went away.
- Change model and settings back, no problem anymore.
- Shutdown server, goto 4
What should have happened?
After launch, the images should be produced as normal without having to twiddle with any setting.
Commit where the problem happens
1a23dc3
What platforms do you use to access UI ?
Linux
What browsers do you use to access the UI ?
Google Chrome
Command Line Arguments
No response
Additional information, context and logs
No response
same to you, Generate a black image, or the model takes effect.
After recently updating this is happening to me as well, except changing settings doesn't help. 🤷♂️
So something overwrite config files after shutdown server?
How about trying to delete/move config.json and ui-config.json before starting (all settings default) ? I suspect the .json formatting here became messed up.
I have a similar problem, except that I either get black images or just some fuzzy colors that in no way follow the prompt. Even got some interesting geometric shapes, yet nothing even remotely related to the prompt. Sometimes I also get good images, except that they are in no way related to the prompt. I.E. I want to generate a profile picture of a person and get a house with a pool instead.
I deleted the config files, but that didn't fix it. If I however switch the model used back and forth for a while it eventually works (until models are changed again).
This seems to be related to pruned checkpoint files. I did not have this issues with unpruned ones. I tried merging a model with itself to see if that fixes the issue, but it still reliably fails. However mixing that model with an unpruned one at 0.01 strength it created a nearly identical (but bigger) model that does not have these issues.
pruned model generate black images,Unless you switch to the original model and then switch back
I have same issue whenever i need to use anything3 vae with custom models, its all looks like leftovers after NSFW filter even tho i dont prompt nsfw and it still happens , theres something left over in the code that allows this to happen
I'm also seeing this bug with junk outputs (occasionally black) with merged (pruned?) models (like Protogen Infinity). I also get the NaN error depending on what is in the prompt, so it is perhaps related (#6923). Switching to a different model and back to the desired model seems to fix it, until you start the server again.
I think this may be related to #6923, and a possible fix has been posted over there. See if making that code change in sd_models.py fixes it for you.
reporting back to say that with current revisions, this problem no longer occurs for me.