Skip to content

Commit e8067fc

Browse files
committed
mp: call vbars_analyze for the GPU in question
1 parent adb3ddd commit e8067fc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

comfy/model_patcher.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,8 @@ def get_free_memory(self, device):
319319
#than pays for CFG. So return everything both torch and Aimdo could give us
320320
aimdo_mem = 0
321321
if comfy.memory_management.aimdo_enabled:
322-
aimdo_mem = comfy_aimdo.model_vbar.vbars_analyze()
322+
aimdo_device = device.index if getattr(device, "type", None) == "cuda" else None
323+
aimdo_mem = comfy_aimdo.model_vbar.vbars_analyze(aimdo_device)
323324
return comfy.model_management.get_free_memory(device) + aimdo_mem
324325

325326
def get_clone_model_override(self):

0 commit comments

Comments
 (0)