continue-revolution / sd-webui-animatediff

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

ModuleNotFoundError: No module named 'scripts.animatediff_mm' #503

Closed 1manfactory closed 7 months ago

1manfactory commented 7 months ago

Is there an existing issue for this?

Have you read FAQ on README?

What happened?

Error calling: C:\sd.webui\webui\extensions\sd-webui-animatediff\scripts\animatediff.py/ui Traceback (most recent call last): File "C:\sd.webui\webui\modules\scripts.py", line 547, in wrap_call return func(*args, **kwargs) File "C:\sd.webui\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'

Steps to reproduce the problem

After installing https://github.com/continue-revolution/sd-webui-animatediff and restarting a1111

What should have happened?

No tab pops up inside GUI

Commit where the problem happens

webui: version: v1.8.0  •  python: 3.10.6  •  torch: 2.0.1+cu118  •  xformers: 0.0.20  •  gradio: 3.41.2 extension: sd-webui-animatediff

What browsers do you use to access the UI ?

Google Chrome

Command Line Arguments

set COMMANDLINE_ARGS=--xformers --listen --enable-insecure-extension-access

Console logs

Error calling: C:\sd.webui\webui\extensions\sd-webui-animatediff\scripts\animatediff.py/ui
    Traceback (most recent call last):
      File "C:\sd.webui\webui\modules\scripts.py", line 547, in wrap_call
        return func(*args, **kwargs)
      File "C:\sd.webui\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

No response

continue-revolution commented 7 months ago

Either update your WebUI to 1.9.0, or go back to AD 2.0.0-a. My extension was fucked up by a PR in A1111 and I had to do something dirty to fix it. If updating to 1.9.0 does not work, please let me know and I will address the issue ASAP.

1manfactory commented 7 months ago

Still getting errors with different checkpoints an VAEs

