continue-revolution / sd-webui-animatediff

AnimateDiff for AUTOMATIC1111 Stable Diffusion WebUI
Other
3.1k stars 258 forks source link

[Bug]: API request error - ValueError: controlnet is enabled but no input image is given #371

Closed Sd-rep closed 7 months ago

Sd-rep commented 10 months ago

Is there an existing issue for this?

Have you read FAQ on README?

What happened?

After API request always get this error - ValueError: controlnet is enabled but no input image is given

Steps to reproduce the problem

web-ui start flags

./webui.sh --listen --api --enable-insecure-extension-access --disable-nan-check --disable-console-progressbars --skip-torch-cuda-test --no-hashing --no-gradio-queue

API request http://**.***.***.***:7860/sdapi/v1/txt2img

What should have happened?

no run API batch image processing in sd-webui-controlnet with sd-webui-animatediff

Commit where the problem happens

Ubuntu 22.04

web-ui: v1.6.1 •  python: 3.10.12  •  torch: 2.0.1+cu118  •  xformers: N/A  •  gradio: 3.41.2

extensions: sd-webui-animatediff 1.12.1

sd-webui-controlnet
v1.1.417

sd-webui-deforum https://github.com/deforum-art/sd-webui-deforum | d3b00b3c

!!! The latest versions controlnet v1.1.423 with animatediff 1.12.1 also has this bug

What browsers do you use to access the UI ?

In the web-ui interface this function works stably image

Command Line Arguments

{
      "prompt": "<lora:LCM_SD_15:1.1>",
      "negative_prompt": "(dark noise, turbid, blur, blurry, blurred, worst quality, low quality, normal quality:1.7)",
      "styles": [],
      "width": 512,
      "height": 512,
      "n_iter": 1,
      "sampler_name": "LCM",
      "steps": 12,
      "cfg_scale": 1.3,
      "refiner_checkpoint": "",
      "refiner_switch_at": 1,
      "seed": -1,
      "subseed": -1,
      "subseed_strength": 0,
      "seed_resize_from_h": -1,
      "seed_resize_from_w": -1,
      "batch_size": 1,
      "restore_faces": false,
      "tiling": false,
      "do_not_save_samples": false,
      "do_not_save_grid": false,
      "eta": 0,
      "denoising_strength": 0,
      "s_min_uncond": 0,
      "s_churn": 0,
      "s_tmax": 0,
      "s_tmin": 0,
      "s_noise": 0,
      "override_settings": {},
      "override_settings_restore_afterwards": true,
      "disable_extra_networks": false,
      "comments": {},
      "enable_hr": false,
      "firstphase_width": 0,
      "firstphase_height": 0,
      "hr_scale": 1,
      "hr_upscaler": "",
      "hr_second_pass_steps": 0,
      "hr_resize_x": 0,
      "hr_resize_y": 0,
      "hr_checkpoint_name": "",
      "hr_sampler_name": "",
      "hr_prompt": "",
      "hr_negative_prompt": "",
      "script_name": "",
      "script_args": [],
      "send_images": true,
      "save_images": false,
      "alwayson_scripts": {
          "AnimateDiff": {
            "args": [
                {
                    "model": "mm_sd_v15_v2.fp16.safetensors",
                    "format": ["MP4"],
                    "enable": true,
                    "fps": 25,
                    "loop_number": 0,
                    "closed_loop": "N",
                    "batch_size": 16,
                    "stride": 1,
                    "overlap": -1,
                    "interp": "FILM",
                    "interp_x": 3,                    
                    "video_path": "anim",
                    "latent_power": 1,
                    "latent_scale": 32,
                    "last_frame": null,
                    "latent_power_last": 1,
                    "latent_scale_last": 32,
                    "request_id": ""
                }
            ]
        },
        "controlnet": {
            "args": [       
                {
                    "module": "openpose_full",
                    "model": "control_v11p_sd15_openpose [cab727d4]",
                    "resize_mode": "Envelope (Outer Fit)",
                    "control_mode": "Balanced",
                    "processor_res": 512
                }
            ]
        }
    }
}

Console logs

