Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Can't implement animatediff to batch image processing #558

Open
2 tasks done
ryanimm opened this issue Oct 18, 2024 · 0 comments
Open
2 tasks done

[Bug]: Can't implement animatediff to batch image processing #558

ryanimm opened this issue Oct 18, 2024 · 0 comments

Comments

@ryanimm
Copy link

ryanimm commented Oct 18, 2024

Is there an existing issue for this?

  • I have searched the existing issues and checked the recent builds/commits of both this extension and the webui

Have you read FAQ on README?

  • I have updated WebUI and this extension to the latest version

What happened?

Hello i tried to use animatediff to inpaint a batch of image consists of 240 frames, but it gives me this result:

*** Arguments: ('task(9dqlps4a81qkvvr)', <gradio.routes.Request object at 0x000001EF1175FBE0>, 5, '', '', ['Bruh], None, None, None, None, None, None, None, 4, 0, 1, 1, 1, 7, 1.5, 1, 0.0, 512, 512, 1, 1, 0, 32, 0, 'C:\Users\PC\Documents\Adobe\Premiere Pro\24.0\Previous Output\Batch', 'C:\Users\PC\Documents\Testing Temporalnet\New Output', 'C:\Users\PC\Documents\Adobe\Premiere Pro\24.0\Previous Output\Mask', [], False, [], '', 'from dir', None, 0, False, 1, 0.5, 4, 0, 0.5, 2, 25, 'Euler a', 'Automatic', False, '', 0.8, -1, False, -1, 0, 0, 0, <scripts.animatediff_ui.AnimateDiffProcess object at 0x000001EF11886950>, ControlNetUnit(is_ui=True, input_mode=<InputMode.SIMPLE: 'simple'>, batch_images='C:\Users\PC\Documents\Adobe\Premiere Pro\24.0\Previous Output\Batch', output_dir='C:\Users\PC\Documents\Testing Temporalnet\New Output', loopback=False, enabled=False, module='none', model='None', weight=1.0, image=None, resize_mode=<ResizeMode.INNER_FIT: 'Crop and Resize'>, low_vram=False, processor_res=-1, threshold_a=-1.0, threshold_b=-1.0, guidance_start=0.0, guidance_end=1.0, pixel_perfect=False, control_mode=<ControlMode.BALANCED: 'Balanced'>, inpaint_crop_input_image=True, hr_option=<HiResFixOption.BOTH: 'Both'>, save_detected_map=True, advanced_weighting=None, effective_region_mask=None, pulid_mode=<PuLIDMode.FIDELITY: 'Fidelity'>, union_control_type=<ControlNetUnionControlType.UNKNOWN: 'Unknown'>, ipadapter_input=None, mask=None, batch_mask_dir=None, animatediff_batch=False, batch_modifiers=[], batch_image_files=[], batch_keyframe_idx=None), ControlNetUnit(is_ui=True, input_mode=<InputMode.SIMPLE: 'simple'>, batch_images='C:\Users\PC\Documents\Adobe\Premiere Pro\24.0\Previous Output\Batch', output_dir='C:\Users\PC\Documents\Testing Temporalnet\New Output', loopback=False, enabled=False, module='none', model='None', weight=1.0, image=None, resize_mode=<ResizeMode.INNER_FIT: 'Crop and Resize'>, low_vram=False, processor_res=-1, threshold_a=-1.0, threshold_b=-1.0, guidance_start=0.0, guidance_end=1.0, pixel_perfect=False, control_mode=<ControlMode.BALANCED: 'Balanced'>, inpaint_crop_input_image=True, hr_option=<HiResFixOption.BOTH: 'Both'>, save_detected_map=True, advanced_weighting=None, effective_region_mask=None, pulid_mode=<PuLIDMode.FIDELITY: 'Fidelity'>, union_control_type=<ControlNetUnionControlType.UNKNOWN: 'Unknown'>, ipadapter_input=None, mask=None, batch_mask_dir=None, animatediff_batch=False, batch_modifiers=[], batch_image_files=[], batch_keyframe_idx=None), ControlNetUnit(is_ui=True, input_mode=<InputMode.SIMPLE: 'simple'>, batch_images='C:\Users\PC\Documents\Adobe\Premiere Pro\24.0\Previous Output\Batch', output_dir='C:\Users\PC\Documents\Testing Temporalnet\New Output', loopback=False, enabled=False, module='none', model='None', weight=1.0, image=None, resize_mode=<ResizeMode.INNER_FIT: 'Crop and Resize'>, low_vram=False, processor_res=-1, threshold_a=-1.0, threshold_b=-1.0, guidance_start=0.0, guidance_end=1.0, pixel_perfect=False, control_mode=<ControlMode.BALANCED: 'Balanced'>, inpaint_crop_input_image=True, hr_option=<HiResFixOption.BOTH: 'Both'>, save_detected_map=True, advanced_weighting=None, effective_region_mask=None, pulid_mode=<PuLIDMode.FIDELITY: 'Fidelity'>, union_control_type=<ControlNetUnionControlType.UNKNOWN: 'Unknown'>, ipadapter_input=None, mask=None, batch_mask_dir=None, animatediff_batch=False, batch_modifiers=[], batch_image_files=[], batch_keyframe_idx=None), '* CFG Scale should be 2 or lower.', True, True, '', '', True, 50, True, 1, 0, False, 4, 0.5, 'Linear', 'None', '

Recommended settings: Sampling Steps: 80-100, Sampler: Euler a, Denoising strength: 0.8

', 128, 8, ['left', 'right', 'up', 'down'], 1, 0.05, 128, 4, 0, ['left', 'right', 'up', 'down'], False, False, 'positive', 'comma', 0, False, False, 'start', '', '

Will upscale the image by the selected scale factor; use width and height sliders to set tile size

', 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 "D:\stable-diffusion-webui-1.10.0\modules\call_queue.py", line 74, in f
res = list(func(*args, **kwargs))
File "D:\stable-diffusion-webui-1.10.0\modules\call_queue.py", line 53, in f
res = func(*args, **kwargs)
File "D:\stable-diffusion-webui-1.10.0\modules\call_queue.py", line 37, in f
res = func(*args, **kwargs)
File "D:\stable-diffusion-webui-1.10.0\modules\img2img.py", line 235, 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 "D:\stable-diffusion-webui-1.10.0\extensions\sd-webui-controlnet\scripts\batch_hijack.py", line 28, in img2img_process_batch_hijack
return animatediff_i2i_batch(p, *args, **kwargs)
File "D:\stable-diffusion-webui-1.10.0\extensions\sd-webui-animatediff\scripts\animatediff_i2ibatch.py", line 304, in animatediff_i2i_batch
proc = process_images(p)
File "D:\stable-diffusion-webui-1.10.0\modules\processing.py", line 847, in process_images
res = process_images_inner(p)
File "D:\stable-diffusion-webui-1.10.0\extensions\sd-webui-controlnet\scripts\batch_hijack.py", line 48, in processing_process_images_hijack
return getattr(processing, '__controlnet_original_process_images_inner')(p, *args, **kwargs)
File "D:\stable-diffusion-webui-1.10.0\modules\processing.py", line 921, in process_images_inner
p.init(p.all_prompts, p.all_seeds, p.all_subseeds)
File "D:\stable-diffusion-webui-1.10.0\extensions\sd-webui-animatediff\scripts\animatediff_i2ibatch.py", line 134, in animatediff_i2i_init
raise RuntimeError(f"bad number of images passed: {len(imgs)}; expecting {self.batch_size} or less")
RuntimeError: bad number of images passed: 240; expecting 1 or less

Steps to reproduce the problem

  1. Go to ....
  2. Press ....
  3. ...

What should have happened?

Generate consistent image

Commit where the problem happens

webui: 1.10
extension: a88e889

What browsers do you use to access the UI ?

No response

Command Line Arguments

--xformers --theme dark

Console logs

-

Additional information

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant