Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error occurred when executing Load Motionctrl-SVD Checkpoint: No module named 'sgm.motionctrl' #5

Open
bdekraker opened this issue Jan 22, 2024 · 6 comments

Comments

@bdekraker
Copy link

Error occurred when executing Load Motionctrl-SVD Checkpoint:

No module named 'sgm.motionctrl'

File "/home/ComfyUI/execution.py", line 154, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
File "/home/ComfyUI/execution.py", line 84, in get_output_data
return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)

I have followed all installation steps but unable to run the model in Comfy. Any help?

image

@zhaowtVincent
Copy link

same error

@cardenluo
Copy link

same error , Any help?

@badgids
Copy link

badgids commented Jan 31, 2024

FIXED

@bdekraker @zhaowtVincent @cardenluo @chaojie

I had the same problem. Apparently something failed when compiling or installing the sgm module. This is how I fixed the No module named 'sgm.motionctrl' error:

Go to where your virtual environment for ComfyUI is (for me it was in my .conda\envs folder) and navigate to the Lib\site-packages directory and delete the sgm directory(s). I had a sgm directory and a sgm-0.1.0, so I deleted them both.

Once those files are gone, start ComfyUI, open th manager, COMPLETELY uninstall the Motionctrl-SVD node, reinstall the node, and reboot the server.

It works for me after that. Hope this helps with yours.

Cheers!

@cardenluo
Copy link

@badgids thanks, This method is very effective

@o-l-l-i
Copy link

o-l-l-i commented Feb 26, 2024

@badgids this fixed the issue for me, too.

@597477803
Copy link

ERROR:root:Traceback (most recent call last):
File "/mnt/other/work/dev/imagework/app/ComfyUI/execution.py", line 152, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/mnt/other/work/dev/imagework/app/ComfyUI/execution.py", line 82, in get_output_data
return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/mnt/other/work/dev/imagework/app/ComfyUI/execution.py", line 75, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/mnt/other/work/dev/imagework/app/ComfyUI/custom_nodes/ComfyUI-MotionCtrl-SVD/nodes.py", line 152, in load_checkpoint
model = build_model(config_path, ckpt_path, device, frame_length, steps)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/mnt/other/work/dev/imagework/app/ComfyUI/custom_nodes/ComfyUI-MotionCtrl-SVD/gradio_utils/motionctrl_cmcm_gradio.py", line 55, in build_model
model, filter = load_model(
^^^^^^^^^^^
File "/mnt/other/work/dev/imagework/app/ComfyUI/custom_nodes/ComfyUI-MotionCtrl-SVD/gradio_utils/motionctrl_cmcm_gradio.py", line 279, in load_model
model = instantiate_from_config(config.model)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/mnt/other/work/dev/imagework/app/ComfyUI/custom_nodes/ComfyUI-Stable-Video-Diffusion/libs/sgm/util.py", line 175,in instantiate_from_config
return get_obj_from_str(config["target"])(**config.get("params", dict()))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/mnt/other/work/dev/imagework/app/ComfyUI/custom_nodes/ComfyUI-Stable-Video-Diffusion/libs/sgm/util.py", line 185,in get_obj_from_str
return getattr(importlib.import_module(module, package=None), cls)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/mnt/other/bin/Anaconda3/envs/mybase/lib/python3.11/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1204, in _gcd_import
File "", line 1176, in _find_and_load
File "", line 1147, in _find_and_load_unlocked
File "", line 690, in _load_unlocked
File "", line 940, in exec_module
File "", line 241, in _call_with_frames_removed
File "/mnt/other/work/dev/imagework/app/ComfyUI/custom_nodes/ComfyUI-MotionCtrl-SVD/sgm/motionctrl/camera_motion_control.py", line 5, in
from sgm.motionctrl.modified_svd import (
ModuleNotFoundError: No module named 'sgm.motionctrl'

i have the same error, but i can not fix , becuase there is not " sgm directory and a sgm-0.1.0", Any help?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants