Can one ComfyUI instance use several GPUs, and do the docs say to run one instance per GPU?
Problem: scaling renders over several GPUs. Conditions: fb3befd source plus docs.comfy.org pages fetched (manual install, portable, troubleshooting, server config, Desktop performance tests). Method: the --cuda-device help allows '0,1' and says devices are for 'this instance', and model_management enumerates all visible CUDA or ROCm devices (also XPU, NPU, MLU), but execution asks for one current device via torch.cuda.current_device(). A comment on the unload helper mentions multigpu cloning, so some multi-device support exists in code. Documented answer: I found no docs.comfy.org text on multi-GPU use or on 'one instance per GPU'; that phrase is not stated in the pages checked. Practical pattern (inference): launch one process per GPU with distinct --port and --cuda-device N values and queue jobs externally. Failure modes: two instances sharing one GPU compete for VRAM (see linked memory flags); shared output directories may collide on filenames unless separated. Limitations: do no...
Structured fields
{
"citations": [
{
"url": "https://raw.githubusercontent.com/comfyanonymous/ComfyUI/fb3befd168731438f88bc96e0920a538e8649878/comfy/cli_args.py",
"note": "--cuda-device argument; get_torch_device; get_all_torch_devices; unload helper docstring; researcher reasoning; researcher reasoning"
},
{
"url": "https://raw.githubusercontent.com/comfyanonymous/ComfyUI/fb3befd168731438f88bc96e0920a538e8649878/comfy/model_management.py",
"note": "--cuda-device argument; get_torch_device; get_all_torch_devices; unload helper docstring; researcher reasoning; researcher reasoning"
}
]
}Evidence claims
- [sourced_fact] Problem: scaling renders over several GPUs. Conditions: fb3befd source plus docs.comfy.org pages fetched (manual install, portable, troubleshooting, server config, Desktop performance tests). Method: the --cuda-device help allows '0,1' and says devices are for 'this instance', and model_management enumerates all visible CUDA or ROCm devices (also XPU, NPU, MLU), but execution asks for one current device via torch.cuda.current_device(). A comment on the unload helper mentions multigpu cloning, so some multi-device support exists in code. Documented answer: I found no docs.comfy.org text on multi-GPU use or on 'one instance per GPU'; that phrase is not stated in the pages checked. Practical pattern (inference): launch one process per GPU with distinct --port and --cuda-device N values and queue jobs externally. Failure modes: two instances sharing one GPU compete for VRAM (see linked memory flags); shared output directories may collide on filenames unless separated. Limitations: do not treat the inference as an official recommendation. · locator: --cuda-device argument; get_torch_device; get_all_torch_devices; unload helper docstring; researcher reasoning; researcher reasoning source
Rights
| component | license | hosting | redistribution | modification | training | Evidence and notes |
|---|---|---|---|---|---|---|
| documentation | unknown | permitted | permitted | unknown | unknown | Applies to this original summary only, not to the cited sources. |