LogoWonderful Launcher
  • Home
  • Pricing
  • Docs
  • Download

Torch Not Compiled With CUDA Enabled in ComfyUI

Needs verification

Fix the ComfyUI "Torch not compiled with CUDA enabled" error by checking the active Python, PyTorch CUDA build, NVIDIA driver, launch path, and dependency drift.

Start with Wonderful Launcher if this issue touches your real ComfyUI environment. Use the docs to understand the fix, and use the app to inspect the machine you already have.

Download Wonderful Launcher

If ComfyUI shows Torch not compiled with CUDA enabled, the Python environment that launched ComfyUI cannot use CUDA through PyTorch.

That usually means one of four things:

  • ComfyUI is running with CPU-only Torch.
  • You launched the wrong portable batch file or wrong virtual environment.
  • A custom node install replaced the working GPU build of torch.
  • Your NVIDIA driver is too old for the CUDA build you installed.

Do the checks below in order. Do not keep installing random plugin requirements until the core runtime is green again.

Quick diagnosis

CheckCommandWhat good looks like
GPU visible to Windowsnvidia-smiShows your NVIDIA GPU and driver version
Torch buildpython -c "import torch; print(torch.__version__); print(torch.version.cuda)"Version does not end in +cpu, CUDA is not None
CUDA availablepython -c "import torch; print(torch.cuda.is_available())"Prints True
Correct launch pathPortable users run run_nvidia_gpu.batYou are not launching the CPU batch or a different Python

If nvidia-smi works but torch.cuda.is_available() is False, your driver can see the GPU, but the Python environment cannot use it through PyTorch.

Step 1: Test the same Python that launches ComfyUI

The most common mistake is testing one Python and launching ComfyUI with another.

Windows portable

Open Command Prompt inside the portable folder and run:

.\python_embeded\python.exe -c "import torch; print('torch', torch.__version__); print('cuda build', torch.version.cuda); print('cuda available', torch.cuda.is_available()); print('device', torch.cuda.get_device_name(0) if torch.cuda.is_available() else 'none')"

Then make sure you start ComfyUI with:

run_nvidia_gpu.bat

If you use run_cpu.bat, CUDA will not be used even when the GPU driver is healthy.

Manual install or venv

Activate the environment you use for ComfyUI, then run:

python -c "import torch; print('torch', torch.__version__); print('cuda build', torch.version.cuda); print('cuda available', torch.cuda.is_available()); print('device', torch.cuda.get_device_name(0) if torch.cuda.is_available() else 'none')"
python -m pip show torch torchvision torchaudio
python -m pip check

If torch.version.cuda is None, or the version shows +cpu, you are on a CPU-only PyTorch build.

Step 2: Check the NVIDIA driver before reinstalling Torch

Run:

nvidia-smi

If the command is missing or cannot see your GPU, fix the driver first. Updating PyTorch will not help if the operating system cannot expose the GPU.

If nvidia-smi works, compare your setup with the current ComfyUI package or install guide before reinstalling packages. Portable releases can change their bundled Python, PyTorch, and CUDA combination over time, so the repair command must match the environment you actually installed.

  • New NVIDIA GPUs usually need a recent CUDA-enabled PyTorch build.
  • Older custom nodes may lag behind the newest Python or PyTorch stack.
  • Newer ComfyUI features can need newer PyTorch builds than an old portable folder has installed.

For a clean repair, first decide whether you are fixing the existing environment or moving to a fresh ComfyUI package whose Python, CUDA, and PyTorch versions already match your GPU.

Step 3: Repair PyTorch in the correct environment

Use the PyTorch selector for the latest command that matches your OS, package manager, Python version, and GPU. The examples below show common NVIDIA paths, but the selector should be your source of truth when versions change.

Example NVIDIA path: CUDA 13.0

Use this only when the PyTorch selector says it matches your Python version, platform, and driver/GPU target.

python -m pip uninstall -y torch torchvision torchaudio xformers
python -m pip install --upgrade pip
python -m pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu130
python -m pip install -r requirements.txt

