chaojie / ComfyUI-MotionCtrl-SVD

79 stars 5 forks source link

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

Open bdekraker opened 5 months ago

bdekraker commented 5 months ago

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 commented 5 months ago

same error

cardenluo commented 5 months ago

same error , Any help?

badgids commented 4 months ago

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 commented 4 months ago

@badgids thanks, This method is very effective

o-l-l-i commented 4 months ago

@badgids this fixed the issue for me, too.

597477803 commented 3 months ago

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?