023-12-17 20:58:59,209 - AnimateDiff - INFO - AnimateDiff process start.
2023-12-17 20:58:59,221 - AnimateDiff - INFO - Injecting motion module mm_sd_v15_v2.fp16.safetensors into SD1.5 UNet middle block.
2023-12-17 20:58:59,221 - AnimateDiff - INFO - Injecting motion module mm_sd_v15_v2.fp16.safetensors into SD1.5 UNet input blocks.
2023-12-17 20:58:59,222 - AnimateDiff - INFO - Injecting motion module mm_sd_v15_v2.fp16.safetensors into SD1.5 UNet output blocks.
2023-12-17 20:58:59,222 - AnimateDiff - INFO - Setting DDIM alpha.
2023-12-17 20:58:59,225 - AnimateDiff - INFO - Injection finished.
2023-12-17 20:58:59,225 - AnimateDiff - INFO - Hacking LoRA module to support motion LoRA
2023-12-17 20:58:59,226 - AnimateDiff - INFO - Hacking CFGDenoiser forward function.
2023-12-17 20:58:59,226 - AnimateDiff - INFO - Hacking ControlNet.
2023-12-17 20:58:59,503 - ControlNet - INFO - Loading model: control_v11p_sd15_openpose [cab727d4]
2023-12-17 20:59:00,181 - ControlNet - INFO - Loaded state_dict from [/home/g4you_app_dev/stable-diffusion-webui/models/ControlNet/control_v11p_sd15_openpose.pth]
2023-12-17 20:59:00,181 - ControlNet - INFO - controlnet_default_config
2023-12-17 20:59:04,297 - ControlNet - INFO - ControlNet model control_v11p_sd15_openpose [cab727d4] loaded.
*** Error running before_process_batch: /home/g4you_app_dev/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/controlnet.py
    Traceback (most recent call last):
      File "/home/g4you_app_dev/stable-diffusion-webui/modules/scripts.py", line 627, in before_process_batch
        script.before_process_batch(p, *script_args, **kwargs)
      File "/home/g4you_app_dev/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/controlnet.py", line 991, in before_process_batch
        self.controlnet_hack(p)
      File "/home/g4you_app_dev/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/controlnet.py", line 970, in controlnet_hack
        self.controlnet_main_entry(p)
      File "/home/g4you_app_dev/stable-diffusion-webui/extensions/sd-webui-animatediff/scripts/animatediff_cn.py", line 266, in hacked_main_entry
        input_image, image_from_a1111 = cn_script.choose_input_image(p, unit, idx)
      File "/home/g4you_app_dev/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/controlnet.py", line 608, in choose_input_image
        raise ValueError('controlnet is enabled but no input image is given')
    ValueError: controlnet is enabled but no input image is given

---
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 12/12 [00:45<00:00,  3.80s/it]
2023-12-17 20:59:52,921 - AnimateDiff - INFO - Restoring ControlNet.
2023-12-17 20:59:52,922 - AnimateDiff - INFO - Restoring CFGDenoiser forward function.
2023-12-17 20:59:52,922 - AnimateDiff - INFO - Restoring hacked LoRA
2023-12-17 20:59:52,922 - AnimateDiff - INFO - Restoring DDIM alpha.
2023-12-17 20:59:52,922 - AnimateDiff - INFO - Removing motion module from SD1.5 UNet input blocks.
2023-12-17 20:59:52,922 - AnimateDiff - INFO - Removing motion module from SD1.5 UNet output blocks.
2023-12-17 20:59:52,923 - AnimateDiff - INFO - Removing motion module from SD1.5 UNet middle block.
2023-12-17 20:59:52,923 - AnimateDiff - INFO - Removal finished.
2023-12-17 20:59:52,923 - AnimateDiff - INFO - Merging images into GIF.
Total frames to FILM-interpolate: 16. Total frame-pairs: 15.
FILM progress: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 15/15 [00:07<00:00,  1.91it/s]
Interpolation done in 8.34 seconds!

Additional information

With the latest updates I get the same error with API - ValueError: controlnet is enabled but no input image is given image

location path of the folder with frames JPG stable-diffusion-webui/anim image

continue-revolution commented 10 months ago

consider providing the full path.

Sd-rep commented 10 months ago

Request

