stable-diffusion-webui
stable-diffusion-webui copied to clipboard
[Bug]: vae support breaks inpainting hijack?
Is there an existing issue for this?
- [X] I have searched the existing issues and checked the recent builds/commits
What happened?
When switching to inpainting model, I get the error
TypeError: DDPM.__init__() got an unexpected keyword argument 'finetune_keys'
Interrupted with signal 2 in <frame at 0x000001D197DC7E00, file 'E:\\img\\auto1112\\stable-diffusion-webui\\webui.py', line 105, code wait_on_server>
Steps to reproduce the problem
- Go to "stable diffusion checkpoint"
- Press "sd-v1-5-inpainting.ckpt"
- See error
What should have happened?
I can fix this by modifying sd_hijack_inpainting.py like so
class LatentInpaintDiffusion(LatentDiffusion):
def __init__(
self,
concat_keys=("mask", "masked_image"),
masked_image_key="masked_image",
*args,
**kwargs,
):
#remove finetune from kwargs
print('about to die')
if 'finetune_keys' in kwargs: #added these lines
del kwargs['finetune_keys'] #to fix the bug
super().__init__(*args, **kwargs)
self.masked_image_key = masked_image_key
assert self.masked_image_key in concat_keys
self.concat_keys = concat_keys
Commit where the problem happens
c418467c03db916c3e5312e6ac4a67365e196dbd
What platforms do you use to access UI ?
Windows
What browsers do you use to access the UI ?
Mozilla Firefox
Command Line Arguments
--deepdanbooru --xformers
Additional information, context and logs
No response
I can confirm that the fix also allows loading the new 2.0 inpainting model without any issues.
I can confirm that the fix also allows loading the new 2.0 inpainting model without any issues.
Can additionally confirm this fixes loading 2.0 inpainting model.
I can also confirm that this fixes the 2.0 inpainting model.
Anyone want to make a pull request?
I can also confirm that the 2.0 inpainting model now works after adding those lines.