mirror of
https://github.com/Comfy-Org/comfy-aimdo.git
synced 2026-11-04 23:37:21 +00:00
[GH-ISSUE #9] Could this be modified to combine multiple GPUs into a virtual one? #2
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Comfy-Org/comfy-aimdo#2
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Bigfield77 on GitHub (Mar 1, 2026).
Original GitHub issue: https://github.com/Comfy-Org/comfy-aimdo/issues/9
@supereth commented on GitHub (Mar 1, 2026):
As an eGPU Thunderbolt Adapter and a few 1080ti's laying around owner I would be really interested if this could be even possible :)
@rattus128 commented on GitHub (Mar 2, 2026):
I'm not really seeing the direct path unfortunately. We do make heavy use of the low level Cuda mem apis that virtualize the GPU memory and these apis have modes that let gpus see each other and potentially present VRAM where you want it to look like one but that's all Cuda. We just consume it on behalf of comfy for memory management.
That said, support for multiple GPUs housing different models would be pretty easy. With that you could actually split layers across gpus but the correct way to do that is just add vbar per GPU support to aimdo then comfy does the layer split logic on the higher level.
The holy grail is the work split GPU effort where multiple GPUs do compute in parallel but that would also be best implemented on the higher level and aimdo just compliments the approach with more robust memory management
@Bigfield77 commented on GitHub (Mar 3, 2026):
Thanks for looking into this!
Concerning "That said, support for multiple GPUs housing different models would be pretty easy. With that you could actually split layers across gpus but the correct way to do that is just add vbar per GPU support"
You mean, some mod to that code would allow me to pass a device_map ie {layer_1:0, ... layer_15:1.. } and it would overflow to system ram automatically when each device reaches max vram..? that would be pretty great if i understand correctly!
Windows nvidia driver have something like this but it only works when one device is exposed.
@rattus128 commented on GitHub (Mar 4, 2026):
We don't implement any layer awarness is aimdo, but yes you can alloc your layers exactly like that into the VBARs on the application level. But you can actually do something fancier than that. VBAR space is free, so what you can do is allocate the entire model to both GPUs, (this doesnt actually use the VRAM). You can then setup a priority order between the two GPUs:
You need to order your layers in the VBARs in usage order for it to be effective and avoid back-and-forthing the input, but you already have layer order awareness so you are good on that front.
This will automatically balance your layers accross the two GPUs without you have to pre-allocate (this is what Aimdo is all about!).
The Windows Nvidia drivers are ineffective as WDDM doesnt have a good awareness of fast vs slow moving VRAM which is also part of the problem.
@Bigfield77 commented on GitHub (Mar 5, 2026):
Thanks, i will try that!
@rattus128 commented on GitHub (Mar 5, 2026):
want to just leave it open and keep me posted? :)
@Bigfield77 commented on GitHub (Mar 5, 2026):
will do!
@Bigfield77 commented on GitHub (Mar 11, 2026):
Actually,
I was looking at this for a custom node used to run hunyuan image 3 instruct, it is using non-comfy loader.
Transforming it to comfy compatible is well beyond my skill :)