LogoWonderful Launcher
  • Home
  • Pricing
  • Docs
  • Download
Multi GPUPricing & Credits Explained
Reference

ComfyUI Multi GPU: Use GPU 1 or Run Two Instances

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-04Estimated time 5-15 minutes

Use ComfyUI with multiple GPUs safely: choose a GPU with --cuda-device, run separate ComfyUI instances, and avoid workflow-splitting assumptions.

ComfyUI can run on a specific GPU, and you can run multiple ComfyUI instances on different GPUs.

If you searched for comfyui multi gpu, the short answer is:

  • one normal workflow usually stays on one selected GPU
  • the practical way to use two GPUs is usually two ComfyUI instances on two ports
  • --cuda-device is the safest flag for "use GPU 1 instead of GPU 0"

Most users get the best result by assigning one ComfyUI instance to one GPU and another instance to another GPU, rather than expecting one KSampler to split itself across cards.

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 the same timeStart two ComfyUI instances on different ports--cuda-device 0 --port 8188, --cuda-device 1 --port 8189
Keep all GPUs visible but prefer oneUse --default-device only if you know whypython main.py --default-device 1
Make one KSampler split across GPUsUsually not supported by defaultUse a model or node that explicitly supports it
Fix VRAM pressureUse VRAM flags or smaller workflows--lowvram, smaller resolution, quantized models

What Multi GPU Means in ComfyUI

There are three different ideas people mix together:

  1. Choosing one GPU: ComfyUI runs on a selected device.
  2. Running multiple instances: two browser sessions, two ports, two queues, two GPUs.
  3. Splitting one workflow across GPUs: a single model or workflow uses more than one GPU at the same time.

The first two are practical. The third is not something most standard ComfyUI workflows do automatically.

Step 1: Check Your GPUs

On Windows or Linux with NVIDIA GPUs, run:

nvidia-smi

Look for the GPU index in the left column. The first card is usually 0, the second is usually 1.

Then confirm PyTorch can see CUDA:

python -c "import torch; print(torch.cuda.device_count()); print(torch.cuda.get_device_name(0))"

If torch.cuda.device_count() returns 0, you do not have a multi-GPU problem yet. You have a PyTorch/CUDA install problem. 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 file and add the flag after main.py:

.\python_embeded\python.exe -s ComfyUI\main.py --windows-standalone-build --cuda-device 1

The official ComfyUI argument description says --cuda-device sets the CUDA device this instance will use and hides the others from that process.

That means ComfyUI may still print cuda:0 inside the selected process. This can be normal because the chosen GPU becomes the only visible GPU to that process.

Step 3: Run Two Instances on Two GPUs

Use different ports so the two servers do not collide.

Instance A:

python main.py --cuda-device 0 --port 8188

Instance B:

python main.py --cuda-device 1 --port 8189

Then open:

http://127.0.0.1:8188
http://127.0.0.1:8189

This is the most reliable multi-GPU pattern for production work: one queue per GPU.

Use separate user directories for serious parallel work

If both instances are active every day, consider separate --user-directory paths so browser state, workflow tabs, and user settings do not fight each other.

Example:

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

ComfyUI also has a --default-device option. It sets the default device while keeping other devices visible.

That sounds attractive, but it is not the same as 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 magically fit. Try these first:

  • reduce image resolution
  • reduce batch size
  • close other GPU-heavy apps
  • use a quantized model when appropriate
  • start ComfyUI with --lowvram
  • use a smaller model or workflow

See Python Out of Memory in ComfyUI for a deeper diagnosis path.

Common Mistakes

MistakeWhy It FailsBetter Approach
Opening two browser tabs on the same serverBoth tabs still use the same ComfyUI 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 in the launch command
Expecting one workflow to split across two GPUsStandard nodes usually run on one selected 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

How to Verify the Setup

Start ComfyUI and read the startup log. You want to see 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 one and confirm each GPU shows activity.

If only one GPU is busy, check:

  • which port your browser is using
  • whether both processes are still running
  • whether each command has a different --cuda-device
  • whether the second process failed to start because the port was already occupied

How Wonderful Launcher Helps

Wonderful Launcher is a good fit when you want multiple stable ComfyUI environments instead of one fragile folder:

  • keep a clean GPU 0 environment for normal images
  • keep a separate GPU 1 environment for experiments or video nodes
  • avoid custom node dependency conflicts between queues
  • preserve working workflows before changing launch flags

If you are still choosing hardware, start with GPU Compatibility. If ComfyUI launches but the browser keeps disconnecting, see ComfyUI Reconnecting Error.

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 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.

Workflow Missing Nodes

Fix ComfyUI workflows that fail to load because of missing custom nodes, with steps to identify, install, and recover missing node types.

Pricing & Credits Explained

Understand how credits work, what each feature costs, and which package is right for you.

Table of Contents

Quick Answer
What Multi GPU Means in ComfyUI
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
How to Verify the Setup
How Wonderful Launcher Helps
Related Guides
Source References