ComfyUI Will Use GPU 0 Only on Windows
Multiple NVIDIA GPUs detected. ComfyUI will use GPU 0 only on Windows by default. Use --cuda-device to select GPU 1, run two instances, or pass --cuda-device all --disable-pinned-memory.
If the terminal says Multiple NVIDIA GPUs detected. ComfyUI will use GPU 0 only on Windows by default. To restore all GPUs, pass --cuda-device all --disable-pinned-memory., that is a Windows startup notice, not proof that generation is broken.
For comfyui multi gpu, comfyui select gpu, comfyui use gpu 1, comfyui --cuda-device, or comfyui two gpus, the short answer is:
- one normal workflow usually stays on one selected GPU
- the practical way to use two GPUs is two ComfyUI instances on two ports
--cuda-deviceis the safest flag for "use GPU 1 instead of GPU 0"
Splitting one KSampler across cards is not something standard workflows do automatically.
Quick answer
| Goal | Best setup | Example |
|---|---|---|
| Use GPU 1 instead of GPU 0 | Start ComfyUI with --cuda-device 1 | python main.py --cuda-device 1 |
| Run two queues at once | Two instances on different ports | --cuda-device 0 --port 8188, --cuda-device 1 --port 8189 |
| Ignore the Windows GPU 0 notice | Often iGPU + dGPU; keep using GPU 0 | No flag needed if generation already uses the intended card |
| Restore all GPUs in one process | --cuda-device all --disable-pinned-memory | Only if a workflow or node needs every adapter visible |
| Keep all GPUs visible but prefer one | --default-device only if you know why | python main.py --default-device 1 |
| Split one KSampler across GPUs | Usually not supported by default | Use a model or node that explicitly supports it |
| Fix VRAM pressure | VRAM flags or smaller workflows | --lowvram, smaller resolution, quantized models |
Step 1: Check your GPUs
nvidia-smiThe GPU index is in the left column (first card usually 0, second 1). Then confirm PyTorch sees CUDA:
python -c "import torch; print(torch.cuda.device_count()); print(torch.cuda.get_device_name(0))"If device_count() returns 0, you have a PyTorch/CUDA install problem, not a multi-GPU one — start with GPU Compatibility.
Step 2: Choose one GPU with --cuda-device
For a manual install:
python main.py --cuda-device 1For the Windows portable package, edit or copy your launch .bat and add the flag after main.py:
.\python_embeded\python.exe -s ComfyUI\main.py --windows-standalone-build --cuda-device 1Per the official argument description, --cuda-device sets the CUDA device for the instance and hides the others from that process. ComfyUI may still print cuda:0 because the chosen GPU becomes the only visible one.
Step 3: Run two instances on two GPUs
Use different ports so the servers do not collide:
python main.py --cuda-device 0 --port 8188
python main.py --cuda-device 1 --port 8189Then open http://127.0.0.1:8188 and http://127.0.0.1:8189. This is the most reliable multi-GPU pattern: one queue per GPU.
Use separate user directories for serious parallel work
If both instances run daily, use separate --user-directory paths so browser state, workflow tabs, and settings do not fight each other:
python main.py --cuda-device 0 --port 8188 --user-directory user-gpu0
python main.py --cuda-device 1 --port 8189 --user-directory user-gpu1Step 4: Understand --default-device
--default-device sets the default device while keeping other devices visible. That is not automatic multi-GPU execution — use it only when a workflow, custom node, or advanced setup needs other devices to remain visible. For most users, --cuda-device is easier to reason about.
Step 5: Do not use multi GPU to hide a VRAM problem
If a workflow fails because one GPU runs out of VRAM, adding a second GPU usually will not make the same model fit. First try: reduce resolution, reduce batch size, close other GPU apps, use a quantized model, or start with --lowvram. See Python Out of Memory in ComfyUI.
Common mistakes
| Mistake | Why it fails | Better approach |
|---|---|---|
| Opening two browser tabs on the same server | Both tabs use the same process | Start a second process on another port |
Adding --cuda-device 1 in the wrong place | The flag is not passed to main.py | Put it after main.py |
| Expecting one workflow to split across two GPUs | Standard nodes run on one device | Use separate queues or specialized nodes |
Running two instances on port 8188 | Only one process can own the port | Use 8188 and 8189 |
| Installing CPU-only PyTorch | ComfyUI cannot use any NVIDIA GPU | Reinstall PyTorch with CUDA |
Verify
Start ComfyUI and read the startup log for your GPU name near the device line (Device: cuda:0 NVIDIA GeForce ...). Then watch nvidia-smi while generating. If you run two instances, queue a small workflow in each and confirm both GPUs show activity. If only one GPU is busy, check the browser port, whether both processes are running, whether each has a different --cuda-device, and whether the second process failed to bind its port.
Related Guides
- GPU Compatibility
- Python Out of Memory in ComfyUI
- ComfyUI Reconnecting Error
- ComfyUI Dependency Conflicts
Source References
Start free with Wonderful Launcher if this affects your real ComfyUI environment. It keeps launcher-native repair, task logs, and runtime checks in one place; credits are only for image generation and metered tools.
Download Wonderful LauncherSee credit packagesDid this fix your issue?
Your answer helps prioritize verified ComfyUI repairs.