{ "prompt": "", "negative_prompt": "(dark noise, turbid, blur, blurry, blurred, worst quality, low quality, normal quality:1.7)", "styles": [], "width": 512, "height": 512, "n_iter": 1, "sampler_name": "LCM", "steps": 12, "cfg_scale": 1.3, "refiner_checkpoint": "", "refiner_switch_at": 1, "seed": -1, "subseed": -1, "subseed_strength": 0, "seed_resize_from_h": -1, "seed_resize_from_w": -1, "batch_size": 1, "restore_faces": false, "tiling": false, "do_not_save_samples": false, "do_not_save_grid": false, "eta": 0, "denoising_strength": 0, "s_min_uncond": 0, "s_churn": 0, "s_tmax": 0, "s_tmin": 0, "s_noise": 0, "override_settings": {}, "override_settings_restore_afterwards": true, "disable_extra_networks": false, "comments": {}, "enable_hr": false, "firstphase_width": 0, "firstphase_height": 0, "hr_scale": 1, "hr_upscaler": "", "hr_second_pass_steps": 0, "hr_resize_x": 0, "hr_resize_y": 0, "hr_checkpoint_name": "", "hr_sampler_name": "", "hr_prompt": "", "hr_negative_prompt": "", "script_name": "", "script_args": [], "send_images": true, "save_images": false, "alwayson_scripts": { "AnimateDiff": { "args": [ { "model": "mm_sd_v15_v2.fp16.safetensors", "format": ["MP4"], "enable": true, "fps": 25, "loop_number": 0, "closed_loop": "N", "batch_size": 16, "stride": 1, "overlap": -1, "interp": "FILM", "interp_x": 3,
"video_path": "/home/g4you_app_dev/stable-diffusion-webui/anim", "latent_power": 1, "latent_scale": 32, "last_frame": null, "latent_power_last": 1, "latent_scale_last": 32, "request_id": "" } ] }, "controlnet": { "args": [
{ "module": "openpose_full", "model": "control_v11p_sd15_openpose [cab727d4]", "resize_mode": "Envelope (Outer Fit)", "control_mode": "Balanced", "processor_res": 512 } ] } } }

Result