Compatibility fallback: CUDA 12.8

python -m pip uninstall -y torch torchvision torchaudio xformers
python -m pip install --upgrade pip
python -m pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu128
python -m pip install -r requirements.txt

Older GPU fallback: CUDA 12.6

python -m pip uninstall -y torch torchvision torchaudio xformers
python -m pip install --upgrade pip
python -m pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu126
python -m pip install -r requirements.txt

After reinstalling, verify again:

python -c "import torch; print(torch.__version__); print(torch.version.cuda); print(torch.cuda.is_available())"

Do not reinstall xformers until ComfyUI starts successfully. If there is no verified xformers wheel for your Python, Torch, and CUDA combination, launch ComfyUI with --use-pytorch-cross-attention instead.

Step 4: If a custom node caused it

If the error appeared right after installing a custom node, treat it as dependency drift:

  1. Save the error log before changing more packages.
  2. Check what changed: python -m pip check and python -m pip show torch.
  3. Repair torch, torchvision, and torchaudio first.
  4. Reinstall the custom node only after confirming CUDA works.
  5. Use --no-deps for packages that try to pull their own Torch build, then install only the missing package versions you actually need.

See ComfyUI Dependency Conflicts and Installed Custom Nodes and Broke ComfyUI? before continuing with plugin repairs.

What not to do

  • Do not install the CUDA Toolkit first unless a package specifically needs compilation. PyTorch wheels bundle the CUDA runtime they need for normal use.
  • Do not trust nvidia-smi alone. It proves the driver sees the GPU, not that PyTorch can use CUDA.
  • Do not run pip install -r requirements.txt from random custom nodes until the core runtime is fixed.
  • Do not mix the portable embedded Python with a global Python install.
  • Do not keep submitting the same broken command if the error says "No matching distribution"; your Python version or wheel index may not support that combo.

When reinstalling is faster

Repair is worth trying when the environment only has a bad Torch build. A clean portable package is faster when:

  • multiple core packages were downgraded
  • pip check shows many hard conflicts
  • you do not know which Python launches ComfyUI
  • you need a stable baseline for RTX 50-series or older GTX hardware

Use ComfyUI Portable for a clean Windows baseline, or Manual Install when you need full control over Python and GPU packages.

Related guides

  • ComfyUI GPU Compatibility
  • ComfyUI Dependency Conflicts
  • ComfyUI Startup Failed? How to Diagnose and Recover Faster
  • Installed Custom Nodes and Broke ComfyUI? Recover Without Reinstalling
  • ComfyUI Common Issues and Fast Fixes

Best next step

If CUDA worked before and broke after plugin or environment changes, start by repairing the active Python environment. If this keeps happening, Wonderful Launcher is the safer path for preserving existing workflows, models, and recovery notes. If the machine is still blocked, use expert help instead of continuing random package repairs.

Source References

  • ComfyUI system requirements
  • ComfyUI troubleshooting overview
  • PyTorch Start Locally installer
  • PyTorch previous versions
  • NVIDIA driver downloads

Start with Wonderful Launcher if this issue touches your real ComfyUI environment. Use the docs to understand the fix, and use the app to inspect the machine you already have.

Download Wonderful Launcher
Related guides:Fix dependency conflictsRecover startup failuresCustom nodes broke the environment

Start with Wonderful Launcher if this issue touches your real ComfyUI environment. Use the docs to understand the fix, and use the app to inspect the machine you already have.

Download Wonderful Launcher

Did this fix your issue?

Your answer helps prioritize verified ComfyUI repairs.

Table of Contents

Quick diagnosis
Step 1: Test the same Python that launches ComfyUI
Windows portable
Manual install or venv
Step 2: Check the NVIDIA driver before reinstalling Torch
Step 3: Repair PyTorch in the correct environment
Example NVIDIA path: CUDA 13.0
Compatibility fallback: CUDA 12.8
Older GPU fallback: CUDA 12.6
Step 4: If a custom node caused it
What not to do
When reinstalling is faster
Related guides
Best next step
Source References