robertvoy/ComfyUI-Distributed
ComfyUI extension that enables multi-GPU processing locally, remotely and in the cloud
What is ComfyUI-Distributed?
ComfyUI-Distributed is an add-on for ComfyUI (a visual tool for building AI image/video generation workflows) that lets you spread work across multiple GPUs — either on the same computer, other computers on your network, or cloud machines. Instead of one GPU doing all the work, you can use every GPU you have access to at once.
It does not combine the memory (VRAM) of multiple GPUs, and it does not make a single image or video generate faster. What it does is let you generate many images/videos at the same time across different GPUs, and it can speed up upscaling a single image by splitting the upscale tiles across GPUs.
Key Features
| Feature | What it does |
|---|---|
| Parallel workflow processing | Run the same workflow on multiple GPUs at once, each with a different random seed. The master machine collects all the results. Works for images and videos. |
| Distributed upscaling | Speeds up the Ultimate SD Upscale tool by sending different tiles of the image to different GPUs. Works for single images and videos. |
| Dynamic image-list processing | Process a whole list of images in parallel — as soon as any GPU (master or worker) finishes, it grabs the next image. Results come back in the original order. |
| Ease of use | Local workers are configured automatically on first launch. You can convert any existing workflow to distributed mode by adding just 2 nodes. Configuration is JSON-based with UI controls. |
Worker Types
There are four kinds of machines that can do work:
- Local Workers — extra GPUs in the same computer (auto-configured on first launch)
- Remote Workers — GPUs on other computers in your local network
- Cloud Workers — GPUs rented from a cloud service like Runpod, connected via secure tunnels
- Serverless (Runpod) — queue-based endpoints that only handle image "Collector" jobs; no need to install the extension or open an inbound tunnel on the endpoint
Requirements
- ComfyUI
- Multiple NVIDIA GPUs (if you don't have extra GPUs, you can use Cloud Workers instead)
- That's it
Installation
- Clone the repository into ComfyUI's
custom_nodesdirectory:git clone https://github.com/robertvoy/ComfyUI-Distributed.git - Restart ComfyUI.
- If you plan to use remote or cloud workers, add
--enable-cors-headerto your launch arguments on the master machine. - Follow the setup guide for adding workers.
Example Workflows
Basic Parallel Generation
Generate multiple images in roughly the time it takes to generate one. Each worker uses a different seed.
Steps:
- Open your ComfyUI workflow
- Add Distributed Seed → connect to the sampler's seed input
- Add Distributed Collector → after VAE Decode
- Optional: enable
load_balanceon the Collector to queue runs and send each one to whichever GPU frees up next - Enable workers in the UI
- Run the workflow
Parallel WAN Generation (videos)
Same idea but for WAN video generation. After the Collector, add an Image Batch Divider and set divide_by to the number of GPUs you have (e.g., 3 if you have a master + 2 workers).
Distributed Image Upscaling
Load an image, upscale with ESRGAN (or similar), connect to Ultimate SD Upscale Distributed, configure tile settings, enable workers. Speed scales as you add more GPUs.
Distributed Video Upscaling
Same as above but for videos. Optional: use RES4LYF (bong/res2) for better results. Can run entirely on Runpod with minimal setup.
Developer API
You can control the distributed cluster programmatically (without opening the browser):
- Endpoint:
POST /distributed/queue - What it does: Accepts a ComfyUI API-format prompt, dispatches it to the requested reachable workers, and returns the master
prompt_id. - Security warning: Do not expose your ComfyUI port to the public internet. Use a secure proxy (like Cloudflare or a VPN) for remote access.
Distributed Value Node
This node lets you set per-worker overrides — for example, different prompts, models, or settings for each worker. Key behaviors:
- Output type adapts to whatever input it's connected to (
STRING,INT,FLOAT,COMBO) - Shows only currently enabled workers
- If worker enablement changes, the fields update automatically
- When disconnected, it resets to default string mode and clears overrides
- On execution: master uses
default_value; workers use their mapped override (with type coercion falling back to default)
All Nodes
| Node | Purpose |
|---|---|
| Distributed Seed | Generates a unique seed for each worker |
| Distributed Collector | Collects results (image/video frames, optionally audio) from workers back to the master. load_balance routes each run to one free participant, or to the next GPU that frees up when all are busy |
| Distributed Value | Outputs per-worker override values with fallback to default |
| Ultimate SD Upscale Distributed | Distributes upscale tiles across workers |
| Image Batch Divider | Splits image batches for multi-GPU output |
| Audio Segment Divider | Splits an audio waveform into up to ten sequential time segments |
| Distributed Model Name | Passes model paths to workers, enabling workflows to use models not present on the master (in orchestrator-only mode) |
| Distributed Empty Image | Produces an empty IMAGE batch used when the master delegates all work |
| Distributed Image List Start | Turns an image list/batch into one job per image, scheduled to the next available participant. Mask and value inputs can be shared across images or paired one per image |
| Distributed Image List End | Closes the paired region and returns images, masks, and texts as lists in the original input order |
FAQ Highlights
- Does it combine VRAM? No.
- Does it speed up a single image/video generation? No — it enables more simultaneous generations. The exception: it can speed up upscaling a single image via Ultimate SD Upscale Distributed.
- Works with ComfyUI desktop app? Yes.
- Can I mix a RTX 5090 with a GTX 980? Yes, but performance is best with similar GPUs; a big performance gap may cause bottlenecks.
- Works with cloud providers? Yes.
- Can my main machine just coordinate without rendering? Yes — uncheck the master toggle in the Distributed panel for "orchestrator-only" mode. If all workers become unavailable, the master automatically re-enables itself so your workflow still runs.
- Works with Docker? Yes, but you must configure Docker yourself; no assistance is provided.
Community Projects
Two community-maintained add-ons extend this project:
ComfyUI-H3MC-Distributed (by ymiyad) — connects H3 Motion Context with ComfyUI-Distributed to generate multiple candidate takes of the next video clip across workers. You compare results and pick one. It speeds up iteration through parallel candidates; it does not split a single clip across GPUs.
ComfyUI-Deadline-Distributed (by doubletwisted) — a fork with Thinkbox/AWS Deadline 10 integration for render farms. Claim Deadline workers from the Distributed panel, register them automatically, and collect results back into your master workflow. Requires Deadline 10 and the author's ComfyUI-Deadline-Plugin.
Sponsorship
Runpod is the official sponsor. Using their referral link unlocks a special bonus.
Disclaimer
The software is provided "as is" with no warranties. Users are responsible for securing their networks and complying with laws. The developers assume no liability for misuse, improper configuration, or external threats.
Support
The project accepts donations via Buy Me a Coffee at https://buymeacoffee.com/robertvoy.
Related
- Project
- Project
- Project
- Project
- Project