`2023-12-31 08:50:47,903 - AnimateDiff - INFO - AnimateDiff process start. 2023-12-31 08:50:47,915 - AnimateDiff - INFO - Injecting motion module mm_sd_v15_v2.fp16.safetensors into SD1.5 UNet middle block. 2023-12-31 08:50:47,915 - AnimateDiff - INFO - Injecting motion module mm_sd_v15_v2.fp16.safetensors into SD1.5 UNet input blocks. 2023-12-31 08:50:47,916 - AnimateDiff - INFO - Injecting motion module mm_sd_v15_v2.fp16.safetensors into SD1.5 UNet output blocks. 2023-12-31 08:50:47,916 - AnimateDiff - INFO - Setting DDIM alpha. 2023-12-31 08:50:47,919 - AnimateDiff - INFO - Injection finished. 2023-12-31 08:50:47,920 - AnimateDiff - INFO - Hacking LoRA module to support motion LoRA 2023-12-31 08:50:47,920 - AnimateDiff - INFO - Hacking CFGDenoiser forward function. 2023-12-31 08:50:47,920 - AnimateDiff - INFO - Hacking ControlNet. 2023-12-31 08:50:47,921 - ControlNet - INFO - Loading model from cache: control_v11p_sd15_openpose [cab727d4] Error running before_process_batch: /home/g4you_app_dev/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/controlnet.py Traceback (most recent call last): File "/home/g4you_app_dev/stable-diffusion-webui/modules/scripts.py", line 627, in before_process_batch script.before_process_batch(p, script_args, kwargs) File "/home/g4you_app_dev/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/controlnet.py", line 1099, in before_process_batch self.controlnet_hack(p) File "/home/g4you_app_dev/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/controlnet.py", line 1074, in controlnet_hack self.controlnet_main_entry(p) File "/home/g4you_app_dev/stable-diffusion-webui/extensions/sd-webui-animatediff/scripts/animatediff_cn.py", line 266, in hacked_main_entry input_image, image_from_a1111 = cn_script.choose_input_image(p, unit, idx) File "/home/g4you_app_dev/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/controlnet.py", line 657, in choose_input_image raise ValueError('controlnet is enabled but no input image is given') ValueError: controlnet is enabled but no input image is given

100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 12/12 [00:39<00:00, 3.31s/it] 2023-12-31 08:51:30,909 - AnimateDiff - INFO - Restoring ControlNet.██████████████████████████████████████████████████████████████████████| 12/12 [00:36<00:00, 3.34s/it] 2023-12-31 08:51:30,910 - AnimateDiff - INFO - Restoring CFGDenoiser forward function. 2023-12-31 08:51:30,910 - AnimateDiff - INFO - Restoring hacked LoRA 2023-12-31 08:51:30,910 - AnimateDiff - INFO - Restoring DDIM alpha. 2023-12-31 08:51:30,910 - AnimateDiff - INFO - Removing motion module from SD1.5 UNet input blocks. 2023-12-31 08:51:30,910 - AnimateDiff - INFO - Removing motion module from SD1.5 UNet output blocks. 2023-12-31 08:51:30,910 - AnimateDiff - INFO - Removing motion module from SD1.5 UNet middle block. 2023-12-31 08:51:30,911 - AnimateDiff - INFO - Removal finished. 2023-12-31 08:51:30,911 - AnimateDiff - INFO - Merging images into GIF. Total frames to FILM-interpolate: 16. Total frame-pairs: 15. FILM progress: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 15/15 [00:07<00:00, 2.05it/s] Interpolation done in 7.77 seconds! 2023-12-31 08:51:40,857 - AnimateDiff - INFO - Saving outputs/txt2img-images/AnimateDiff/2023-12-31/00001-4269041518.mp4 2023-12-31 08:51:41,812 - AnimateDiff - INFO - AnimateDiff process end. Total progress: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 12/12 [00:50<00:00, 4.22s/it] *** API error: POST: http://34.29.172.160:7860/sdapi/v1/txt2img {'error': 'AttributeError', 'detail': '', 'body': '', 'errors': "'str' object has no attribute 'info'"}it] Traceback (most recent call last): File "/home/g4you_app_dev/stable-diffusion-webui/venv/lib/python3.10/site-packages/anyio/streams/memory.py", line 98, in receive return self.receive_nowait() File "/home/g4you_app_dev/stable-diffusion-webui/venv/lib/python3.10/site-packages/anyio/streams/memory.py", line 93, in receive_nowait raise WouldBlock anyio.WouldBlock

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/g4you_app_dev/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/middleware/base.py", line 78, in call_next
    message = await recv_stream.receive()
  File "/home/g4you_app_dev/stable-diffusion-webui/venv/lib/python3.10/site-packages/anyio/streams/memory.py", line 118, in receive
    raise EndOfStream
anyio.EndOfStream

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/g4you_app_dev/stable-diffusion-webui/modules/api/api.py", line 187, in exception_handling
    return await call_next(request)
  File "/home/g4you_app_dev/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/middleware/base.py", line 84, in call_next
    raise app_exc
  File "/home/g4you_app_dev/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/middleware/base.py", line 70, in coro
    await self.app(scope, receive_or_disconnect, send_no_error)
  File "/home/g4you_app_dev/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/middleware/base.py", line 108, in __call__
    response = await self.dispatch_func(request, call_next)
  File "/home/g4you_app_dev/stable-diffusion-webui/modules/api/api.py", line 151, in log_and_time
    res: Response = await call_next(req)
  File "/home/g4you_app_dev/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/middleware/base.py", line 84, in call_next
    raise app_exc
  File "/home/g4you_app_dev/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/middleware/base.py", line 70, in coro
    await self.app(scope, receive_or_disconnect, send_no_error)
  File "/home/g4you_app_dev/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/middleware/cors.py", line 92, in __call__
    await self.simple_response(scope, receive, send, request_headers=headers)
  File "/home/g4you_app_dev/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/middleware/cors.py", line 147, in simple_response
    await self.app(scope, receive, send)
  File "/home/g4you_app_dev/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/middleware/gzip.py", line 24, in __call__
    await responder(scope, receive, send)
  File "/home/g4you_app_dev/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/middleware/gzip.py", line 44, in __call__
    await self.app(scope, receive, self.send_with_gzip)
  File "/home/g4you_app_dev/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 79, in __call__
    raise exc
  File "/home/g4you_app_dev/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 68, in __call__
    await self.app(scope, receive, sender)
  File "/home/g4you_app_dev/stable-diffusion-webui/venv/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 21, in __call__
    raise e
  File "/home/g4you_app_dev/stable-diffusion-webui/venv/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 18, in __call__
    await self.app(scope, receive, send)
  File "/home/g4you_app_dev/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/routing.py", line 718, in __call__
    await route.handle(scope, receive, send)
  File "/home/g4you_app_dev/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/routing.py", line 276, in handle
    await self.app(scope, receive, send)
  File "/home/g4you_app_dev/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/routing.py", line 66, in app
    response = await func(request)
  File "/home/g4you_app_dev/stable-diffusion-webui/venv/lib/python3.10/site-packages/fastapi/routing.py", line 237, in app
    raw_response = await run_endpoint_function(
  File "/home/g4you_app_dev/stable-diffusion-webui/venv/lib/python3.10/site-packages/fastapi/routing.py", line 165, in run_endpoint_function
    return await run_in_threadpool(dependant.call, **values)
  File "/home/g4you_app_dev/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/concurrency.py", line 41, in run_in_threadpool
    return await anyio.to_thread.run_sync(func, *args)
  File "/home/g4you_app_dev/stable-diffusion-webui/venv/lib/python3.10/site-packages/anyio/to_thread.py", line 33, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(
  File "/home/g4you_app_dev/stable-diffusion-webui/venv/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 877, in run_sync_in_worker_thread
    return await future
  File "/home/g4you_app_dev/stable-diffusion-webui/venv/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 807, in run
    result = context.run(func, *args)
  File "/home/g4you_app_dev/stable-diffusion-webui/modules/api/api.py", line 385, in text2imgapi
    b64images = list(map(encode_pil_to_base64, processed.images)) if send_images else []
  File "/home/g4you_app_dev/stable-diffusion-webui/modules/api/api.py", line 110, in encode_pil_to_base64
    for key, value in image.info.items():
AttributeError: 'str' object has no attribute 'info'

---` image

