Diffusion Models Course - Unit 3
I am testing the following notebookdiffusion-models-class/01_stable_diffusion_introduction.ipynb at main · huggingface/diffusion-models-class · GitHub, regarding the section Additional Pipelines / Inpainting, the following code: image = pipe(prompt=prompt, image=init_image, mask_image=mask_image).images[0] generates the following error " TypeError:call() got an unexpected keyword argument ‘image’" Any ideas how to fix it?
2022-12-30T17:53:55Z
Hi@royam0820! The name of theimageparameter was recently renamed, so you might need to upgrade to a newer version ofdiffusers. Could you please try to runpip install --upgrade diffusers?
2023-01-02T16:46:34Z
pcuenq:pip install --upgrade diffusersHi, first of all, Happy New Year to you and my best wishes to you.I did try your suggestion to upgrade to a newer version, but the same error is popping:image = pipe(prompt=prompt, image=init_image, mask_image=mask_image).images[0] generates the following error " TypeError:call() got an unexpected keyword argument ‘image’"
2023-01-02T17:17:30Z
Thanks a lot, and Happy New Year to you tooThat’s strange. Did you try to uninstalldiffusersfirst? If you didn’t, you can usepip uninstall -y diffusersand then issue the install command again, just to verify there’s nothing weird going on.If that doesn’t work, you can also rundiffusers-cli envand post the output here so I can try to replicate in a similar environment. Are you running the notebook on Colab or somewhere else?I hope we can sort this out
2023-01-02T17:51:51Z
pcuenq:pip install --upgrade diffusersHi! I did try to uninstall and reinstall + upgrade and I have the same error.
2023-01-02T17:56:23Z
Here is the environment infos- I am on Colabdiffusersversion: 0.11.1Platform: Linux-5.10.133±x86_64-with-glibc2.27Python version: 3.8.16PyTorch version (GPU?): 1.13.0+cu116 (True)Huggingface_hub version: 0.11.1Transformers version: 4.26.0.dev0Using GPU in script?:Using distributed or parallel set-up in script?:diffusers_error1043×528 127 KB
2023-01-02T18:52:04Z
Oh, I see the problem now! You are importingStableDiffusionInpaintPipelinebut then you are instantiating your pipeline usingStableDiffusionPipeline, which doesn’t know how to deal with input images. You need to create your in-painting pipeline like this:pipe = StableDiffusionInpaintPipeline.from_pretrained(model_id).to(device)Let me know if that works
2023-01-03T13:45:05Z
pcuenq:pipe = StableDiffusionInpaintPipeline.from_pretrained(model_id).to(device)Good catch! I have been testing multiple features and this issue stemmed from various cut and paste.  Thank you for pointing out this stupid mistake on my part and many thanks for your prompt help and support!
2023-01-03T16:55:47Z
No stupid mistake at all! It’s great that you are exploring everything, don’t hesitate to keep asking questions
2023-01-04T16:42:00Z
Thank you!