Fix ControlNet Inpaint giving TypeError: prepare_image() missing 1 required positional argument: 'do_classifier_free_guidance'

#15
by jerostephan - opened

HuggingFace showed Connection errored out, on local I got the following error:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/gradio/routes.py", line 395, in run_predict
    output = await app.get_blocks().process_api(
  File "/usr/local/lib/python3.8/dist-packages/gradio/blocks.py", line 1193, in process_api
    result = await self.call_function(
  File "/usr/local/lib/python3.8/dist-packages/gradio/blocks.py", line 916, in call_function
    prediction = await anyio.to_thread.run_sync(
  File "/usr/local/lib/python3.8/dist-packages/anyio/to_thread.py", line 31, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(
  File "/usr/local/lib/python3.8/dist-packages/anyio/_backends/_asyncio.py", line 937, in run_sync_in_worker_thread
    return await future
  File "/usr/local/lib/python3.8/dist-packages/anyio/_backends/_asyncio.py", line 867, in run
    result = context.run(func, *args)
  File "/workspace/diffusion_webui/diffusion_models/controlnet/controlnet_inpaint/controlnet_inpaint_canny.py", line 100, in generate_image
    output = pipe(
  File "/usr/local/lib/python3.8/dist-packages/torch/utils/_contextlib.py", line 115, in decorate_context
    return func(*args, **kwargs)
  File "/workspace/diffusion_webui/diffusion_models/controlnet/controlnet_inpaint/pipeline_stable_diffusion_controlnet_inpaint.py", line 454, in __call__
    control_image = self.prepare_image(
TypeError: prepare_image() missing 1 required positional argument: 'do_classifier_free_guidance'

Fixed by changing this function call.

jerostephan changed pull request status to closed

Sign up or log in to comment