continue-revolution / sd-webui-animatediff

AnimateDiff for AUTOMATIC1111 Stable Diffusion WebUI
Other
3.12k stars 259 forks source link

[Bug]: Min() arg is an empty sequence error #135

Closed Clonephaze closed 1 year ago

Clonephaze commented 1 year ago

Is there an existing issue for this?

Have you read FAQ on README?

What happened?

image Just updated the extension but now for some reason whenever I attempt to generate anything I get this error even when the extension isn't enabled if you've tried at least once with it on. Until you restart webui it'll pull up the error either way.

Steps to reproduce the problem

  1. Go to img2img
  2. Attempt to generate a pic with motion on
  3. Press generate
  4. Nothing generates and error occurs
  5. Nothing occurs after turning off animated diff and trying again, same error pops up.

What should have happened?

A picture should generate

Commit where the problem happens

webui: 1.6.0 extension: b9754038

What browsers do you use to access the UI ?

Mozilla Firefox

Command Line Arguments

--medvram --xformers --opt-sdp-attention --autolaunch --no-half-vae

Console logs

*** Error completing request
*** Arguments: ('task(nvkukcie5n6icgn)', 'A low detail 2d flat digital anime style render, A young adult woman in a kimono with dark flowing hair looking at the viewer, detailed eyes, sakura trees swaying in the background, the night sky sparkling with stars, a few glowing light bugs flying around the scene,', 'FastNegativeV2, greyscale, artist name, 3d, detailed,', [], 30, 'DPM++ 3M SDE Exponential', 1, 1, 8, 512, 512, False, 0.35, 2.5, '4x_NMKD-Superscale-SP_178000_G', 5, 0, 0, 'Use same checkpoint', 'Use same sampler', '', '', [], <gradio.routes.Request object at 0x000002212C609AB0>, 0, False, '', 0.8, 888679495, False, -1, 0, 0, 0, False, False, True, True, False, True, False, True, {'ad_model': 'face_yolov8n.pt', 'ad_prompt': '', 'ad_negative_prompt': '', 'ad_confidence': 0.3, 'ad_mask_k_largest': 0, 'ad_mask_min_ratio': 0, 'ad_mask_max_ratio': 1, 'ad_x_offset': 0, 'ad_y_offset': 0, 'ad_dilate_erode': 4, 'ad_mask_merge_invert': 'None', 'ad_mask_blur': 4, 'ad_denoising_strength': 0.4, 'ad_inpaint_only_masked': True, 'ad_inpaint_only_masked_padding': 32, 'ad_use_inpaint_width_height': False, 'ad_inpaint_width': 512, 'ad_inpaint_height': 512, 'ad_use_steps': False, 'ad_steps': 28, 'ad_use_cfg_scale': False, 'ad_cfg_scale': 7, 'ad_use_checkpoint': False, 'ad_checkpoint': 'Use same checkpoint', 'ad_use_vae': False, 'ad_vae': 'Use same VAE', 'ad_use_sampler': False, 'ad_sampler': 'Euler a', 'ad_use_noise_multiplier': False, 'ad_noise_multiplier': 1, 'ad_use_clip_skip': False, 'ad_clip_skip': 1, 'ad_restore_face': False, 'ad_controlnet_model': 'None', 'ad_controlnet_module': 'inpaint_global_harmonious', 'ad_controlnet_weight': 1, 'ad_controlnet_guidance_start': 0, 'ad_controlnet_guidance_end': 1, 'is_api': ()}, {'ad_model': 'None', 'ad_prompt': '', 'ad_negative_prompt': '', 'ad_confidence': 0.3, 'ad_mask_k_largest': 0, 'ad_mask_min_ratio': 0, 'ad_mask_max_ratio': 1, 'ad_x_offset': 0, 'ad_y_offset': 0, 'ad_dilate_erode': 4, 'ad_mask_merge_invert': 'None', 'ad_mask_blur': 4, 'ad_denoising_strength': 0.4, 'ad_inpaint_only_masked': True, 'ad_inpaint_only_masked_padding': 32, 'ad_use_inpaint_width_height': False, 'ad_inpaint_width': 512, 'ad_inpaint_height': 512, 'ad_use_steps': False, 'ad_steps': 28, 'ad_use_cfg_scale': False, 'ad_cfg_scale': 7, 'ad_use_checkpoint': False, 'ad_checkpoint': 'Use same checkpoint', 'ad_use_vae': False, 'ad_vae': 'Use same VAE', 'ad_use_sampler': False, 'ad_sampler': 'Euler a', 'ad_use_noise_multiplier': False, 'ad_noise_multiplier': 1, 'ad_use_clip_skip': False, 'ad_clip_skip': 1, 'ad_restore_face': False, 'ad_controlnet_model': 'None', 'ad_controlnet_module': 'inpaint_global_harmonious', 'ad_controlnet_weight': 1, 'ad_controlnet_guidance_start': 0, 'ad_controlnet_guidance_end': 1, 'is_api': ()}, <scripts.animatediff_ui.AnimateDiffProcess object at 0x000002212C60B2B0>, <scripts.controlnet_ui.controlnet_ui_group.UiControlNetUnit object at 0x000002212B1BC370>, <scripts.controlnet_ui.controlnet_ui_group.UiControlNetUnit object at 0x000002212B1BD600>, <scripts.controlnet_ui.controlnet_ui_group.UiControlNetUnit object at 0x000002212A1635B0>, False, False, 'Matrix', 'Columns', 'Mask', 'Prompt', '1,1', '0.2', False, False, False, 'Attention', False, '0', '0', '0.4', None, '0', '0', False, False, False, 'positive', 'comma', 0, False, False, '', 1, '', [], 0, '', [], 0, '', [], True, False, False, False, 0, False, None, None, False, None, None, False, None, None, False, 50, [], 30, '', 4, [], 1, '', '', '', '') {}
    Traceback (most recent call last):
      File "C:\Users\Jack\stable-diffusion-webui\modules\call_queue.py", line 57, in f
        res = list(func(*args, **kwargs))
      File "C:\Users\Jack\stable-diffusion-webui\modules\call_queue.py", line 36, in f
        res = func(*args, **kwargs)
      File "C:\Users\Jack\stable-diffusion-webui\modules\txt2img.py", line 55, in txt2img
        processed = processing.process_images(p)
      File "C:\Users\Jack\stable-diffusion-webui\modules\processing.py", line 732, in process_images
        res = process_images_inner(p)
      File "C:\Users\Jack\stable-diffusion-webui\extensions\sd-webui-animatediff\scripts\animatediff_cn.py", line 87, in hacked_processing_process_images_hijack
        video_length = min(len(unit.batch_images)
    ValueError: min() arg is an empty sequence

Additional information

No response

ManOrMonster commented 1 year ago

I'm also getting this after latest update, in txt2img. Then after the error, even if I uncheck "Enable Automatediff", I can't generate an image without restarting auto1111.

luussta commented 1 year ago

Same error

continue-revolution commented 1 year ago

Holy shit, I forgot to consider when there is no ControlNet. Will be fixed very soon.

Clonephaze commented 1 year ago

Holy shit, I forgot to consider when there is no ControlNet. Will be fixed very soon.

Idk if it's just that, I am using controlnet and still getting the same error.

image

ManOrMonster commented 1 year ago

I tried with ControlNet enabled on txt2img just now, same problem.

continue-revolution commented 1 year ago

fixed via https://github.com/continue-revolution/sd-webui-animatediff/commit/71e045babe18159c3ada3101e14e925ddfc17e6c

continue-revolution commented 1 year ago

alright, CN with single image only also have such trouble. Will fix it soon.

continue-revolution commented 1 year ago

fixed via https://github.com/continue-revolution/sd-webui-animatediff/commit/9a4dd73f070ff4df88e191e219bee2fbc18cc7eb

Clonephaze commented 1 year ago

Damn you're fast. Thanks!

continue-revolution commented 1 year ago

ControlNet support is extremely challenging. Please feel free to report bugs and ask questions whenever you meet one.

luussta commented 1 year ago

Thanks! You are really fast!