But I got it working after fixing the venv path and replacing CPU-only PyTorch with CUDA PyTorch…
I’m posting this in case it helps anyone else with a similar custom Windows build.
I’m on a custom PC with an AMD system that has integrated graphics enabled, plus a dedicated NVIDIA GPU. In my case the main GPU is an NVIDIA GeForce RTX 5070 Ti, and Windows also sees the AMD iGPU. I’m not fully sure whether the AMD iGPU contributed to the initial confusion, but based on the logs it does not look like it was the direct root cause. The actual failures I found were in the Python environment setup and the PyTorch build that ComfyUI Desktop ended up using.
I was trying to install and launch ComfyUI Desktop v0.8.27 on Windows. The first error I got was:
Virtual Environment Creation Failed
Failed to create virtual environment
Error details:
spawn C:\Users\<user>\Documents\ComfyUI\.venv\Scripts\python.exe ENOENT
At first glance this looked like ComfyUI failed to create Python at all. But after checking the logs in:
C:\Users\<user>\AppData\Roaming\ComfyUI\logs
I found that uv venv actually succeeded, just in the wrong place. It created .venv under my home directory instead of inside my ComfyUI base directory.
From main.log, the sequence was basically:
Creating virtual environment at C:\Users\<user>\Documents\ComfyUI\.venv with python 3.12
Running uv command: ... uv.exe venv --python 3.12 --python-preference only-managed
Using CPython 3.12.12
Creating virtual environment at: .venv
Activate with: .venv\Scripts\activate
Running command: C:\Users\\Documents\ComfyUI\.venv\Scripts\python.exe -m ensurepip --upgrade
Error: spawn C:\Users\<user>\Documents\ComfyUI\.venv\Scripts\python.exe ENOENT
The important detail is that uv printed Creating virtual environment at: .venv, which meant it created the environment relative to the working directory it was launched from. In my case that ended up being C:\Users\, not C:\Users\\Documents\ComfyUI. So the venv existed, but in the wrong folder.
What I did to get past that stage was:
-
I verified that C:\Users\\.venv existed and that C:\Users\\Documents\ComfyUI\.venv did not.
-
I manually created the venv in the correct folder:
& "C:\Users\<user>\AppData\Local\Programs\ComfyUI\resources\uv\win\uv.exe" venv --python 3.12 --python-preference only-managedwhile my working directory was:
C:\Users\<user>\Documents\ComfyUI -
I confirmed this file existed afterward:
C:\Users\<user>\Documents\ComfyUI\.venv\Scripts\python.exe -
I also ran:
C:\Users\<user>\Documents\ComfyUI\.venv\Scripts\python.exe -m ensurepip --upgrade
After that, ComfyUI Desktop got further, and the maintenance page started showing everything as OK. But the app still failed to start.
At that point the error changed. The new failure was in comfyui.log, and it was:
AssertionError: Torch not compiled with CUDA enabled
The relevant traceback came from ComfyUI trying to do:
torch.cuda.current_device()
I verified that my NVIDIA GPU was actually available in Windows by running:
nvidia-smi
That showed my RTX 5070 Ti correctly, so this was not a case of “no GPU present”.
Then I checked the PyTorch install inside the ComfyUI venv and found:
torch 2.11.0+cpu
cuda None
available False
So the second real issue was that the ComfyUI environment had installed a CPU-only PyTorch build, even though this machine has a valid NVIDIA GPU and drivers.
What fixed the startup problem for me was replacing the CPU-only PyTorch packages with the official CUDA wheels. I used the ComfyUI venv’s Python and installed the CUDA 12.8 packages:
C:\Users\<user>\Documents\ComfyUI\.venv\Scripts\python.exe -m pip install --upgrade --force-reinstall --no-cache-dir --index-url https://download.pytorch.org/whl/cu128 torch torchvision torchaudio
After that, I verified the environment again and got:
torch 2.11.0+cu128
cuda 12.8
available True
device_count 1
device0 NVIDIA GeForce RTX 5070 Ti
I also manually launched the same server command ComfyUI Desktop uses, and it stayed up successfully. The output included:
pytorch version: 2.11.0+cu128
Device: cuda:0 NVIDIA GeForce RTX 5070 Ti
Total VRAM 16303 MB
There was still one warning:
WARNING: You need pytorch with cu130 or higher to use optimized CUDA operations.
But that warning did not block startup. It only meant some newer optimized CUDA paths were disabled. The app could still initialize correctly.
So, from my testing, the successful resolution was:
-
Fix the venv location so Desktop uses:
C:\Users\<user>\Documents\ComfyUI\.venvinstead of accidentally creating .venv under:
C:\Users\<user> -
Replace CPU-only torch with CUDA-enabled torch inside the ComfyUI venv.
My current best guess is that the AMD iGPU was not the direct cause. The logs point much more strongly to:
-
a working-directory/path problem during venv creation, and
-
ComfyUI Desktop ending up with a CPU PyTorch build instead of a CUDA build.