LogoWonderful Launcher
  • Home
  • Pricing
  • Docs
  • Download

ComfyUI Will Use GPU 0 Only on Windows

Partially verifiedLow riskTested on Windows 10, Windows 11 | portable | Python 3.11+ | CUDA 12.x | Torch 2.x | ComfyUI multi-GPU flag usage and multi-instance port patternLast verified 2026-06-29Estimated time 5-15 minutes

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-device is 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

GoalBest setupExample
Use GPU 1 instead of GPU 0Start ComfyUI with --cuda-device 1python main.py --cuda-device 1
Run two queues at onceTwo instances on different ports--cuda-device 0 --port 8188, --cuda-device 1 --port 8189
Ignore the Windows GPU 0 noticeOften iGPU + dGPU; keep using GPU 0No flag needed if generation already uses the intended card
Restore all GPUs in one process--cuda-device all --disable-pinned-memoryOnly if a workflow or node needs every adapter visible
Keep all GPUs visible but prefer one--default-device only if you know whypython main.py --default-device 1
Split one KSampler across GPUsUsually not supported by defaultUse a model or node that explicitly supports it
Fix VRAM pressureVRAM flags or smaller workflows--lowvram, smaller resolution, quantized models

Step 1: Check your GPUs

nvidia-smi

The 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 1

For 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 1

Per 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 8189

Then 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-gpu1

Step 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

MistakeWhy it failsBetter approach
Opening two browser tabs on the same serverBoth tabs use the same processStart a second process on another port
Adding --cuda-device 1 in the wrong placeThe flag is not passed to main.pyPut it after main.py
Expecting one workflow to split across two GPUsStandard nodes run on one deviceUse separate queues or specialized nodes
Running two instances on port 8188Only one process can own the portUse 8188 and 8189
Installing CPU-only PyTorchComfyUI cannot use any NVIDIA GPUReinstall 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

  • ComfyUI command-line arguments source
  • ComfyUI system requirements
  • PyTorch CUDA package notes

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 packages

Did this fix your issue?

Your answer helps prioritize verified ComfyUI repairs.

Table of Contents

Quick answer
Step 1: Check your GPUs
Step 2: Choose one GPU with --cuda-device
Step 3: Run two instances on two GPUs
Step 4: Understand --default-device
Step 5: Do not use multi GPU to hide a VRAM problem
Common mistakes
Verify
Related Guides
Source References