stable-diffusion-webui
stable-diffusion-webui copied to clipboard
Better support for 2.0-inpainting and 2.0-depth special models
- Depth model works just fine after the recent pull request, but is never unloaded from vram. Make it unload when --medvram or --lowvram is enabled.
- Add support for 2.0-inpainting, with its proper yaml supplied by the user. The reason 2.0-inpainting was broken until now is because we were still hijacking LatentInpaintDiffusion and replacing it with an old version. But that hijack is totally unnecessary, the only problem that hijack solves is that 1.5-inpainting was giving an error otherwise. The correct fix for the 1.5-inpainting error is to include finetune_keys=None in the config.
This looks good for the 2.0 inpainting model with the equivalent v2-inpainting-inference.yaml
config file.
Can you provide a config file that would work for the 1.5 inpainting model? I tried using this https://github.com/runwayml/stable-diffusion/blob/main/configs/stable-diffusion/v1-inpainting-inference.yaml but all generated images look like noise.
This looks good for the 2.0 inpainting model with the equivalent
v2-inpainting-inference.yaml
config file.Can you provide a config file that would work for the 1.5 inpainting model? I tried using this https://github.com/runwayml/stable-diffusion/blob/main/configs/stable-diffusion/v1-inpainting-inference.yaml but all generated images look like noise.
So it looks like this was a pre-existing bug. If you provide the 1.5-inpainting WITHOUT any config, this repo has traditionally auto-detected it and fixed up the config for you. If you provide v1-inpainting-inference.yaml, it uses the config that you provide.
So far so good, but the problem is that v1-inpainting-inference.yaml is actually buggy. It fails to specify use_ema=False, which is absolutely required for inference (otherwise you just get noise). All the other official configs correctly specify use_ema=False.
I pushed another commit that solves this issue by setting use_ema=False always, not just in the code path that runs when you don't provide a config.
Works nice thanks, tested 2.0 and 1.5 inpainting models, both work now and it doesn't break anything
does inpaint conditioning mask strength of 1.5-inpainting model, apply to these models? There is a bug report of it working poorly: https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/5557 not sure though if it's actually broken.