sonetsphere commented 10 months ago

I also have the same problem.

/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/controlnet.py", line 608, in choose_input_image raise ValueError('controlnet is enabled but no input image is given') ValueError: controlnet is enabled but no input image is given

sonetsphere commented 10 months ago

In the tmp directory, the frames from the video have been extracted, but these images have not yet been passed as parameters to ControlNet.

amanjain1397appy commented 10 months ago

I am facing the same issue

File "/content/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/controlnet.py", line 657, in choose_input_image
        raise ValueError('controlnet is enabled but no input image is given')
    ValueError: controlnet is enabled but no input image is given
captain1023 commented 10 months ago

In the tmp directory, the frames from the video have been extracted, but these images have not yet been passed as parameters to ControlNet.

seems like so

PrivateMyLife commented 9 months ago

Request { "prompt": "lora:LCM_SD_15:1.1", "negative_prompt": "(dark noise, turbid, blur, blurry, blurred, worst quality, low quality, normal quality:1.7)", "styles": [], "width": 512, "height": 512, "n_iter": 1, "sampler_name": "LCM", "steps": 12, "cfg_scale": 1.3, "refiner_checkpoint": "", "refiner_switch_at": 1, "seed": -1, "subseed": -1, "subseed_strength": 0, "seed_resize_from_h": -1, "seed_resize_from_w": -1, "batch_size": 1, "restore_faces": false, "tiling": false, "do_not_save_samples": false, "do_not_save_grid": false, "eta": 0, "denoising_strength": 0, "s_min_uncond": 0, "s_churn": 0, "s_tmax": 0, "s_tmin": 0, "s_noise": 0, "override_settings": {}, "override_settings_restore_afterwards": true, "disable_extra_networks": false, "comments": {}, "enable_hr": false, "firstphase_width": 0, "firstphase_height": 0, "hr_scale": 1, "hr_upscaler": "", "hr_second_pass_steps": 0, "hr_resize_x": 0, "hr_resize_y": 0, "hr_checkpoint_name": "", "hr_sampler_name": "", "hr_prompt": "", "hr_negative_prompt": "", "script_name": "", "script_args": [], "send_images": true, "save_images": false, "alwayson_scripts": { "AnimateDiff": { "args": [ { "model": "mm_sd_v15_v2.fp16.safetensors", "format": ["MP4"], "enable": true, "fps": 25, "loop_number": 0, "closed_loop": "N", "batch_size": 16, "stride": 1, "overlap": -1, "interp": "FILM", "interp_x": 3, "video_path": "/home/g4you_app_dev/stable-diffusion-webui/anim", "latent_power": 1, "latent_scale": 32, "last_frame": null, "latent_power_last": 1, "latent_scale_last": 32, "request_id": "" } ] }, "controlnet": { "args": [ { "module": "openpose_full", "model": "control_v11p_sd15_openpose [cab727d4]", "resize_mode": "Envelope (Outer Fit)", "control_mode": "Balanced", "processor_res": 512 } ] } } }

