Nuked88 / ComfyUI-N-Nodes

A suite of custom nodes for ConfyUI that includes GPT text-prompt generation, LoadVideo, SaveVideo, LoadFramesFromFolder and FrameInterpolator
MIT License
206 stars 22 forks source link

ModuleNotFoundError: No module named 'model' #21

Closed tholonia closed 11 months ago

tholonia commented 12 months ago

After installing and restarting, it compiles, but fails on

[ComfyUI] Traceback (most recent call last):
[ComfyUI]   File "/home/jw/store/src/stable-diffusion-webui_rt/extensions/sd-webui-comfyui/comfyui_custom_nodes/ComfyUI-N-Nodes/__init__.py", line 45, in <module>
    spec.loader.exec_module(module)
[ComfyUI]   File "<frozen importlib._bootstrap_external>", line 883, in exec_module
[ComfyUI]   File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
[ComfyUI]   File "/home/jw/store/src/stable-diffusion-webui_rt/extensions/sd-webui-comfyui/comfyui_custom_nodes/ComfyUI-N-Nodes/py/frame_interpolator_node.py", line 21, in <module>
    from model.pytorch_msssim import ssim_matlab
[ComfyUI] ModuleNotFoundError: No module named 'model'

Do I need to add some specific path to sys.path.append(), or is there another solution?

Also, it appears not to be the case that "For uninstallation:Delete the ComfyUI-N-Nodes folder in custom_nodes", because I have deleted this folder but still get the error message:

[ComfyUI] Traceback (most recent call last):
  File "/home/jw/store/src/stable-diffusion-webui_rt/extensions/sd-webui-comfyui/ComfyUI/nodes.py", line 1800, in load_custom_node
    module_spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 879, in exec_module
  File "<frozen importlib._bootstrap_external>", line 1016, in get_code
  File "<frozen importlib._bootstrap_external>", line 1073, in get_data
FileNotFoundError: [Errno 2] No such file or directory: '/home/jw/store/src/stable-diffusion-webui_rt/extensions/sd-webui-comfyui/ComfyUI/custom_nodes/ComfyUI-N-Nodes/__init__.py'

[ComfyUI] Cannot import /home/jw/store/src/stable-diffusion-webui_rt/extensions/sd-webui-comfyui/ComfyUI/custom_nodes/ComfyUI-N-Nodes module for custom nodes: [Errno 2] No such file or directory: '/home/jw/store/src/stable-diffusion-webui_rt/extensions/sd-webui-comfyui/ComfyUI/custom_nodes/ComfyUI-N-Nodes/__init__.py'

I edited manually:

./ComfyUI/custom_nodes/ComfyUI-Manager/node_db/new/extension-node-map.json
./ComfyUI/custom_nodes/ComfyUI-Manager/extension-node-map.json
./ComfyUI/custom_nodes/ComfyUI-Manager/custom-node-list.json

and recursively wiped all pycache folders, and there is still the load on error as it looks for ComfyUI-N-Nodes. Any idea how to completely delete it?

Nuked88 commented 12 months ago

Hi, go in ComfyUI/web/extensions, probably there is still the "comfyui-n-nodes" folder there

BTW : about "/home/jw/store/src/stable-diffusion-webui_rt/extensions/sd-webui-comfyui/comfyui_custom_nodes/ComfyUI-N-Nodes/py/frame_interpolator_node.py" The folder structure is completly wrong xD

You should have ComfyUI-N-Nodes in /ComfyUI/custom_nodes otherwise it will never work!

tholonia commented 12 months ago

Thanks for the prompt reply. Yes, it does look like a wonky folder, however, it is a legit folder when ComfyUI is installed as a repository service in A1111. Most of you're nodes worked fine. The only one I ran into trouble with was frame_interpolator, so the libs are OK for most, but this one 'models' issue is the mystery. I will check ComfyUI/web/ when I try to install/deinstall it again. For now, I rolled back to an earlier version before I started testing your node.

Nuked88 commented 11 months ago

Ohh i didn't know that possible usage of comfyui in A1111! I should try that when i have time. About the models issue: models is a folder that should be inside ComfyUI-N-Nodes/libs/rifle. Since frame_interpolator_node.py needs to use that folderusing a not normal comfyui installation will make the installer unable to clone the RIFLE repo and the RIFLE models inside the libs/rifle folder leading an error that make the starting of frameinterpolator fail. You can try to install my node in a normal ComfyUI installation and copy the node folder after the first start. But i cannot assure that it will work!