comfyanonymous / ComfyUI

The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface.
https://www.comfy.org/
GNU General Public License v3.0
57.18k stars 6.05k forks source link

ModuleNotFoundError: No module named 'comfy.options' appeared after installing some custom nodes, now even a fresh install won't start. #2257

Open ricardofeynman opened 11 months ago

ricardofeynman commented 11 months ago

blah/ComfyUI$ python3 main.py

Traceback (most recent call last): File "/blah/ComfyUI/main.py", line 1, in import comfy.options ModuleNotFoundError: No module named 'comfy.options'

Running python3 main.py on a fresh ComfyUI install (tried Master branch and several older commits), the error is the same.

Any ideas? I need to get back to a project by tomorrow so I'm looking at a full OS reinstall tonight if I can't figure out the issue.

Thanks in advance for any suggestions.

Edit: Can provide logs of nodes I had just installed today before this occured, if it would be helpful?

comfyanonymous commented 11 months ago

Make sure you didn't accidentally delete the ComfyUI/comfy folder and that it looks like: https://github.com/comfyanonymous/ComfyUI/tree/master/comfy

ricardofeynman commented 11 months ago

First thing I did was test several fresh installs (of current and prior commits). Same error appears now with all fresh installs.

When I execute python3 main.py the error is now the first and only piece of information shown in the terminal.

comfyanonymous commented 11 months ago

If the comfy/options.py file exists that means there might be an issue with your python install.

ricardofeynman commented 11 months ago

Thanks for the speedy reply. Will try a python reinstall and report back.

ricardofeynman commented 11 months ago

Tried updating to 3.12.1+ and followed readme for the Pytorch nightly. Same issue persists. Was on 3.10.12 before so will test 3.11 to be certain, but the identical error message appears.

Fully updated mint xfce, updated install of python/pytorch to newest available nightly.

Edit: Attached is a txt file showing a fresh git clone of commit 1808 from 20 minutes ago. error.txt

ricardofeynman commented 11 months ago

Fully uninstalling python and installing 3.11.7 (and a whole bunch of other crap) has solved it.

No solid idea what caused the issue, just doing a routine install of some new custom node [ComfyUI-MagicAnimate] through the manager, but anyway disaster averted.

Thank you.

ricardofeynman commented 11 months ago

I went digging to find the culprit.

After removing the entire contents of site-packages and manually copying everything back. I discovered that the error I was experiencing is caused solely by the packages "comfy"/"comfy-0.0.1.dist-info"

Before the issues appeared yesterday I installed several custom nodes:

ComfyUI-MagicAnimate (insanely large 100GB+ install for a custom node with zero indication provided in the repo or manager!)

TinkerBot-tech-for-ComfyUI-Touchpad

Comfyui_Lama

SimpleWildcardsComfyUI

As_ComfyUI_CustomNodes

Will test when I have time later this evening to establish whether one of these 5 custom nodes installs "comfy"/"comfy-0.0.1.dist-info"

jtrue commented 11 months ago

Im having this same issue now after installing two loras and two model checkpoints but do not have a ""comfy-0.0.1.dist-info" file. I've tried updating everything through the comfy tools in the update folder but still no luck. When i start comfyui it tells me "ModuleNotFoundError: No module named 'comfy.options'"

I tried pip3 install options and it tells me it is already installed.

jtrue commented 11 months ago

Im having this same issue now after installing two loras and two model checkpoints but do not have a ""comfy-0.0.1.dist-info" file. I've tried updating everything through the comfy tools in the update folder but still no luck. When i start comfyui it tells me "ModuleNotFoundError: No module named 'comfy.options'"

I tried pip3 install options and it tells me it is already installed.

After much investigating I think i know why this error happens. There is a module called "comfy" available through pip3 and when i uninstall this module "pip3 uninstall comfy" my comfyui came back to life. Until that module is gone, the comfy.options call in main.py will go to the module instead of ComfyUI.

ricardofeynman commented 11 months ago

Glad you got it figured out.

I suspected it might have been MagicAnimate as the download process of its models started immediately after I removed comfy/comfy-0.0.1.dist-info, but there were a few other custom nodes that I had installed through the manager in the moments before restarting ComfyUI and being met with that error.

