stable-diffusion-webui
stable-diffusion-webui copied to clipboard
[Bug]: "Restore faces" does not work on different stable diffusion model
Is there an existing issue for this?
- [X] I have searched the existing issues and checked the recent builds/commits
What happened?
When I use a different stable diffusion model, "restore faces" feature does not work. I generating image with: "Save a copy of image before doing face restoration" It's very easy to see the difference.
When I using the model: sd-v1-4.ckpt [7460a6fa]
everything works fine, the difference is easily visible.
But when I switch on a different model, for example, I use: anime-diffusion.ckpt [925997e9]
two absolutely identical pictures come out (they are same even by the number of bytes).
I tested with and without .vae.pt
modification, no difference.
The guess is maybe face detector cant detect the face.
I can say that this was a problem even on a very old version, without hesitation can say this one for sure: b8c38f2bbfa28904f67f0c4f9cabab4d85ebced2
Steps to reproduce the problem
- Switch Stable Diffusion checkpoint to
anime-diffusion.ckpt [925997e9]
(in my case) - Check "Restore faces" (for a quick check, with "Save a copy of image before doing face restoration" setting on)
What should have happened?
The output should be slightly different pictures, one of which has a restored face.
Commit where the problem happens
f49c08ea566385db339c6628f65c3a121033f67c
What platforms do you use to access UI ?
Windows
What browsers do you use to access the UI ?
Google Chrome
Command Line Arguments
Additional information, context and logs
Tried with argument: --use-cpu gfpgan
But got an error:
Scrolling through more than 40 similar bug reports, I found very similar bug signs, but mine is different in the last arguments:
torch.cuda.FloatTensor
and torch.FloatTensor
. Tried mess with diffenent settings (changing versions, using different versions of venv, code modification) to solve this problem, but couldn't do anything. But my goal wasnt use cpu at all, I just check it.
So, I done some a bit research, test this issue on a different machine, on a recent commit 1ef32c8b8fa3e16a1e7b287eb19d4fc943d1f2a5 and the problem stay the same.
So far I figure that .vae.pt
modification as well as different or none hypernetworks does not affect the original model: sd-v1-4.ckpt [7460a6fa]
, with different configurations, "Restore faces" works fine.
Seems like the problem puerly in different stable diffusion model, I need to check more stable diffusion models then, to see how they will work or not.
Restore faces isn't working for me on v1-4.ckpt [7460a6fa] either. It's not working in text2img, img2img or Extras. All my faces are completely scrambled right now.
I'm having the same problem. When I include Restore Faces, I get no output and this error: 'TypeError: 'NoneType' object is not subscriptable
I'm having the same problem. When I include Restore Faces, I get no output and this error: 'TypeError: 'NoneType' object is not subscriptable
Exactly this for me too
I'm having the same problem. When I include Restore Faces, I get no output and this error: 'TypeError: 'NoneType' object is not subscriptable
Did you figure out how to fix this?
I had and seemed to fix a similar issue just now (not getting a type error). Not sure if this is helpful:
I just installed from scratch on a new PC (Alienware R15) and new GPU (RTX 3090). I copied my "models" folder from my older PC (AW R11 w/ RTX 2080 TI) over to the new install to try to save time downloading. I noticed all faces were garbled despite choosing Codeformer or GFPGAN in the settings. I then tried toggling those settings, restarting, different resolutions and CFG scales and nothing worked.
I went to the Wiki troubleshooting page and followed the recommendation to "reinstall from scratch" (deleting "venv" and "repositories" folders. I also deleted all the models I had copied over except the stable diffusion ones (1.5, 2.0). I also disabled xformers (removed the cmdline option - can't be sure this made any difference).
On restarting, I am now getting perfect faces like on my old PC.
Edit: I re-enabled --xformers and it's still working OK.