torch.cuda.is_available() is False: inspect the build, driver and runtime context
For an intended NVIDIA workload, False only says that this process cannot use CUDA. Check the build, device visibility and driver rather than treating it as a complete diagnosis.
Symptoms and scope
For an intended NVIDIA workload, False only says that this process cannot use CUDA. Check the build, device visibility and driver rather than treating it as a complete diagnosis.
Error fragments for search; IDs, values and filenames may vary:
torch.cuda.is_available() = False
Found no NVIDIA driver
Source-supported context
PyTorch's installation instructions include backend selection and availability checks. ComfyUI troubleshooting separates GPU-environment failures from CPU execution. PyTorch uses the torch.cuda availability API for both CUDA and ROCm builds; NVIDIA documents that container GPU visibility depends on runtime assignment. Source 1 Source 2 Source 3 Source 4
Cases to distinguish
1. The Torch build lacks CUDA, or the check ran in the wrong Python.
2. The host driver is unavailable, or a container/remote instance was not assigned a GPU.
3. A launcher setting or environment variable hides the device, or the hardware uses another backend.
Diagnostic sequence
The sequence below is an editorial procedure based on the cited context, not a diagnosis already confirmed for your environment.
Step 1. In the actual ComfyUI interpreter, print sys.executable, torch.version, torch.version.cuda, torch.version.hip and torch.cuda.is_available(); distinguish the selected build from device initialization.
Step 2. On NVIDIA systems, check nvidia-smi on the host and, where applicable, in the GPU-assigned container. If the host sees the device but the container does not, inspect its GPU assignment and runtime before changing the host driver.
Step 3. Review device selection in the launcher or service and preserve original values. Do not unconditionally remove every environment variable.
Step 4. Restore a documented supported combination and run a minimal tensor operation and baseline workflow.
Completion check
The same Python and service context see and actually use the intended device. True in a different terminal does not establish that the service was repaired.
Limitations and cautions
PyTorch ROCm intentionally reuses torch.cuda APIs. Check torch.version.hip and the actual hardware before treating a None CUDA version or the API name as proof of a CPU-only build. Apple and Intel have different backend checks. PyTorch HIP semantics
Original sources
- PyTorch local installation — checked 2026-09-25.
- ComfyUI troubleshooting overview — checked 2026-09-25.
- PyTorch HIP (ROCm) semantics — checked 2026-09-25.
- NVIDIA Container Toolkit GPU enumeration — checked 2026-09-25.
Sources and English wording rechecked 2026-09-25. No GPU run, minimum-memory measurement or runtime guarantee is supplied.
Related troubleshooting and guides
Was this page helpful?
Anonymous. Only a yes/no counter is stored; no account, IP address or device details.
Sources & references
PyTorch installation/HIP, ComfyUI troubleshooting and NVIDIA container GPU-enumeration documentation rechecked 2026-09-25. Diagnostic sequence is editorial guidance; no GPU or container run was performed.
01PyTorch local installationSource checked: 2026-09-2502ComfyUI troubleshooting overviewSource checked: 2026-09-2503PyTorch HIP (ROCm) semanticsSource checked: 2026-09-2504NVIDIA Container Toolkit GPU enumerationSource checked: 2026-09-25