Did you happen to see any errors appear relating to any recently installed/updated custom nodes you use after you uninstalled "comfy"? I'm still uncertain where it originated.

ricardofeynman commented 10 months ago

@jtrue Did you perchance have ComfyUI_mozman_nodes installed? I had the same issue occur when I updated ComfyUI_mozman_nodes and some other custom nodes today, thankfully I knew what I was looking for this time in site-packages.

I'm not certain mozman was a custom I'd installed when I was enquiring previously, so perhaps several custom nodes collections install comfy/comfy-0.0.1.dist-info

The terminal suggests Marigold nodes are using comfy/comfy-0.0.1.dist-info in some way. Will test Marigold later to see if it was impacted even though no import failure when I deleted comfy/comfy-0.0.1.dist-info1 from site-packages for ComfyUI to work again and reloaded:

Updating: /blah/ComfyUI/custom_nodes/ComfyUI-Marigold Collecting comfy Using cached comfy-0.0.1-py3-none-any.whl (4.7 kB)

@comfyanonymous I'll ask the custom node devs about how their nodes rely on this package on their respective repos, but am wondering if you have any insight? I've now got most of the 350+ custom nodes installed via the manager and this one package is the only thing that seems to completely break ComfyUI for me.

dekura commented 10 months ago

Im having this same issue now after installing two loras and two model checkpoints but do not have a ""comfy-0.0.1.dist-info" file. I've tried updating everything through the comfy tools in the update folder but still no luck. When i start comfyui it tells me "ModuleNotFoundError: No module named 'comfy.options'" I tried pip3 install options and it tells me it is already installed.

After much investigating I think i know why this error happens. There is a module called "comfy" available through pip3 and when i uninstall this module "pip3 uninstall comfy" my comfyui came back to life. Until that module is gone, the comfy.options call in main.py will go to the module instead of ComfyUI.

Same error.

Fixed by this command pip3 uninstall comfy

Looks like some package linked the comfy package to other places.

mnight29 commented 10 months ago

2 つの lora と 2 つのモデル チェックポイントをインストールした後、同じ問題が発生しましたが、「comfy-0.0.1.dist-info」ファイルがありません。更新フォルダー内の快適なツールを使用してすべてを更新しようとしましたが、まだ更新できませんcomfyui を起動すると、「ModuleNotFoundError: 'comfy.options' という名前のモジュールがありません」と表示されます。 pip3 インストール オプションを試してみると、すでにインストールされていると表示されます。

いろいろ調べた結果、このエラーが発生する理由がわかった気がします。pip3 から利用できる「comfy」というモジュールがあり、このモジュール「pip3 uninstall cofy」をアンインストールすると、comfyui が復活しました。そのモジュールがなくなるまで、main.py の comfy.options 呼び出しは ComfyUI ではなくモジュールに行きます。

同じエラーです。

このコマンドで修正されました pip3 uninstall comfy

何かのパッケージが快適なパッケージを他の場所にリンクしているようです。

thank you for your information ,I fixed

Rasthish commented 9 months ago

How do I fix this? I have the same problem. ModuleNotFoundError: No Module named 'comfy.options' . I installed 3.11.7 python. I don't know how to delete modules, like you said do. I tried opening in terminal, but the "pip3 uninstall comfy" command returned: "warning: Skipping comfy as it is not installed". thank you

ricardofeynman commented 9 months ago

You need to find the "site-packages" folder, either under your system Python install, or the venv (virtual environment) folder containing Python in your Comfy install. Then remove the two comfy/comfy-0.0.1.dist-info folders as mentioned above. Hope that helps.

Rasthish commented 9 months ago