Result

`2023-12-31 08:50:47,903 - AnimateDiff - INFO - AnimateDiff process start. 2023-12-31 08:50:47,915 - AnimateDiff - INFO - Injecting motion module mm_sd_v15_v2.fp16.safetensors into SD1.5 UNet middle block. 2023-12-31 08:50:47,915 - AnimateDiff - INFO - Injecting motion module mm_sd_v15_v2.fp16.safetensors into SD1.5 UNet input blocks. 2023-12-31 08:50:47,916 - AnimateDiff - INFO - Injecting motion module mm_sd_v15_v2.fp16.safetensors into SD1.5 UNet output blocks. 2023-12-31 08:50:47,916 - AnimateDiff - INFO - Setting DDIM alpha. 2023-12-31 08:50:47,919 - AnimateDiff - INFO - Injection finished. 2023-12-31 08:50:47,920 - AnimateDiff - INFO - Hacking LoRA module to support motion LoRA 2023-12-31 08:50:47,920 - AnimateDiff - INFO - Hacking CFGDenoiser forward function. 2023-12-31 08:50:47,920 - AnimateDiff - INFO - Hacking ControlNet. 2023-12-31 08:50:47,921 - ControlNet - INFO - Loading model from cache: control_v11p_sd15_openpose [cab727d4] Error running before_process_batch: /home/g4you_app_dev/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/controlnet.py Traceback (most recent call last): File "/home/g4you_app_dev/stable-diffusion-webui/modules/scripts.py", line 627, in before_process_batch script.before_process_batch(p, script_args, kwargs) File "/home/g4you_app_dev/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/controlnet.py", line 1099, in before_process_batch self.controlnet_hack(p) File "/home/g4you_app_dev/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/controlnet.py", line 1074, in controlnet_hack self.controlnet_main_entry(p) File "/home/g4you_app_dev/stable-diffusion-webui/extensions/sd-webui-animatediff/scripts/animatediff_cn.py", line 266, in hacked_main_entry input_image, image_from_a1111 = cn_script.choose_input_image(p, unit, idx) File "/home/g4you_app_dev/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/controlnet.py", line 657, in choose_input_image raise ValueError('controlnet is enabled but no input image is given') ValueError: controlnet is enabled but no input image is given

100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 12/12 [00:39<00:00, 3.31s/it] 2023-12-31 08:51:30,909 - AnimateDiff - INFO - Restoring ControlNet.██████████████████████████████████████████████████████████████████████| 12/12 [00:36<00:00, 3.34s/it] 2023-12-31 08:51:30,910 - AnimateDiff - INFO - Restoring CFGDenoiser forward function. 2023-12-31 08:51:30,910 - AnimateDiff - INFO - Restoring hacked LoRA 2023-12-31 08:51:30,910 - AnimateDiff - INFO - Restoring DDIM alpha. 2023-12-31 08:51:30,910 - AnimateDiff - INFO - Removing motion module from SD1.5 UNet input blocks. 2023-12-31 08:51:30,910 - AnimateDiff - INFO - Removing motion module from SD1.5 UNet output blocks. 2023-12-31 08:51:30,910 - AnimateDiff - INFO - Removing motion module from SD1.5 UNet middle block. 2023-12-31 08:51:30,911 - AnimateDiff - INFO - Removal finished. 2023-12-31 08:51:30,911 - AnimateDiff - INFO - Merging images into GIF. Total frames to FILM-interpolate: 16. Total frame-pairs: 15. FILM progress: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 15/15 [00:07<00:00, 2.05it/s] Interpolation done in 7.77 seconds! 2023-12-31 08:51:40,857 - AnimateDiff - INFO - Saving outputs/txt2img-images/AnimateDiff/2023-12-31/00001-4269041518.mp4 2023-12-31 08:51:41,812 - AnimateDiff - INFO - AnimateDiff process end. Total progress: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 12/12 [00:50<00:00, 4.22s/it] *** API error: POST: http://34.29.172.160:7860/sdapi/v1/txt2img {'error': 'AttributeError', 'detail': '', 'body': '', 'errors': "'str' object has no attribute 'info'"}it] Traceback (most recent call last): File "/home/g4you_app_dev/stable-diffusion-webui/venv/lib/python3.10/site-packages/anyio/streams/memory.py", line 98, in receive return self.receive_nowait() File "/home/g4you_app_dev/stable-diffusion-webui/venv/lib/python3.10/site-packages/anyio/streams/memory.py", line 93, in receive_nowait raise WouldBlock anyio.WouldBlock

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/g4you_app_dev/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/middleware/base.py", line 78, in call_next
    message = await recv_stream.receive()
  File "/home/g4you_app_dev/stable-diffusion-webui/venv/lib/python3.10/site-packages/anyio/streams/memory.py", line 118, in receive
    raise EndOfStream
anyio.EndOfStream

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/g4you_app_dev/stable-diffusion-webui/modules/api/api.py", line 187, in exception_handling
    return await call_next(request)
  File "/home/g4you_app_dev/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/middleware/base.py", line 84, in call_next
    raise app_exc
  File "/home/g4you_app_dev/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/middleware/base.py", line 70, in coro
    await self.app(scope, receive_or_disconnect, send_no_error)
  File "/home/g4you_app_dev/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/middleware/base.py", line 108, in __call__
    response = await self.dispatch_func(request, call_next)
  File "/home/g4you_app_dev/stable-diffusion-webui/modules/api/api.py", line 151, in log_and_time
    res: Response = await call_next(req)
  File "/home/g4you_app_dev/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/middleware/base.py", line 84, in call_next
    raise app_exc
  File "/home/g4you_app_dev/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/middleware/base.py", line 70, in coro
    await self.app(scope, receive_or_disconnect, send_no_error)
  File "/home/g4you_app_dev/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/middleware/cors.py", line 92, in __call__
    await self.simple_response(scope, receive, send, request_headers=headers)
  File "/home/g4you_app_dev/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/middleware/cors.py", line 147, in simple_response
    await self.app(scope, receive, send)
  File "/home/g4you_app_dev/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/middleware/gzip.py", line 24, in __call__
    await responder(scope, receive, send)
  File "/home/g4you_app_dev/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/middleware/gzip.py", line 44, in __call__
    await self.app(scope, receive, self.send_with_gzip)
  File "/home/g4you_app_dev/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 79, in __call__
    raise exc
  File "/home/g4you_app_dev/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 68, in __call__
    await self.app(scope, receive, sender)
  File "/home/g4you_app_dev/stable-diffusion-webui/venv/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 21, in __call__
    raise e
  File "/home/g4you_app_dev/stable-diffusion-webui/venv/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 18, in __call__
    await self.app(scope, receive, send)
  File "/home/g4you_app_dev/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/routing.py", line 718, in __call__
    await route.handle(scope, receive, send)
  File "/home/g4you_app_dev/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/routing.py", line 276, in handle
    await self.app(scope, receive, send)
  File "/home/g4you_app_dev/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/routing.py", line 66, in app
    response = await func(request)
  File "/home/g4you_app_dev/stable-diffusion-webui/venv/lib/python3.10/site-packages/fastapi/routing.py", line 237, in app
    raw_response = await run_endpoint_function(
  File "/home/g4you_app_dev/stable-diffusion-webui/venv/lib/python3.10/site-packages/fastapi/routing.py", line 165, in run_endpoint_function
    return await run_in_threadpool(dependant.call, **values)
  File "/home/g4you_app_dev/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/concurrency.py", line 41, in run_in_threadpool
    return await anyio.to_thread.run_sync(func, *args)
  File "/home/g4you_app_dev/stable-diffusion-webui/venv/lib/python3.10/site-packages/anyio/to_thread.py", line 33, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(
  File "/home/g4you_app_dev/stable-diffusion-webui/venv/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 877, in run_sync_in_worker_thread
    return await future
  File "/home/g4you_app_dev/stable-diffusion-webui/venv/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 807, in run
    result = context.run(func, *args)
  File "/home/g4you_app_dev/stable-diffusion-webui/modules/api/api.py", line 385, in text2imgapi
    b64images = list(map(encode_pil_to_base64, processed.images)) if send_images else []
  File "/home/g4you_app_dev/stable-diffusion-webui/modules/api/api.py", line 110, in encode_pil_to_base64
    for key, value in image.info.items():
AttributeError: 'str' object has no attribute 'info'

---` image

Hello, have you resolved the issue?

continue-revolution commented 7 months ago

I believe that #463 has fixed this. if not, let me know