continue-revolution / sd-webui-animatediff

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

[Bug]: SDXL produces GIF with random frames #379

Closed mweldon closed 10 months ago

mweldon commented 10 months ago

Is there an existing issue for this?

Have you read FAQ on README?

What happened?

Running with SDXL checkpoint, with animatediffMotion_sdxlV10Beta.ckpt motion module, frames and context set to 8, I get this error: File "C:\Users\Mike\Documents\A1111 Web UI Autoinstaller\stable-diffusion-webui\modules\sd_models.py", line 253, in get_state_dict_from_checkpoint pl_sd = pl_sd.pop("state_dict", pl_sd) AttributeError: 'NoneType' object has no attribute 'pop'

The result is a GIF with 8 random unrelated images.

Steps to reproduce the problem

SDXL checkpoint SDXL motion module Stride and frames both set to 8

What should have happened?

Animated GIF with coherent animation instead of random frames

Commit where the problem happens

webui: [v1.7.0-135-ge4d1b6b2] extension: 55ecff36 | 2023-12-19 19:31:21

What browsers do you use to access the UI ?

Google Chrome

Command Line Arguments

--api --no-half-vae --disable-nan-check --opt-split-attention --opt-sdp-attention --upcast-sampling

Console logs

*** Error running before_process: C:\Users\Mike\Documents\A1111 Web UI Autoinstaller\stable-diffusion-webui\extensions\sd-webui-animatediff\scripts\animatediff.py
    Traceback (most recent call last):
      File "C:\Users\Mike\Documents\A1111 Web UI Autoinstaller\stable-diffusion-webui\modules\scripts.py", line 756, in before_process
        script.before_process(p, *script_args)
      File "C:\Users\Mike\Documents\A1111 Web UI Autoinstaller\stable-diffusion-webui\extensions\sd-webui-animatediff\scripts\animatediff.py", line 51, in before_process
        motion_module.inject(p.sd_model, params.model)
      File "C:\Users\Mike\Documents\A1111 Web UI Autoinstaller\stable-diffusion-webui\extensions\sd-webui-animatediff\scripts\animatediff_mm.py", line 62, in inject
        self._load(model_name)
      File "C:\Users\Mike\Documents\A1111 Web UI Autoinstaller\stable-diffusion-webui\extensions\sd-webui-animatediff\scripts\animatediff_mm.py", line 41, in _load
        mm_state_dict = sd_models.read_state_dict(model_path)
      File "C:\Users\Mike\Documents\A1111 Web UI Autoinstaller\stable-diffusion-webui\modules\sd_models.py", line 314, in read_state_dict
        sd = get_state_dict_from_checkpoint(pl_sd)
      File "C:\Users\Mike\Documents\A1111 Web UI Autoinstaller\stable-diffusion-webui\modules\sd_models.py", line 253, in get_state_dict_from_checkpoint
        pl_sd = pl_sd.pop("state_dict", pl_sd)
    AttributeError: 'NoneType' object has no attribute 'pop'

Additional information

No response

continue-revolution commented 10 months ago

I have provided a safetensors model at https://huggingface.co/conrevo/AnimateDiff-A1111/tree/main/motion_module

Use this xl model and let me know if this problem still exists.

mweldon commented 10 months ago

That does seem to fix it. Thanks.