Thank you very much for your reply! Unfortunately, it ComfyUI still won't open. This is the response I get now. Any ideas? : Traceback (most recent call last): File "I:\ComfyUI\ComfyUI_windows_portable\ComfyUI\main.py", line 76, in import execution File "I:\ComfyUI\ComfyUI_windows_portable\ComfyUI\execution.py", line 11, in import nodes File "I:\ComfyUI\ComfyUI_windows_portable\ComfyUI\nodes.py", line 20, in import comfy.diffusers_load File "I:\ComfyUI\ComfyUI_windows_portable\ComfyUI\comfy\diffusers_load.py", line 3, in import comfy.sd File "I:\ComfyUI\ComfyUI_windows_portable\ComfyUI\comfy\sd.py", line 3, in from comfy import model_management File "I:\ComfyUI\ComfyUI_windows_portable\ComfyUI\comfy\model_management.py", line 118, in total_vram = get_total_memory(get_torch_device()) / (1024 * 1024) ^^^^^^^^^^^^^^^^^^ File "I:\ComfyUI\ComfyUI_windows_portable\ComfyUI\comfy\model_management.py", line 87, in get_torch_device return torch.device(torch.cuda.current_device()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "I:\ComfyUI\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\cuda__init.py", line 787, in current_device _lazy_init() File "I:\ComfyUI\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\cuda\init__.py", line 293, in _lazy_init raise AssertionError("Torch not compiled with CUDA enabled") AssertionError: Torch not compiled with CUDA enabled

I:\ComfyUI\ComfyUI_windows_portable>pause Press any key to continue . . .

olegpars commented 9 months ago

Thank you very much for your reply! Unfortunately, it ComfyUI still won't open. This is the response I get now. Any ideas? : Traceback (most recent call last): File "I:\ComfyUI\ComfyUI_windows_portable\ComfyUI\main.py", line 76, in import execution File "I:\ComfyUI\ComfyUI_windows_portable\ComfyUI\execution.py", line 11, in import nodes File "I:\ComfyUI\ComfyUI_windows_portable\ComfyUI\nodes.py", line 20, in import comfy.diffusers_load File "I:\ComfyUI\ComfyUI_windows_portable\ComfyUI\comfy\diffusers_load.py", line 3, in import comfy.sd File "I:\ComfyUI\ComfyUI_windows_portable\ComfyUI\comfy\sd.py", line 3, in from comfy import model_management File "I:\ComfyUI\ComfyUI_windows_portable\ComfyUI\comfy\model_management.py", line 118, in total_vram = get_total_memory(get_torch_device()) / (1024 * 1024) ^^^^^^^^^^^^^^^^^^ File "I:\ComfyUI\ComfyUI_windows_portable\ComfyUI\comfy\model_management.py", line 87, in get_torch_device return torch.device(torch.cuda.current_device()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "I:\ComfyUI\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\cudainit.py", line 787, in current_device _lazy_init() File "I:\ComfyUI\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\cudainit.py", line 293, in _lazy_init raise AssertionError("Torch not compiled with CUDA enabled") AssertionError: Torch not compiled with CUDA enabled

I:\ComfyUI\ComfyUI_windows_portable>pause Press any key to continue . . .

Hi! Did you manage to find a solution? Having a same problem.

I had a clean install that would not start without "--disable-cuda-malloc", after starting it with this argument i installed a comfyui manager and the AP-Workflow 8.0 with all the included nodes.

After that i got an error "ModuleNotFoundError: No module named 'comfy.options", fixed it by deleting comfy/comfy-0.0.1.dist-info folders as mentioned above. it fixed this problem, but now i'm stuck with this error:

