Skip to content

How-ToMotherboard

How to Use Multiple GPUs With ComfyUI

Got two graphics cards? Here's how to choose which GPU ComfyUI uses with --cuda-device and how to run one ComfyUI instance per card on different ports, so both GPUs generate at once, plus what to check for RAM, PCIe lanes and power.

By , Systems & Technical Editor

5 min read

How to Use Multiple GPUs With ComfyUI

The steps below use ComfyUI's documented launch options and NVIDIA's nvidia-smi documentation, as published in November 2026, and assume NVIDIA graphics cards with ComfyUI Portable or a manual install.

If your PC has more than one graphics card, the straightforward, documented way to put the second GPU to work in ComfyUI is to choose which card each copy of ComfyUI can see, and run one copy per card. That lets you generate on both GPUs at the same time, keep a fast card for ComfyUI while a slower one runs something else, or stop ComfyUI landing on the wrong card.

What you can and can't do

ComfyUI's launch options give you two GPU controls:

  • --cuda-device sets which CUDA devices an instance will use, as a comma-separated list such as 0 or 0,1, or all. ComfyUI's help text says all other devices will not be visible to that instance.

  • --default-device sets which device is the default, while leaving all the other devices visible.

Combined with --port, which sets the port ComfyUI listens on (8188 by default), that's enough to run a separate ComfyUI on each card.

What this approach doesn't do is pool VRAM. Two 16GB cards running two instances give you two separate 16GB workspaces, not one 32GB card. If a model doesn't fit on one card, a second instance won't help; our low-VRAM ComfyUI guide covers the options for that. This is different from local language models, where tools such as llama.cpp can split one model across cards, as our guide to running a local LLM on two GPUs explains.

Step 1: Find your GPU numbers

Open Command Prompt or PowerShell and run:

nvidia-smi -L

NVIDIA's documentation says this lists each NVIDIA GPU in the system along with its UUID. Each line starts with a number, beginning at 0.

One caution from the same documentation: device enumeration order isn't guaranteed to be consistent between reboots, which is why NVIDIA recommends identifying GPUs by UUID or PCI bus ID when consistency matters. In practice, don't assume GPU 0 is the card in your top slot. Confirm which card each instance is using in Step 4.

Step 2: Choose the GPU for a single ComfyUI

If you just want ComfyUI to use one particular card, add --cuda-device to your launch command.

On ComfyUI Portable, ComfyUI is started by double-clicking run_nvidia_gpu.bat in the ComfyUI_windows_portable folder. Make a copy of that file first, then open the copy in Notepad. You'll see a line that runs ComfyUI's main.py using the embedded Python (it starts .\python_embeded\python.exe -s ComfyUI\main.py). Add your options to the end of that line, for example:

--cuda-device 1

Save it and launch ComfyUI with your edited copy. Keeping the original file untouched means you always have a working launcher to fall back on.

On a manual install, add the option to the command you already use, for example python main.py --cuda-device 1.

Step 3: Run one ComfyUI per GPU

To use both cards at once, start two instances, each pinned to a different GPU and listening on a different port. With two copies of the Portable launcher, the extra options would be:

Launcher

Options to add

Open in browser

Copy 1

--cuda-device 0 --port 8188

http://127.0.0.1:8188

Copy 2

--cuda-device 1 --port 8189

http://127.0.0.1:8189

Start both launchers, then open each address in its own browser tab. Each tab is a separate ComfyUI that queues and runs work on its own GPU.

Both instances share the same install, so they see the same models and custom nodes. If you want to keep their outputs apart, add ComfyUI's --output-directory option to each launcher with a different folder, for example --output-directory D:\ComfyUI-output-gpu1. The help text says it sets the output directory and overrides the base directory setting.

Step 4: Check each instance is on the right card

Queue a workflow in one tab and watch your GPUs. In Windows, Task Manager's Performance tab shows dedicated GPU memory for each card, and running nvidia-smi shows a summary, including memory use, for every NVIDIA GPU. The card whose memory fills up is the one that instance is using. Our guide to checking VRAM usage in Windows covers both tools.

If the wrong card lights up, swap the numbers in your launchers.

