4.8 KiB
Local workers
Local Workers: These are added automatically on first launch, but you can add them manually if you need.
- Open the Distributed GPU panel.
- Click "Add Worker" in the UI.
- Configure your local worker:
- Name: A descriptive name for the worker (e.g., "Studio PC 1")
- Port: A unique port number for this worker (e.g., 8189, 8190...).
- CUDA Device: The GPU index from
nvidia-smi(e.g., 0, 1). - Extra Args: Optional ComfyUI arguments for this specific worker.
- Save and launch the local worker.
Remote workers
Remote Workers: ComfyUI instances running on completely different computers on your network. These allow you to harness GPU power from other machines. Remote workers must be manually started on their respective computers and are connected via IP address.
On the Remote Worker Machine:
- Launch the master (main ComfyUI instance) with the
--listen --enable-cors-headerarguments. ⚠️ Required! - Add workers in the UI panel if the remote machine has more than one GPU.
- Make sure that they also have
--listenset inExtra Args. - Then launch them.
- Make sure that they also have
- Open the configured worker port(s) (e.g., 8189, 8190) in the remote worker's firewall.
On the Main Machine:
- Open the Distributed GPU panel (sidebar on the left).
- Click "Add Worker."
- Choose "Remote".
- Configure your remote worker:
- Name: A descriptive name for the worker (e.g., "Server Rack GPU 0")
- Host: The remote worker's IP address.
- Port: The port number used when launching ComfyUI on the remote worker (e.g., 8189).
- Save the remote worker configuration.
Cloud workers
Cloud Workers: ComfyUI instances running on a cloud service like Runpod.
Deploy Cloud Worker on Runpod
On Runpod:
- Register a Runpod account.
- On Runpod, go to Storage > New Network Volume and create a volume which will store the models you need.
- Now go to Pods and find a suitable GPU for your workflows.
To use the ComfyUI-Distributed-Pod, you will need to filter instances by CUDA 12.8.
- Choose the
ComfyUI-Distributed-Podtemplate and make sure your network drive is mounted. - Launch your pod.
- Access your pod using JupyterLab.
- Download models into /workspaces/ComfyUI/models/ (these will remain on your network drive even after you terminate the pod).
You can use this guide to make this process easy for you. It will generate a shell script that will automatically download the models you need for a given workflow.
- If using your own template, make sure you launch ComfyUI with the
--enable-cors-headerargument and you git clone ComfyUI-Distributed into custom_nodes. ⚠️ Required! - Download any additional custom nodes using ComfyUI manager
On the Main Machine:
- Launch a Cloudflare tunnel
- Download from here
https://github.com/cloudflare/cloudflared/releases/tag/2025.7.0 - Then run for example:
cloudflared-windows-amd64.exe tunnel --url http://localhost:8188
- Download from here
- Copy the Cloudflare address
- Open the Distributed GPU panel (sidebar on the left).
- Edit the Master's host address and replace it with the Cloudflare address.
- Click "Add Worker."
- Choose "Cloud".
- Configure your cloud worker:
- Host: The Runpod address
- Port: 443
- Save the remote worker configuration.
Deploy Cloud Worker on Other Platforms
On the Cloud Worker machine:
- Your cloud worker container needs to have the same models and custom nodes as the workflow you want to run on your local machine.
- If your cloud platform doesn't provide a secure connection, use Cloudflare to create a tunnel for the worker. Each GPU needs their own tunnel for their respective port.
- For example:
./cloudflared tunnel --url http://localhost:8188
- For example:
- Launch ComfyUI with the
--listen --enable-cors-headerarguments. ⚠️ Required! - Add workers in the UI panel if the remote machine has more than one GPU.
- Make sure that they also have
--listenset inExtra Args. - Then launch them.
- Make sure that they also have
On the Main Machine:
- Launch a Cloudflare tunnel on your local machine.
- Download from here
https://github.com/cloudflare/cloudflared/releases/tag/2025.7.0- For example:cloudflared-windows-amd64.exe tunnel --url http://localhost:8188
- Download from here
- Copy the Cloudflare address
- Open the Distributed GPU panel (sidebar on the left).
- Edit the Master's host address and replace it with the Cloudflare address.
- Click "Add Worker."
- Choose "Cloud".
- Configure your cloud worker:
- Host: The remote worker's IP address/domain
- Port: 443
- Save the remote worker configuration.