ControlNet-for-Diffusers icon indicating copy to clipboard operation
ControlNet-for-Diffusers copied to clipboard

TypeError: forward() got an unexpected keyword argument

Open will-mrtr opened this issue 2 years ago • 7 comments

Continuing from an earlier issue, but has now spread to every argument.

Have been getting this error every single time, after a great deal of debugging in an effort to get this code to run. I can not figure out why this error persists, as from what Ive seen, this method is used for every single example of building an inference pipeline with Diffusers. Some help here would be greatly appreciated because something could be bugged.

Screenshot 2023-03-16 at 3 51 19 PM

will-mrtr avatar Mar 16 '23 22:03 will-mrtr

What is your pipe_control? How do you load the model? @will-mrtr

haofanwang avatar Mar 20 '23 07:03 haofanwang

The model is being loaded through huggingface hub:

Screenshot 2023-03-20 at 9 23 16 AM

will-mrtr avatar Mar 20 '23 16:03 will-mrtr

As shown in the README.md, you should use StableDiffusionControlNetInpaintPipeline. @will-mrtr

haofanwang avatar Mar 21 '23 12:03 haofanwang

Yeah I tried that too, I ran everything as you had it in the readme to begin, doesn't work. Diffusers is installed correctly, there might be something wrong with the pipelines - cant even run the pipeline script you gave without it breaking. Im probably missing something here as well, so some more help would be greatly appreciated.

Screenshot 2023-03-21 at 9 17 14 AM

will-mrtr avatar Mar 21 '23 16:03 will-mrtr

It seems that there is no such a pipeline in your env. What is your diffusers version? You should use the provided commit id when installing diffusers. @will-mrtr

Anyway, I will make this tutorial compatible to the latest diffusers soon.

haofanwang avatar Mar 22 '23 01:03 haofanwang

Awesome, thanks for all your help. I'll reinstall diffusers with the provided commit id

will-mrtr avatar Mar 22 '23 02:03 will-mrtr

Hi there @haofanwang , thanks for your assistance here, but I am still having the same problem after more troubleshooting and following the exact instructions in the README.md

How can I properly import this pipeline in the environment and also into the __init__.py files?

For whatever reason, the StableDiffusionControlNetInpaintPipeline will not import from the file. I placed the __init__.py files in the two correct paths and also installed diffusers from the correct commit id. I do not know what the problem is.

Screenshot 2023-03-22 at 3 19 15 PM

will-mrtr avatar Mar 22 '23 22:03 will-mrtr