C:\Users\AMT-WIN10\Comfyui\ComfyUI_windows_portable>.\python_embeded\python.exe -s ComfyUI\main.py --disable-cuda-malloc --windows-standalone-build Comfy Deploy Revision: ace12efd1a11e4e45bafed755960e4e748e356eb ComfyUI startup time: 2024-02-18 19:21:14.986114 Platform: Windows Python version: 3.11.6 (tags/v3.11.6:8b6ee5b, Oct 2 2023, 14:57:12) [MSC v.1935 64 bit (AMD64)] Python executable: C:\Users\AMT-WIN10\Comfyui\ComfyUI_windows_portable\python_embeded\python.exe Log path: C:\Users\AMT-WIN10\Comfyui\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-deploy\comfyui.log ←[34m[Maras IT] ←[92mInitialization←[0m Failed to execute startup-script: C:\Users\AMT-WIN10\Comfyui\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-prompt-extranetworks\prestartup_script.py / Torch not compiled with CUDA enabled Downloading SVD model: svd.safetensors... 'wget' is not recognized as an internal or external command, operable program or batch file. Downloading SVD model: svd_image_decoder.safetensors... 'wget' is not recognized as an internal or external command, operable program or batch file. Downloading SVD model: svd_xt.safetensors... 'wget' is not recognized as an internal or external command, operable program or batch file. Downloading SVD model: svd_xt_image_decoder.safetensors... 'wget' is not recognized as an internal or external command, operable program or batch file.

Prestartup times for custom nodes: 0.0 seconds: C:\Users\AMT-WIN10\Comfyui\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Marigold 0.0 seconds: C:\Users\AMT-WIN10\Comfyui\ComfyUI_windows_portable\ComfyUI\custom_nodes\rgthree-comfy 0.0 seconds: C:\Users\AMT-WIN10\Comfyui\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-MarasIT-Nodes 0.0 seconds: C:\Users\AMT-WIN10\Comfyui\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Manager 0.0 seconds: C:\Users\AMT-WIN10\Comfyui\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-MagicAnimate 0.1 seconds: C:\Users\AMT-WIN10\Comfyui\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-deploy 0.1 seconds: C:\Users\AMT-WIN10\Comfyui\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Stable-Video-Diffusion 1.8 seconds (PRESTARTUP FAILED): C:\Users\AMT-WIN10\Comfyui\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-prompt-extranetworks

Traceback (most recent call last): File "C:\Users\AMT-WIN10\Comfyui\ComfyUI_windows_portable\ComfyUI\main.py", line 76, in import execution File "C:\Users\AMT-WIN10\Comfyui\ComfyUI_windows_portable\ComfyUI\execution.py", line 11, in import nodes File "C:\Users\AMT-WIN10\Comfyui\ComfyUI_windows_portable\ComfyUI\nodes.py", line 20, in import comfy.diffusers_load File "C:\Users\AMT-WIN10\Comfyui\ComfyUI_windows_portable\ComfyUI\comfy\diffusers_load.py", line 3, in import comfy.sd File "C:\Users\AMT-WIN10\Comfyui\ComfyUI_windows_portable\ComfyUI\comfy\sd.py", line 3, in from comfy import model_management File "C:\Users\AMT-WIN10\Comfyui\ComfyUI_windows_portable\ComfyUI\comfy\model_management.py", line 118, in total_vram = get_total_memory(get_torch_device()) / (1024 * 1024) ^^^^^^^^^^^^^^^^^^ File "C:\Users\AMT-WIN10\Comfyui\ComfyUI_windows_portable\ComfyUI\comfy\model_management.py", line 87, in get_torch_device return torch.device(torch.cuda.current_device()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\AMT-WIN10\Comfyui\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\cuda__init.py", line 787, in current_device _lazy_init() File "C:\Users\AMT-WIN10\Comfyui\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\cuda\init__.py", line 293, in _lazy_init raise AssertionError("Torch not compiled with CUDA enabled") AssertionError: Torch not compiled with CUDA enabled

C:\Users\AMT-WIN10\Comfyui\ComfyUI_windows_portable>pause Press any key to continue . . .

Rasthish commented 9 months ago

No, I gave up. I reverted back to Automatic1111. good luck

puviarasud commented 6 months ago

delete python_embeded folder copy from new installation and try

ltdrdata commented 6 months ago

About this comfy.options issue:

You should uninstall comfy from pip. Coincidentally, there is a package called 'comfy' on pip, and there have been cases where it was installed by mistake. It causes name conflict issue.

ltdrdata commented 6 months ago

Thank you very much for your reply! Unfortunately, it ComfyUI still won't open. This is the response I get now. Any ideas? : Traceback (most recent call last): File "I:\ComfyUI\ComfyUI_windows_portable\ComfyUI\main.py", line 76, in import execution File "I:\ComfyUI\ComfyUI_windows_portable\ComfyUI\execution.py", line 11, in import nodes File "I:\ComfyUI\ComfyUI_windows_portable\ComfyUI\nodes.py", line 20, in import comfy.diffusers_load File "I:\ComfyUI\ComfyUI_windows_portable\ComfyUI\comfy\diffusers_load.py", line 3, in import comfy.sd File "I:\ComfyUI\ComfyUI_windows_portable\ComfyUI\comfy\sd.py", line 3, in from comfy import model_management File "I:\ComfyUI\ComfyUI_windows_portable\ComfyUI\comfy\model_management.py", line 118, in total_vram = get_total_memory(get_torch_device()) / (1024 * 1024) ^^^^^^^^^^^^^^^^^^ File "I:\ComfyUI\ComfyUI_windows_portable\ComfyUI\comfy\model_management.py", line 87, in get_torch_device return torch.device(torch.cuda.current_device()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "I:\ComfyUI\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\cudainit.py", line 787, in current_device _lazy_init() File "I:\ComfyUI\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\cudainit.py", line 293, in _lazy_init raise AssertionError("Torch not compiled with CUDA enabled") AssertionError: Torch not compiled with CUDA enabled I:\ComfyUI\ComfyUI_windows_portable>pause Press any key to continue . . .

Hi! Did you manage to find a solution? Having a same problem.

I had a clean install that would not start without "--disable-cuda-malloc", after starting it with this argument i installed a comfyui manager and the AP-Workflow 8.0 with all the included nodes.

After that i got an error "ModuleNotFoundError: No module named 'comfy.options", fixed it by deleting comfy/comfy-0.0.1.dist-info folders as mentioned above. it fixed this problem, but now i'm stuck with this error:

C:\Users\AMT-WIN10\Comfyui\ComfyUI_windows_portable>.\python_embeded\python.exe -s ComfyUI\main.py --disable-cuda-malloc --windows-standalone-build Comfy Deploy Revision: ace12efd1a11e4e45bafed755960e4e748e356eb ComfyUI startup time: 2024-02-18 19:21:14.986114 Platform: Windows Python version: 3.11.6 (tags/v3.11.6:8b6ee5b, Oct 2 2023, 14:57:12) [MSC v.1935 64 bit (AMD64)] Python executable: C:\Users\AMT-WIN10\Comfyui\ComfyUI_windows_portable\python_embeded\python.exe Log path: C:\Users\AMT-WIN10\Comfyui\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-deploy\comfyui.log ←[34m[Maras IT] ←[92mInitialization←[0m Failed to execute startup-script: C:\Users\AMT-WIN10\Comfyui\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-prompt-extranetworks\prestartup_script.py / Torch not compiled with CUDA enabled Downloading SVD model: svd.safetensors... 'wget' is not recognized as an internal or external command, operable program or batch file. Downloading SVD model: svd_image_decoder.safetensors... 'wget' is not recognized as an internal or external command, operable program or batch file. Downloading SVD model: svd_xt.safetensors... 'wget' is not recognized as an internal or external command, operable program or batch file. Downloading SVD model: svd_xt_image_decoder.safetensors... 'wget' is not recognized as an internal or external command, operable program or batch file.

Prestartup times for custom nodes: 0.0 seconds: C:\Users\AMT-WIN10\Comfyui\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Marigold 0.0 seconds: C:\Users\AMT-WIN10\Comfyui\ComfyUI_windows_portable\ComfyUI\custom_nodes\rgthree-comfy 0.0 seconds: C:\Users\AMT-WIN10\Comfyui\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-MarasIT-Nodes 0.0 seconds: C:\Users\AMT-WIN10\Comfyui\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Manager 0.0 seconds: C:\Users\AMT-WIN10\Comfyui\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-MagicAnimate 0.1 seconds: C:\Users\AMT-WIN10\Comfyui\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-deploy 0.1 seconds: C:\Users\AMT-WIN10\Comfyui\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Stable-Video-Diffusion 1.8 seconds (PRESTARTUP FAILED): C:\Users\AMT-WIN10\Comfyui\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-prompt-extranetworks

Traceback (most recent call last): File "C:\Users\AMT-WIN10\Comfyui\ComfyUI_windows_portable\ComfyUI\main.py", line 76, in import execution File "C:\Users\AMT-WIN10\Comfyui\ComfyUI_windows_portable\ComfyUI\execution.py", line 11, in import nodes File "C:\Users\AMT-WIN10\Comfyui\ComfyUI_windows_portable\ComfyUI\nodes.py", line 20, in import comfy.diffusers_load File "C:\Users\AMT-WIN10\Comfyui\ComfyUI_windows_portable\ComfyUI\comfy\diffusers_load.py", line 3, in import comfy.sd File "C:\Users\AMT-WIN10\Comfyui\ComfyUI_windows_portable\ComfyUI\comfy\sd.py", line 3, in from comfy import model_management File "C:\Users\AMT-WIN10\Comfyui\ComfyUI_windows_portable\ComfyUI\comfy\model_management.py", line 118, in total_vram = get_total_memory(get_torch_device()) / (1024 * 1024) ^^^^^^^^^^^^^^^^^^ File "C:\Users\AMT-WIN10\Comfyui\ComfyUI_windows_portable\ComfyUI\comfy\model_management.py", line 87, in get_torch_device return torch.device(torch.cuda.current_device()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\AMT-WIN10\Comfyui\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\cudainit.py", line 787, in current_device _lazy_init() File "C:\Users\AMT-WIN10\Comfyui\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\cudainit.py", line 293, in _lazy_init raise AssertionError("Torch not compiled with CUDA enabled") AssertionError: Torch not compiled with CUDA enabled

C:\Users\AMT-WIN10\Comfyui\ComfyUI_windows_portable>pause Press any key to continue . . .

Thank you very much for your reply! Unfortunately, it ComfyUI still won't open. This is the response I get now. Any ideas? : Traceback (most recent call last): File "I:\ComfyUI\ComfyUI_windows_portable\ComfyUI\main.py", line 76, in import execution File "I:\ComfyUI\ComfyUI_windows_portable\ComfyUI\execution.py", line 11, in import nodes File "I:\ComfyUI\ComfyUI_windows_portable\ComfyUI\nodes.py", line 20, in import comfy.diffusers_load File "I:\ComfyUI\ComfyUI_windows_portable\ComfyUI\comfy\diffusers_load.py", line 3, in import comfy.sd File "I:\ComfyUI\ComfyUI_windows_portable\ComfyUI\comfy\sd.py", line 3, in from comfy import model_management File "I:\ComfyUI\ComfyUI_windows_portable\ComfyUI\comfy\model_management.py", line 118, in total_vram = get_total_memory(get_torch_device()) / (1024 * 1024) ^^^^^^^^^^^^^^^^^^ File "I:\ComfyUI\ComfyUI_windows_portable\ComfyUI\comfy\model_management.py", line 87, in get_torch_device return torch.device(torch.cuda.current_device()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "I:\ComfyUI\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\cudainit.py", line 787, in current_device _lazy_init() File "I:\ComfyUI\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\cudainit.py", line 293, in _lazy_init raise AssertionError("Torch not compiled with CUDA enabled") AssertionError: Torch not compiled with CUDA enabled I:\ComfyUI\ComfyUI_windows_portable>pause Press any key to continue . . .

Hi! Did you manage to find a solution? Having a same problem.

I had a clean install that would not start without "--disable-cuda-malloc", after starting it with this argument i installed a comfyui manager and the AP-Workflow 8.0 with all the included nodes.

After that i got an error "ModuleNotFoundError: No module named 'comfy.options", fixed it by deleting comfy/comfy-0.0.1.dist-info folders as mentioned above. it fixed this problem, but now i'm stuck with this error:

C:\Users\AMT-WIN10\Comfyui\ComfyUI_windows_portable>.\python_embeded\python.exe -s ComfyUI\main.py --disable-cuda-malloc --windows-standalone-build Comfy Deploy Revision: ace12efd1a11e4e45bafed755960e4e748e356eb ComfyUI startup time: 2024-02-18 19:21:14.986114 Platform: Windows Python version: 3.11.6 (tags/v3.11.6:8b6ee5b, Oct 2 2023, 14:57:12) [MSC v.1935 64 bit (AMD64)] Python executable: C:\Users\AMT-WIN10\Comfyui\ComfyUI_windows_portable\python_embeded\python.exe Log path: C:\Users\AMT-WIN10\Comfyui\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-deploy\comfyui.log ←[34m[Maras IT] ←[92mInitialization←[0m Failed to execute startup-script: C:\Users\AMT-WIN10\Comfyui\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-prompt-extranetworks\prestartup_script.py / Torch not compiled with CUDA enabled Downloading SVD model: svd.safetensors... 'wget' is not recognized as an internal or external command, operable program or batch file. Downloading SVD model: svd_image_decoder.safetensors... 'wget' is not recognized as an internal or external command, operable program or batch file. Downloading SVD model: svd_xt.safetensors... 'wget' is not recognized as an internal or external command, operable program or batch file. Downloading SVD model: svd_xt_image_decoder.safetensors... 'wget' is not recognized as an internal or external command, operable program or batch file.

Prestartup times for custom nodes: 0.0 seconds: C:\Users\AMT-WIN10\Comfyui\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Marigold 0.0 seconds: C:\Users\AMT-WIN10\Comfyui\ComfyUI_windows_portable\ComfyUI\custom_nodes\rgthree-comfy 0.0 seconds: C:\Users\AMT-WIN10\Comfyui\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-MarasIT-Nodes 0.0 seconds: C:\Users\AMT-WIN10\Comfyui\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Manager 0.0 seconds: C:\Users\AMT-WIN10\Comfyui\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-MagicAnimate 0.1 seconds: C:\Users\AMT-WIN10\Comfyui\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-deploy 0.1 seconds: C:\Users\AMT-WIN10\Comfyui\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Stable-Video-Diffusion 1.8 seconds (PRESTARTUP FAILED): C:\Users\AMT-WIN10\Comfyui\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-prompt-extranetworks

Traceback (most recent call last): File "C:\Users\AMT-WIN10\Comfyui\ComfyUI_windows_portable\ComfyUI\main.py", line 76, in import execution File "C:\Users\AMT-WIN10\Comfyui\ComfyUI_windows_portable\ComfyUI\execution.py", line 11, in import nodes File "C:\Users\AMT-WIN10\Comfyui\ComfyUI_windows_portable\ComfyUI\nodes.py", line 20, in import comfy.diffusers_load File "C:\Users\AMT-WIN10\Comfyui\ComfyUI_windows_portable\ComfyUI\comfy\diffusers_load.py", line 3, in import comfy.sd File "C:\Users\AMT-WIN10\Comfyui\ComfyUI_windows_portable\ComfyUI\comfy\sd.py", line 3, in from comfy import model_management File "C:\Users\AMT-WIN10\Comfyui\ComfyUI_windows_portable\ComfyUI\comfy\model_management.py", line 118, in total_vram = get_total_memory(get_torch_device()) / (1024 * 1024) ^^^^^^^^^^^^^^^^^^ File "C:\Users\AMT-WIN10\Comfyui\ComfyUI_windows_portable\ComfyUI\comfy\model_management.py", line 87, in get_torch_device return torch.device(torch.cuda.current_device()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\AMT-WIN10\Comfyui\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\cudainit.py", line 787, in current_device _lazy_init() File "C:\Users\AMT-WIN10\Comfyui\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\cudainit.py", line 293, in _lazy_init raise AssertionError("Torch not compiled with CUDA enabled") AssertionError: Torch not compiled with CUDA enabled

C:\Users\AMT-WIN10\Comfyui\ComfyUI_windows_portable>pause Press any key to continue . . .

Generally, this issue occurs when the version of torch you have installed is not compatible with your GPU. You need to uninstall all torch-related packages and install a version of torch that is suitable for your environment.

Anze- commented 1 week ago

Not sure if relevant, but at least related: I had this issue when I ran pip install comfy. this installs an env package that has same name of the local package in comfy/, but has priority over it when imported. Such env package does not have an option module indeed and this will trigger the error "not found" even when the comfy/options.py file is present.

Therefore any custom node of which the requirements.txt states comfy or comfy=xx etc.. might reproduce this error when installed.

In my case the solution was simply to remove the package with pip remove comfy (making sure you are in the right env!)

ltdrdata commented 1 week ago

Not sure if relevant, but at least related: I had this issue when I ran pip install comfy. this installs an env package that has same name of the local package in comfy/, but has priority over it when imported. Such env package does not have an option module indeed and this will trigger the error "not found" even when the comfy/options.py file is present.

Therefore any custom node of which the requirements.txt states comfy or comfy=xx etc.. might reproduce this error when installed.

In my case the solution was simply to remove the package with pip remove comfy (making sure you are in the right env!)

Never install comfy package it will conflict with ComfyUI module.