continue-revolution / sd-webui-animatediff

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

[Bug]: ModuleNotFoundError: No module named 'scripts.animatediff_mm' #510

Closed Seafood0808 closed 6 months ago

Seafood0808 commented 6 months ago

Is there an existing issue for this?

Have you read FAQ on README?

What happened?

Error at startup animatediff becomes invisible in WenUI

Steps to reproduce the problem

just up data

What should have happened?

In WenUI, you can see

Commit where the problem happens

webui: extension:9ba5eb5

What browsers do you use to access the UI ?

Google Chrome

Command Line Arguments

--xformers --no-half

Console logs

*** Error loading script: animatediff_mm.py
    Traceback (most recent call last):
      File "E:\Stb\stable-diffusion-webui\modules\scripts.py", line 508, in load_scripts
        script_module = script_loading.load_module(scriptfile.path)
      File "E:\Stb\stable-diffusion-webui\modules\script_loading.py", line 14, in load_module
        module_spec.loader.exec_module(module)
      File "<frozen importlib._bootstrap_external>", line 883, in exec_module
      File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
      File "E:\Stb\stable-diffusion-webui\extensions\sd-webui-animatediff\scripts\animatediff_mm.py", line 9, in <module>
        from motion_module import MotionWrapper, MotionModuleType
      File "E:\Stb\stable-diffusion-webui\extensions\sd-webui-animatediff\motion_module.py", line 333
                from scripts import animatediff_mm
        ^
    TabError: inconsistent use of tabs and spaces in indentation

---
ControlNet preprocessor location: E:\Stb\stable-diffusion-webui\extensions\sd-webui-controlnet\annotator\downloads
2024-04-20 19:33:17,689 - ControlNet - INFO - ControlNet v1.1.445
2024-04-20 19:33:17,926 - ControlNet - INFO - ControlNet v1.1.445
[text2prompt] Following databases are available:
    all-mpnet-base-v2 : danbooru_strict
Loading weights [6ce0161689] from E:\Stb\stable-diffusion-webui\models\Stable-diffusion\v1-5-pruned-emaonly.safetensors
Creating model from config: E:\Stb\stable-diffusion-webui\configs\v1-inference.yaml
*** Error calling: E:\Stb\stable-diffusion-webui\extensions\sd-webui-animatediff\scripts\animatediff.py/ui
    Traceback (most recent call last):
      File "E:\Stb\stable-diffusion-webui\modules\scripts.py", line 528, in wrap_call
        return func(*args, **kwargs)
      File "E:\Stb\stable-diffusion-webui\extensions\sd-webui-animatediff\scripts\animatediff.py", line 43, in ui
        from scripts.animatediff_mm import mm_animatediff as motion_module
    ModuleNotFoundError: No module named 'scripts.animatediff_mm'

---
*** Error calling: E:\Stb\stable-diffusion-webui\extensions\sd-webui-animatediff\scripts\animatediff.py/ui
    Traceback (most recent call last):
      File "E:\Stb\stable-diffusion-webui\modules\scripts.py", line 528, in wrap_call
        return func(*args, **kwargs)
      File "E:\Stb\stable-diffusion-webui\extensions\sd-webui-animatediff\scripts\animatediff.py", line 43, in ui
        from scripts.animatediff_mm import mm_animatediff as motion_module
    ModuleNotFoundError: No module named 'scripts.animatediff_mm'

Additional information

Works with comfy animatediff

lee393322 commented 6 months ago

In my case, From extensions\sd-webui-animatediff\scripts\animatediff.py Just cut line 43 and paste into line 22.

continue-revolution commented 6 months ago

Probably something shit happened when I merged an earlier PR. Will be fixed as soon as possible.

Seafood0808 commented 6 months ago

Probably something shit happened when I merged an earlier PR. Will be fixed as soon as possible.

When I try to delete all animatediff files and reinstall it, it works fine. I did it once. I don't know why, but it worked this time. Thank you for your contribution!

legan80 commented 6 months ago

In my case, From extensions\sd-webui-animatediff\scripts\animatediff.py Just cut line 43 and paste into line 22.

I just edited /scripts/animatediff.py and it works fine. I moved the code from scripts.animatediff_mm import mm_animatediff as motion_module to last row of import section of the same file.

C0D3M0N commented 6 months ago

제 경우에는 Extensions\sd-webui-animatediff\scripts\animatediff.py에서 43행을 잘라서 22행에 붙여넣으면 됩니다.

thanks

continue-revolution commented 6 months ago

update your webui and animatediff to latest and this should be fixed.