ahrm / UnstableFusion

A Stable Diffusion desktop frontend with inpainting, img2img and more!
GNU General Public License v3.0
1.25k stars 86 forks source link

Unexpected keyword argument when generating images #45

Closed eahenle closed 1 year ago

eahenle commented 1 year ago

I am getting the following error when attempting to generate (most recent commit, running locally, Ubuntu 22, python 3.9)

Generating with strength 0.75, steps 30, guidance_scale 7.5, seed -1
Traceback (most recent call last):
  File "/home/adrian/UnstableFusion/unstablefusion.py", line 912, in handle_generate_button
    image = self.get_handler().generate(prompt,
  File "/home/adrian/UnstableFusion/diffusionserver.py", line 117, in generate
    im = self.text2img(
  File "/home/adrian/.local/lib/python3.9/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
    return func(*args, **kwargs)
TypeError: __call__() got an unexpected keyword argument 'strength'

This looks a little bit like #3 but protobuf is already installed. Commenting out the strength=strength, on diffusionserver.py:121 removes the error and allows image generation, but obviously disables an important parameter.

ahrm commented 1 year ago

This is caused by using incompatible version of diffusers. Updated requirements.txt to specify exact diffusers version (instead of minimum).

eahenle commented 1 year ago

I found that I needed to install the exact minimum package versions listed in requirements.txt, for all packages, with two exceptions:

I also needed to specify the following additional dependency versions:

I'll make a PR to specify some of this in the README, in case you think it's worth noting.