Things to watch out for

  • System RAM. Each instance is a separate program with its own models loaded, and ComfyUI offloads models to system RAM when it needs to. Running two at once uses more system memory than one, so 64GB is more comfortable than 32GB for a two-GPU ComfyUI PC in our view.

  • Out-of-memory errors. Each instance only has its own card's VRAM. If one runs out, our guide to fixing CUDA out of memory errors applies to that instance on its own.

  • PCIe lanes and power. Two graphics cards need two suitably wired slots and a power supply that can feed both. See how to check your GPU's PCIe link speed, our best motherboards for dual-GPU local AI and our PSU guide for local AI PCs.

  • Network access. By default ComfyUI listens only on 127.0.0.1, so each instance is only reachable from the PC it runs on. The --listen option opens it to other devices; only use it on a network you trust.

  • Comfy Desktop. The Desktop app manages how ComfyUI starts, so this guide uses Portable or a manual install, where you control the launch command.

  • AMD and Intel cards. The option is named for CUDA devices, and the steps here are for NVIDIA cards. If you use another GPU vendor, check ComfyUI's documentation for your setup first.

Our verdict

ComfyUI doesn't merge two graphics cards into one, but it makes it easy to put both to work. Use nvidia-smi -L to find your cards, add --cuda-device to pick one, and run a second copy of ComfyUI with a different --cuda-device and --port to generate on both at once. Check which card each instance is really using, give each its own output folder, and make sure you have the system RAM, PCIe lanes and power to back it up.

The bottom line

ComfyUI doesn't merge two graphics cards into one, but it makes it easy to put both to work. Use nvidia-smi -L to find your cards, add --cuda-device to pick one, and run a second copy of ComfyUI with a different --cuda-device and --port to generate on both at once. Check which card each instance is really using, give each its own output folder, and make sure you have the system RAM, PCIe lanes and power to back it up.

Sources

  1. 01ComfyUI, command-line options (comfy/cli_args.py)
  2. 02ComfyUI documentation, ComfyUI Portable for Windows
  3. 03NVIDIA, nvidia-smi documentation

About the author

Marcus Thorne

Systems & Technical Editor

Marcus writes Forge PC's step-by-step build, troubleshooting and system optimisation guides. His background spans Windows kernel and power-state diagnostics, UEFI/BIOS configuration, NVMe storage arrays, ATX 3.1 power delivery and running local AI and LLM workloads on consumer graphics cards.

More from Marcus Thorne

Read next

Integrated vs Dedicated Graphics: Do You Need a Graphics Card?

Versus

Integrated vs Dedicated Graphics: Do You Need a Graphics Card?

Integrated graphics are built into the CPU and share system RAM, so they suit office work, video, small PCs and light games, and make a useful backup. A dedicated graphics card has its own GPU and VRAM, so it's what you need for modern games at good settings, high-refresh monitors and most local AI.

Callum Reid5 min

Best Free FPS Counter Software for PC in 2026

Best Picks

Best Free FPS Counter Software for PC in 2026

MSI Afterburner with RTSS is the best free FPS counter for most enthusiasts, working with NVIDIA and AMD cards and fully customisable. The NVIDIA app and AMD Software overlays are the easiest built-in options and show lows as well as averages, Steam's Performance Overlay separates generated frames, Intel PresentMon is best for spotting CPU or GPU bottlenecks, and Xbox Game Bar is already in Window

Hannah Vance6 min

DirectX 11 vs DirectX 12 vs Vulkan: Which Should You Pick in Games?

Versus

DirectX 11 vs DirectX 12 vs Vulkan: Which Should You Pick in Games?

DirectX 12 and Vulkan are lower-level graphics APIs designed to cut CPU overhead and scale across more CPU cores, and DirectX 12 unlocks features such as ray tracing and the DirectX 12 Ultimate set. DirectX 11 is older and more driver-managed but remains a useful fallback for older GPUs or when a DX12 mode misbehaves. Vulkan is cross-platform and key on Linux. Start with the game's default.

Callum Reid6 min

DLSS vs XeSS: NVIDIA and Intel's AI Upscaling Compared

Versus

DLSS vs XeSS: NVIDIA and Intel's AI Upscaling Compared

NVIDIA DLSS vs Intel XeSS compared: which graphics cards each runs on, upscaling, frame generation up to 6X vs 4x, latency tech, driver overrides and game support, with advice on which to use on NVIDIA, Intel and AMD GPUs.

Callum Reid5 min