continue-revolution / sd-webui-animatediff

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

[Bug]: Shape mismatch, can't divide axis of length 1 in chunks of 16 #454

Closed Mrrabbitan closed 8 months ago

Mrrabbitan commented 8 months ago

Is there an existing issue for this?

Have you read FAQ on README?

What happened?

webui using animatediff ,something happend Error running before_process: D:\stableDiffusion\sd-webui-aki-v4.5\extensions\sd-webui-animatediff\scripts\animatediff.py Traceback (most recent call last): File "D:\stableDiffusion\sd-webui-aki-v4.5\modules\scripts.py", line 611, in before_process script.before_process(p, *script_args) File "D:\stableDiffusion\sd-webui-aki-v4.5\extensions\sd-webui-animatediff\scripts\animatediff.py", line 63, in before_process motion_module.inject(p.sd_model, params.model) File "D:\stableDiffusion\sd-webui-aki-v4.5\extensions\sd-webui-animatediff\scripts\animatediff_mm.py", line 112, in inject self._set_ddim_alpha(sd_model) File "D:\stableDiffusion\sd-webui-aki-v4.5\extensions\sd-webui-animatediff\scripts\animatediff_mm.py", line 178, in _set_ddim_alpha self.prev_alpha_cumprod_original = sd_model.alphas_cumprod_original File "D:\stableDiffusion\sd-webui-aki-v4.5\python\lib\site-packages\torch\nn\modules\module.py", line 1695, in getattr raise AttributeError(f"'{type(self).name}' object has no attribute '{name}'") AttributeError: 'LatentDiffusion' object has no attribute 'alphas_cumprod_original'

Steps to reproduce the problem

  1. Go to ....
  2. Press ....
  3. ... 2024-03-07 13:37:59,740 - AnimateDiff - INFO - AnimateDiff process start. 2024-03-07 13:37:59,742 - AnimateDiff - INFO - Loading motion module mm_sd_v15_v2.ckpt from D:\stableDiffusion\sd-webui-aki-v4.5\extensions\sd-webui-animatediff\model\mm_sd_v15_v2.ckpt 2024-03-07 13:38:00,998 - AnimateDiff - INFO - Guessed mm_sd_v15_v2.ckpt architecture: MotionModuleType.AnimateDiffV2 2024-03-07 13:38:07,115 - AnimateDiff - INFO - Injecting motion module mm_sd_v15_v2.ckpt into SD1.5 UNet middle block. 2024-03-07 13:38:07,116 - AnimateDiff - INFO - Injecting motion module mm_sd_v15_v2.ckpt into SD1.5 UNet input blocks. 2024-03-07 13:38:07,116 - AnimateDiff - INFO - Injecting motion module mm_sd_v15_v2.ckpt into SD1.5 UNet output blocks. 2024-03-07 13:38:07,117 - AnimateDiff - INFO - Setting DDIM alpha.

What should have happened?

run normally

Commit where the problem happens

webui: newest extension: animatediff

What browsers do you use to access the UI ?

No response

Command Line Arguments

2024-03-07 13:37:59,740 - AnimateDiff - INFO - AnimateDiff process start.
2024-03-07 13:37:59,742 - AnimateDiff - INFO - Loading motion module mm_sd_v15_v2.ckpt from D:\stableDiffusion\sd-webui-aki-v4.5\extensions\sd-webui-animatediff\model\mm_sd_v15_v2.ckpt
2024-03-07 13:38:00,998 - AnimateDiff - INFO - Guessed mm_sd_v15_v2.ckpt architecture: MotionModuleType.AnimateDiffV2
2024-03-07 13:38:07,115 - AnimateDiff - INFO - Injecting motion module mm_sd_v15_v2.ckpt into SD1.5 UNet middle block.
2024-03-07 13:38:07,116 - AnimateDiff - INFO - Injecting motion module mm_sd_v15_v2.ckpt into SD1.5 UNet input blocks.
2024-03-07 13:38:07,116 - AnimateDiff - INFO - Injecting motion module mm_sd_v15_v2.ckpt into SD1.5 UNet output blocks.
2024-03-07 13:38:07,117 - AnimateDiff - INFO - Setting DDIM alpha.

Console logs

Error executing callback cfg_denoiser_callback for D:\stableDiffusion\sd-webui-aki-v4.5\extensions\sd-webui-animatediff\scripts\animatediff.py
    Traceback (most recent call last):
      File "D:\stableDiffusion\sd-webui-aki-v4.5\modules\script_callbacks.py", line 216, in cfg_denoiser_callback
        c.callback(params)
      File "D:\stableDiffusion\sd-webui-aki-v4.5\extensions\sd-webui-animatediff\scripts\animatediff_infv2v.py", line 87, in animatediff_on_cfg_denoiser
        if cfg_params.denoiser.step == 0 and getattr(ad_params, "step", -1) != 0:
    AttributeError: 'CFGDenoiserParams' object has no attribute 'denoiser'

Additional information

No response

continue-revolution commented 8 months ago

Update your webui to 1.8.0