lkwq007 / stablediffusion-infinity

Outpainting with Stable Diffusion on an infinite canvas
Apache License 2.0
3.85k stars 304 forks source link

TypeError: StableDiffusionInpaintPipeline.__call__() got an unexpected keyword argument 'strength' #161

Closed satindergrewal closed 1 year ago

satindergrewal commented 1 year ago

I'm using stablediffusion-inpainting+img2img-1.5 as option and getting the following error no matter what settings I change in UI after it's loaded with canvas and everything.

I'm unsure what to do to fix it.

Please help.

Traceback (most recent call last):
  File "/home/satinder/miniconda3/envs/sd-inf/lib/python3.10/site-packages/gradio/routes.py", line 292, in run_predict
    output = await app.blocks.process_api(
  File "/home/satinder/miniconda3/envs/sd-inf/lib/python3.10/site-packages/gradio/blocks.py", line 1007, in process_api
    result = await self.call_function(fn_index, inputs, iterator, request)
  File "/home/satinder/miniconda3/envs/sd-inf/lib/python3.10/site-packages/gradio/blocks.py", line 848, in call_function
    prediction = await anyio.to_thread.run_sync(
  File "/home/satinder/miniconda3/envs/sd-inf/lib/python3.10/site-packages/anyio/to_thread.py", line 31, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(
  File "/home/satinder/miniconda3/envs/sd-inf/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 937, in run_sync_in_worker_thread
    return await future
  File "/home/satinder/miniconda3/envs/sd-inf/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 867, in run
    result = context.run(func, *args)
  File "/home/satinder/AI/stablediffusion-infinity/app.py", line 812, in run_outpaint
    images = cur_model.run(
  File "/home/satinder/AI/stablediffusion-infinity/app.py", line 416, in run
    images = inpaint_func(
  File "/home/satinder/miniconda3/envs/sd-inf/lib/python3.10/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
    return func(*args, **kwargs)
TypeError: StableDiffusionInpaintPipeline.__call__() got an unexpected keyword argument 'strength'
Screenshot 2022-12-11 at 9 38 04 PM
Daniel-w3 commented 1 year ago

It might be a problem with the versions you are running. If you check the environment.ymal it has different versions than the ones you are running on the anaconda with the guide commands. Try this conda compare environment.yml and it will show you the differences. For some reason I can't run the automatic conda env create -f environment.yml and have to do it manually. To many files.

lkwq007 commented 1 year ago

Fixed with https://github.com/lkwq007/stablediffusion-infinity/commit/15967c10a9684e5b0b13102445464db2b7f97ac7

kernelsandirs commented 1 year ago

Thank you so much lkwq007, It works so awesome!!!