Cuda Version - ComfyUI?
Your question
Hi 1- Which version of cuda is the right one for comfyui, always the latest one? 2- Some custom nodes are incompatible with certain versions of cuda and for this reason some of them stop working (import failed in comfyui Manager) ? 3- How do I update the cuda version in comfyUI?
Logs
No response
Other
No response
-
Check the NVIDIA section in the readme file: https://github.com/comfyanonymous/ComfyUI?tab=readme-ov-file#nvidia
-
I'm not sure to be honest, I've never experienced any problem with the latest cuda version of Pytorch. You can check in the custom node repository if they need a specific cuda version, but most of the time the import failed issue comes from other packages.
-
If you are using the portable version of ComfyUI, you need to open terminal inside
python_embededfolder and run this command:
.\python.exe -m pip install --upgrade torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu124
This will upgrade your pytorch to the latest stable version with cuda 12.4 (as currently recommended in the link above).
ComfyUI always aims to support the latest version of PyTorch whenever possible.
However, this does not mean that backward compatibility is excluded.
The installation package is distributed with a specific version of PyTorch for installation convenience, based on the most widely used environment.
Nonetheless, using a different version of PyTorch is entirely up to the user. At a minimum, all versions from PyTorch 1.9 and above are compatible
- If you are using the portable version of ComfyUI, you need to open terminal inside
python_embededfolder and run this command:.\python.exe -m pip install --upgrade torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu124This will upgrade your pytorch to the latest stable version with cuda 12.4 (as currently recommended in the link above).
Hi A lot of thanks for your help LukeG89 and the creator ltdrdata. Yes; I am on the portable version of ComfyUI,. I have applied the command and the 2.3 GB cuda model and other items have been installed. Everything is fine except for a message in red that I copied but could not paste (when copying the translator message after I lost its priority....). And yes, the import failed of some custom nodes continue after the cuda update, there must be other mysterious reasons. Many thanks to both of you
I got this "red error" so maybe helpful to anyone in the future:
"ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. xformers 0.0.28.post3 requires torch==2.5.1, but you have torch 2.6.0+cu124 which is incompatible."
While still in my "python_embeded" folder I ran this command:
pip install --upgrade xformers
Started ComfyUI and no errors, so maybe it worked? Hope this helps.