kijai/ComfyUI-SVD

Error no module named "sgm"!?

Opened this issue · 7 comments

any idea what is ?

sgm

kijai commented

It's the main module from stability AI, if you are using portable there was a missing dependency required for installing it (hatchling), I've fixed that now at least, you'd need to reinstall the node for it to apply.

Yes it was missing, i install it and now running thks

I did a git pull, then in the the node directory pip install -r requirements.txt and then restarted ComgyUI, still the smg error

Please advise

kijai commented

I did a git pull, then in the the node directory pip install -r requirements.txt and then restarted ComgyUI, still the smg error

Please advise

Are you using venv or portable install? Would need to see from the log where the sgm install fails.

protable i'm sure of it. I'm using Stability Matrix which combines all the txtto images things, and checkboxed protable so I can swing back and forth between laptop and desktop

here is the output log

[00:00<?, ?it/s]C:\Users\User\Desktop\StabilityMatrix-win-x64\Data\Packages\ComfyUI\venv\lib\site-packages\torchsde_brownian\brownian_interval.py:608: UserWarning: Should have tb<=t1 but got tb=14.614643096923828 and t1=14.614643.
warnings.warn(f"Should have {tb_name}<=t1 but got {tb_name}={tb} and t1={self._end}.")
92%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u258c| 23/25 [00:04<00:00, 6.16it/s]C:\Users\User\Desktop\StabilityMatrix-win-x64\Data\Packages\ComfyUI\venv\lib\site-packages\torchsde_brownian\brownian_interval.py:599: UserWarning: Should have ta>=t0 but got ta=0.02916753850877285 and t0=0.029168.
warnings.warn(f"Should have ta>=t0 but got ta={ta} and t0={self.start}.")
100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 25/25 [00:04<00:00, 5.74it/s]
ERROR:root:!!! Exception during processing !!!
ERROR:root:Traceback (most recent call last):
Prompt executed in 10.36 seconds
File "C:\Users\User\Desktop\StabilityMatrix-win-x64\Data\Packages\ComfyUI\execution.py", line 153, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
File "C:\Users\User\Desktop\StabilityMatrix-win-x64\Data\Packages\ComfyUI\execution.py", line 83, in get_output_data
return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
File "C:\Users\User\Desktop\StabilityMatrix-win-x64\Data\Packages\ComfyUI\execution.py", line 76, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
File "C:\Users\User\Desktop\StabilityMatrix-win-x64\Data\Packages\ComfyUI\custom_nodes\ComfyUI-SVD\comfyui_svd.py", line 140, in generate
model = load_model(
File "C:\Users\User\Desktop\StabilityMatrix-win-x64\Data\Packages\ComfyUI\custom_nodes\ComfyUI-SVD\comfyui_svd.py", line 83, in load_model
model = instantiate_from_config(config.model).to(device).eval()
File "C:\Users\User\Desktop\StabilityMatrix-win-x64\Data\Packages\ComfyUI\custom_nodes\ComfyUI-SVD\comfyui_svd.py", line 24, in instantiate_from_config
return get_obj_from_str(config["target"])(**config.get("params", dict()))
File "C:\Users\User\Desktop\StabilityMatrix-win-x64\Data\Packages\ComfyUI\custom_nodes\ComfyUI-SVD\comfyui_svd.py", line 16, in get_obj_from_str
return getattr(importlib.import_module(module, package=None), cls)
File "importlib_init
.py", line 126, in import_module
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 992, in _find_and_load_unlocked
File "", line 241, in _call_with_frames_removed
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 992, in _find_and_load_unlocked
File "", line 241, in _call_with_frames_removed
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1004, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'sgm'

kijai commented

Yeah I see the module is not installed, but I can't see from that why it didn't install. If you are using portable, manually adding pip packages needs to be done with the portable's own python (in the python_embeded folder).
There was a missing requirement that stopped it from installing to portable, I've fixed it but if you did the initial install (through manager?) before that it will fail.
Easiest possible fix would be to just reinstall the ComfyUI-SVD with the ComfyUI-manager.

You where right. I had to use the full path to my portable pip. Now its downloading the open_clip_pytorch_model.bin

Thanks U for you help