ComfyUI icon indicating copy to clipboard operation
ComfyUI copied to clipboard

MultiGPU node native and built-in support

Open RuslanKuz opened this issue 1 year ago • 5 comments

Feature Idea

Hello! There is a great node for ComfyUI called MultiGPU https://github.com/pollockjj/ComfyUI-MultiGPU. It allows to distribute memory between VRAM and RAM very effectively. With my RTX 3080 10GB and 64GB VRAM I can generate even with heavy models like Flux 2 fp8. But the problem is that after each big ComfyUI update it doesn't work well and the developer doesn't have time to update it quickly. So it will be perfect if this node become native and basic for ComfyUI and be supported constantly. This would give most users an excellent opportunity to generate on various advanced models while having mid-range systems. Thank you for your attention!

Existing Solutions

No response

Other

No response

RuslanKuz avatar Dec 02 '25 17:12 RuslanKuz

What happens if you just don't use any splitter nodes at all? The design of comfy is to automate the offloading of excess weights to RAM automatically and there have been significant improvements recently. What happens when you use flux 2 template no changes?

Note we fixed several day 0 VRAM issues in flux2 last week so try with the latest.

rattus128 avatar Dec 02 '25 21:12 rattus128

What happens if you just don't use any splitter nodes at all? The design of comfy is to automate the offloading of excess weights to RAM automatically and there have been significant improvements recently. What happens when you use flux 2 template no changes?

Note we fixed several day 0 VRAM issues in flux2 last week so try with the latest.

Yes, I noticed a great leap in optimization on latest ComfyUI version. But I still have my VRAM getting full and generation slows down in several times. MultiGPU, for example UNETLoaderDisTorch2MultiGPU node allows to control distribution of VRAM by setting amount of memory to unload in RAM. And it works very well, I have no drop in generation speed with it and generation is stable

RuslanKuz avatar Dec 03 '25 16:12 RuslanKuz

What happens if you just don't use any splitter nodes at all? The design of comfy is to automate the offloading of excess weights to RAM automatically and there have been significant improvements recently. What happens when you use flux 2 template no changes? Note we fixed several day 0 VRAM issues in flux2 last week so try with the latest.

Yes, I noticed a great leap in optimization on latest ComfyUI version. But I still have my VRAM getting full and generation slows down in several times. MultiGPU, for example UNETLoaderDisTorch2MultiGPU node allows to control distribution of VRAM by setting amount of memory to unload in RAM. And it works very well, I have no drop in generation speed with it and generation is stable

A more realistic future approach is to use an external wrapper. For instance, once someone creates a TensorRT-LLM node, that would let ComfyUI launch high-performance, multi-card inference (supporting TP/PP) externally. It's an "outsource the hard part" method that might be the key to stable multi-GPU.

ultism avatar Dec 04 '25 04:12 ultism

Releases? Thank you and great work but... the latest untested ComfyUI version just blew up work for many...many people :( MultiGPU is a top node, I would say 1 of the 3-4 most popular. This should have been tested before release and never released like this.

MavenDE avatar Dec 04 '25 13:12 MavenDE

Yes, I noticed a great leap in optimization on latest ComfyUI version. But I still have my VRAM getting full and generation slows down in several times. MultiGPU, for example UNETLoaderDisTorch2MultiGPU node allows to control distribution of VRAM by setting amount of memory to unload in RAM. And it works very well, I have no drop in generation speed with it and generation is stable

Releases? Thank you and great work but... the latest untested ComfyUI version just blew up work for many...many people :( MultiGPU is a top node, I would say 1 of the 3-4 most popular. This should have been tested before release and never released like this.

One of the errors in distorch_2.py (pollockjj/ComfyUI-MultiGPU) is triggered by recent changes in model_patcher.py in ComfyUI (currently v0.3.75 on my setup).

def _load_list(self):
       # ... implementation
              loading.append((module_offload_mem, module_mem, n, m, params))
       return loading

distorch_2.py expects 4 but now receives 5. I modified the call inside distorch_2.py, which made it run on some of our machines, but on others it led to various follow‑up errors. In addition, my cuda:1 device is no longer being recognized (this issue also shows up in other nodes).

For now, I’ve worked around it with a simplified patch using the old distorch nodes v1, that seems to run reliably across several colleagues’ systems. Perhaps it will help one or the other, (with the limitation that we’re all running on rtx3090, 4090, 5090 cards here... but it should also work on smaller ones in principle)

Simplified t2i Workflow for Flux2D (also Workaround for broken MultiGPU Nodes)

I’ll post the workaround later today on Civ and in our Discord. Please note: this is just a temporary hack until the nodes are properly updated.

GegenDenTag avatar Dec 04 '25 15:12 GegenDenTag