-
Notifications
You must be signed in to change notification settings - Fork 7.4k
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
AssertionError: Torch not compiled with CUDA enabled #2427
Comments
It looks like you somehow ended up updating PyTorch automatically, which got you the default version. This version does not have CUDA support, meaning it has no GPU acceleration. Assuming you have an Nvidia GPU, try running this command in that directory:
This should install a CUDA-compatible version of PyTorch. |
Hi! |
Actually you need to run the |
Thanks narukaze132! I had the same problem after updating ComfyUI and doing what you said solved the issue |
in my case worked only after running update_comfyui_and_python_dependencies.bat |
Same for me |
This worked for me as well... =] |
Worked for me! |
I am running comfyui through stability matrix. How would I fix this error? |
This is the way... MANY THANKS!!! |
Where is that bat file located? I can't find it in scripts. |
yes where are these update_comfyui_and_python_dependencies.bat hidden within ComfyUI_windows_portable ? |
yes where are these update_comfyui_and_python_dependencies.bat hidden within ComfyUI_windows_portable ? ok I got it , they are within C:\ComfyUI_windows_portable\update |
hel me i try but nothing happen ComfyUI-Manager: installing dependencies done.[2024-06-30 23:35] ** ComfyUI startup time: 2024-06-30 23:35:54.490675 |
Great! It works for me when I tried it twice. It failed first time, but worked second time. |
when running through matrix, you'll have to ask the matrix team how to deal with that, as they did not use the comfy standard install they did their own thing |
For proble worng path python like me,
|
D:\ComfyUI_windows_portable\python_embeded\Scripts>.\python_embeded install --force-reinstall torch --index-url https://download.pytorch.org/whl/cu118 |
how do i run the pip program there? I tried this: D:\ComfyUI_windows_portable\python_embeded\Scripts>.\python_embeded install --force-reinstall torch --index-url https://download.pytorch.org/whl/cu118 RESULT: |
You have to execute that command in |
D:\ComfyUI_windows_portable>.\python_embeded install --force-reinstall torch --index-url https://download.pytorch.org/whl/cu118 D:\ComfyUI_windows_portable> |
wait nvm i went to root of windows portable and pasted the following in and now its doing something: .\python_embeded\python.exe -s -m pip install --force-reinstall torch --index-url https://download.pytorch.org/whl/cu118 |
Changing only the torch version causes compatibility issues with other packages, leading to problems. Always get the commands from this site: |
now its stuck on: Installing collected packages: mpmath, typing-extensions, sympy, networkx, MarkupSafe, fsspec, filelock, jinja2, torch and hasnt progressed past that. so while i wait i tried to double click the run_nvidia_gpu file and it all it says is: D:\ComfyUI_windows_portable>.\python_embeded\python.exe -s ComfyUI\main.py --windows-standalone-build |
D:\ComfyUI_windows_portable> .\python_embeded\python.exe -s -m pip install --force-reinstall torch --index-url https://download.pytorch.org/whl/cu118 |
Thanks. I don't know why i didn't see it earlier that it was just going to the folder first and would work for me even in the root folder of comyfui. moving to CMD to ComfyUI_windows_portable\python_embeded\Scripts folder and just running: |
pip install --force-reinstall torch --index-url https://download.pytorch.org/whl/cu118 Did not work because it could not find cu118 |
@serget2 Why installing cu118 instead of cu124? https://github.com/comfyanonymous/ComfyUI?tab=readme-ov-file#nvidia |
That is what agitechs command said |
@serget2 The cuda version is outdated, use this command instead:
|
Got it for the portable version you need to put python.exe -m pip in front of your command, now it works |
Absolute legend! Thanks! |
For Windows portable, go to the For example, my directory is Instead of using conda activate, I have to specifically use this python.exe file IN this folder, otherwise ComfyUI likely aint got time for dat.
Magic Portable Version words to type in the Command Prompt in
|
I just updated Comfyui and some custom nodes and cannot open Comfyui.
The last lines of the command :
File "C:\Users\Luna\Documents\ComfyUI_windows_portable\python_embeded\lib\site-packages\torch\cuda_init_.py", line 289, in _lazy_init
raise AssertionError("Torch not compiled with CUDA enabled")
AssertionError: Torch not compiled with CUDA enabled
C:\Users\cebuk\Documents\ComfyUI_windows_portable>pause
Press any key to continue . . .
I press any key and the command window disappears.
The text was updated successfully, but these errors were encountered: