continue-revolution / sd-webui-animatediff

AnimateDiff for AUTOMATIC1111 Stable Diffusion WebUI
Other
3.05k stars 253 forks source link

[Bug]: Img2img Batch not working on webui 1.8.0 #443

Closed jtrozos closed 6 months ago

jtrozos commented 6 months ago

Is there an existing issue for this?

Have you read FAQ on README?

What happened?

Img2img Batch with Animatediff stopped working after webui 1.8.0 update

Steps to reproduce the problem

  1. set the folders in img2img batch tab
  2. activate animatediff
  3. activate contronet
  4. click generate

What should have happened?

It should have generated an animation

Commit where the problem happens

webui: bef51aed032c0aaa5cfd80445bc4cf0d85b408b5 extension: 95ae9905ede9a4bae131200b2853a00d8298a3a1

What browsers do you use to access the UI ?

Google Chrome

Command Line Arguments

--xformers --disable-safe-unpickle

Console logs

Already up to date.
venv "C:\stable-diffusion-webui\venv\Scripts\Python.exe"
Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug  1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Version: v1.8.0
Commit hash: bef51aed032c0aaa5cfd80445bc4cf0d85b408b5
Launching Web UI with arguments: --xformers --disable-safe-unpickle
ControlNet preprocessor location: C:\stable-diffusion-webui\extensions\sd-webui-controlnet\annotator\downloads
2024-03-03 11:36:09,120 - ControlNet - INFO - ControlNet v1.1.441
2024-03-03 11:36:09,208 - ControlNet - INFO - ControlNet v1.1.441
Loading weights [4199bcdd14] from C:\stable-diffusion-webui\models\Stable-diffusion\1.5\revAnimated_v122.safetensors
Creating model from config: C:\stable-diffusion-webui\configs\v1-inference.yaml
Applying attention optimization: xformers... done.
Model loaded in 3.0s (create model: 0.3s, apply weights to model: 2.4s, calculate empty prompt: 0.2s).
2024-03-03 11:36:12,360 - ControlNet - INFO - ControlNet UI callback registered.
Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.
Startup time: 12.6s (prepare environment: 2.0s, import torch: 3.5s, import gradio: 0.8s, setup paths: 0.9s, initialize shared: 0.2s, other imports: 0.4s, load scripts: 1.1s, create ui: 3.3s, gradio launch: 0.3s).
2024-03-03 11:42:49,630 - AnimateDiff - INFO - [i2i batch] Inpaint batch is enabled. 25 masks found.
*** Error completing request
*** Arguments: ('task(x70czuzk1f3nnkh)', 5, 'man dancing', '', [], None, None, None, None, None, None, None, 20, 'Euler', 4, 0, 1, 1, 1, 6, 1.5, 1, 0.0, 512, 512, 1, 2, 0, 32, 0, 'C:\\img2anim\\base', 'C:\\img2anim\\output', 'C:\\img2anim\\npmask', [], False, [], '', <gradio.routes.Request object at 0x000002AB0A659900>, 0, False, 1, 0.5, 4, 0, 0.5, 2, False, '', 0.8, -1, False, -1, 0, 0, 0, <scripts.animatediff_ui.AnimateDiffProcess object at 0x000002AB0A658CD0>, UiControlNetUnit(enabled=True, module='none', model='control_v1p_sd15_qrcode_monster_v2 [5e5778cb]', weight=1, image=None, resize_mode='Crop and Resize', low_vram=False, processor_res=-1, threshold_a=-1, threshold_b=-1, guidance_start=0, guidance_end=1, pixel_perfect=False, control_mode='Balanced', inpaint_crop_input_image=True, hr_option='Both', save_detected_map=True, advanced_weighting=None), UiControlNetUnit(enabled=False, module='none', model='None', weight=1, image=None, resize_mode='Crop and Resize', low_vram=False, processor_res=-1, threshold_a=-1, threshold_b=-1, guidance_start=0, guidance_end=1, pixel_perfect=False, control_mode='Balanced', inpaint_crop_input_image=True, hr_option='Both', save_detected_map=True, advanced_weighting=None), UiControlNetUnit(enabled=False, module='none', model='None', weight=1, image=None, resize_mode='Crop and Resize', low_vram=False, processor_res=-1, threshold_a=-1, threshold_b=-1, guidance_start=0, guidance_end=1, pixel_perfect=False, control_mode='Balanced', inpaint_crop_input_image=True, hr_option='Both', save_detected_map=True, advanced_weighting=None), '* `CFG Scale` should be 2 or lower.', True, True, '', '', True, 50, True, 1, 0, False, 4, 0.5, 'Linear', 'None', '<p style="margin-bottom:0.75em">Recommended settings: Sampling Steps: 80-100, Sampler: Euler a, Denoising strength: 0.8</p>', 128, 8, ['left', 'right', 'up', 'down'], 1, 0.05, 128, 4, 0, ['left', 'right', 'up', 'down'], False, False, 'positive', 'comma', 0, False, False, 'start', '', '<p style="margin-bottom:0.75em">Will upscale the image by the selected scale factor; use width and height sliders to set tile size</p>', 64, 0, 2, 1, '', [], 0, '', [], 0, '', [], True, False, False, False, False, False, False, 0, False, None, None, False, None, None, False, None, None, False, 50) {}
    Traceback (most recent call last):
      File "C:\stable-diffusion-webui\modules\call_queue.py", line 57, in f
        res = list(func(*args, **kwargs))
      File "C:\stable-diffusion-webui\modules\call_queue.py", line 36, in f
        res = func(*args, **kwargs)
      File "C:\stable-diffusion-webui\modules\img2img.py", line 228, in img2img
        processed = process_batch(p, img2img_batch_input_dir, img2img_batch_output_dir, img2img_batch_inpaint_mask_dir, args, to_scale=selected_scale_tab == 1, scale_by=scale_by, use_png_info=img2img_batch_use_png_info, png_info_props=img2img_batch_png_info_props, png_info_dir=img2img_batch_png_info_dir)
      File "C:\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\batch_hijack.py", line 28, in img2img_process_batch_hijack
        return animatediff_i2i_batch(p, *args, **kwargs)
      File "C:\stable-diffusion-webui\extensions\sd-webui-animatediff\scripts\animatediff_i2ibatch.py", line 210, in animatediff_i2i_batch
        assert cn_unit.batch_images == input_dir, f"Batch image dir is not set to {input_dir}."
    AssertionError: Batch image dir is not set to C:\img2anim\base.

---

Additional information

It was working before 1.8.0 update. In Forge, it's not working, it wasn't working before. Thanks!

continue-revolution commented 6 months ago

for a1111 v1.8.0, i2i batch relies on ControlNet v1.1.441. Please update both ControlNet and this extension.

for forge, unfortunately we currently don't have i2i-batch. I am currently developing this feature for forge.

continue-revolution commented 6 months ago

huh, it seems that you have updated. let me look into it

continue-revolution commented 6 months ago

pls update and retry. if it works pls close this issue. if it does not work then let me know.

jtrozos commented 6 months ago

It does not give any errors but the results are not right at all (using same seed/settings as yesterday tests). There’s something not working right. I’ll do more tests later.

jtrozos commented 6 months ago

It's working as it was now . Thanks ! ! !