024-04-16 11:34:48,909 - AnimateDiff - INFO - inner model forward hooked 100%|██████████████████████████████████████████████████████████████████████████████████| 20/20 [01:16<00:00, 3.82s/it] Error completing request 3.89s/it] Arguments: ('task(xyz9fqypqta94uz)', <gradio.routes.Request object at 0x000002149E6FDF60>, 'beautiful portrait of a cyborg mercenary girl,art by wlop,liam wong,cyberpunk,neon,combat armor,head and shoulders,intricate details,trending on artstation,sharp focus,caustics,octane render,radiant light,4 k,', 'baddream fastnegativev2,', [], 1, 1, 7, 512, 512, False, 0.7, 2, 'Latent', 0, 0, 0, 'Use same checkpoint', 'DPM++ 2M', 'Use same scheduler', '', '', [], 0, 20, 'DPM++ 2M', 'Automatic', False, '', 0.8, -1, False, -1, 0, 0, 0, False, False, {'ad_model': 'face_yolov8n.pt', 'ad_model_classes': '', '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': 'DPM++ 2M', 'ad_scheduler': 'Use same scheduler', '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': 'None', 'ad_controlnet_weight': 1, 'ad_controlnet_guidance_start': 0, 'ad_controlnet_guidance_end': 1, 'is_api': ()}, {'ad_model': 'None', 'ad_model_classes': '', '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': 'DPM++ 2M', 'ad_scheduler': 'Use same scheduler', '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': 'None', 'ad_controlnet_weight': 1, 'ad_controlnet_guidance_start': 0, 'ad_controlnet_guidance_end': 1, 'is_api': ()}, <scripts.animatediff_ui.AnimateDiffProcess object at 0x000002149EB2B9A0>, UiControlNetUnit(enabled=False, module='none', model='None', weight=1, image=None, resize_mode='Crop and Resize', low_vram=False, processor_res=-1, threshold_a=-1, threshold_b=-1, guidance_start=0, guidance_end=1, pixel_perfect=False, control_mode='Balanced', inpaint_crop_input_image=False, hr_option='Both', save_detected_map=True, advanced_weighting=None, ipadapter_input=None), UiControlNetUnit(enabled=False, module='none', model='None', weight=1, image=None, resize_mode='Crop and Resize', low_vram=False, processor_res=-1, threshold_a=-1, threshold_b=-1, guidance_start=0, guidance_end=1, pixel_perfect=False, control_mode='Balanced', inpaint_crop_input_image=False, hr_option='Both', save_detected_map=True, advanced_weighting=None, ipadapter_input=None), UiControlNetUnit(enabled=False, module='none', model='None', weight=1, image=None, resize_mode='Crop and Resize', low_vram=False, processor_res=-1, threshold_a=-1, threshold_b=-1, guidance_start=0, guidance_end=1, pixel_perfect=False, control_mode='Balanced', inpaint_crop_input_image=False, hr_option='Both', save_detected_map=True, advanced_weighting=None, ipadapter_input=None), None, False, '0', '0', 'inswapper_128.onnx', 'CodeFormer', 1, True, 'None', 1, 1, False, True, 1, 0, 0, False, 0.5, True, False, 'CUDA', False, 0, 'None', '', None, False, False, 0.5, 0, None, False, '0', 'C:\sd.webui\webui\models\roop\inswapper_128.onnx', 'CodeFormer', 1, '', 1, 1, False, True, False, False, 'positive', 'comma', 0, False, False, 'start', '', 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 "C:\sd.webui\webui\modules\call_queue.py", line 57, in f res = list(func(*args, kwargs)) File "C:\sd.webui\webui\modules\call_queue.py", line 36, in f res = func(*args, *kwargs) File "C:\sd.webui\webui\modules\txt2img.py", line 109, in txt2img processed = processing.process_images(p) File "C:\sd.webui\webui\modules\processing.py", line 845, in process_images res = process_images_inner(p) File "C:\sd.webui\webui\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 "C:\sd.webui\webui\modules\processing.py", line 993, in process_images_inner x_samples_ddim = decode_latent_batch(p.sd_model, samples_ddim, target_device=devices.cpu, check_for_nans=True) File "C:\sd.webui\webui\modules\processing.py", line 654, in decode_latent_batch raise e File "C:\sd.webui\webui\modules\processing.py", line 638, in decode_latent_batch devices.test_for_nans(sample, "vae") File "C:\sd.webui\webui\modules\devices.py", line 255, in test_for_nans raise NansException(message) modules.devices.NansException: A tensor with all NaNs was produced in VAE. This could be because there's not enough precision to represent the picture. Try adding --no-half-vae commandline argument to fix this. Use --disable-nan-check commandline argument to disable this check.


continue-revolution commented 7 months ago

this has nothing to do with AnimateDiff. --no-half-vae will be your friend

1manfactory commented 7 months ago

Great and thank you. That worked. But now I have another problem. I will open a new issue.

DavideAlidosi commented 7 months ago

I had a similar issue, roll back ControlNet to 1.1.443 fix it on my side.

kieuquangloc commented 7 months ago

Hi @continue-revolution I got the error while installing the latest version of the extension, could you give me advice?

Launching Web UI with arguments: --listen --xformers --api --share --no-half-vae --enable-insecure-extension-access
Civitai Helper: Root Path is: //...//stable-diffusion-webui
Civitai Helper: Get Custom Model Folder
[-] ADetailer initialized. version: 24.4.2, num models: 10
05:00:47 - ReActor - STATUS - Running v0.7.0-b7 on Device: CUDA
Loading weights [fe7578cb5e] from //...//stable-diffusion-webui/models/Stable-diffusion/realisticVisionV60B1_v60B1VAE.safetensors
*** Error calling: //...//stable-diffusion-webui/extensions/sd-webui-animatediff/scripts/animatediff.py/ui
    Traceback (most recent call last):
      File "//...//stable-diffusion-webui/modules/scripts.py", line 547, in wrap_call
        return func(*args, **kwargs)
      File "//...//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: //...//stable-diffusion-webui/extensions/sd-webui-animatediff/scripts/animatediff.py/ui
    Traceback (most recent call last):
      File "//...//stable-diffusion-webui/modules/scripts.py", line 547, in wrap_call
        return func(*args, **kwargs)
      File "//...//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'

---
Civitai Helper: Settings:
Civitai Helper: max_size_preview: True
Civitai Helper: open_url_with_js: True
Civitai Helper: proxy: 
Running on local URL:  http://0.0.0.0:7860
Creating model from config: //...//stable-diffusion-webui/configs/v1-inference.yaml
Applying attention optimization: xformers... done.
Model loaded in 2.9s (load weights from disk: 1.0s, create model: 0.4s, apply weights to model: 0.9s, load textual inversion embeddings: 0.4s, calculate empty prompt: 0.1s).
....

This share link expires in 72 hours. For free permanent hosting and GPU upgrades, run `gradio deploy` from Terminal to deploy to Spaces (https://huggingface.co/spaces)
Traceback (most recent call last):
  File "//...//stable-diffusion-webui/launch.py", line 48, in <module>
    main()
  File "//...//stable-diffusion-webui/launch.py", line 44, in main
    start()
  File "//...//stable-diffusion-webui/modules/launch_utils.py", line 469, in start
    webui.webui()
  File "//...//stable-diffusion-webui/webui.py", line 112, in webui
    create_api(app)
  File "//...//stable-diffusion-webui/webui.py", line 22, in create_api
    api = Api(app, queue_lock)
  File "//...//stable-diffusion-webui/modules/api/api.py", line 264, in __init__
    self.default_script_arg_txt2img = self.init_default_script_args(txt2img_script_runner)
  File "//...//stable-diffusion-webui/modules/api/api.py", line 327, in init_default_script_args
    if script.ui(script.is_img2img):
  File "//...//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'
yinquest11 commented 6 months ago

Either update your WebUI to 1.9.0, or go back to AD 2.0.0-a. My extension was fucked up by a PR in A1111 and I had to do something dirty to fix it. If updating to 1.9.0 does not work, please let me know and I will address the issue ASAP.

error to calling animatediff in v1.9.2

continue-revolution commented 6 months ago

update your webui to v1.9.3 (latest) and animatediff to v2.0.0.2-a (latest) and this should be fixed.