You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: patch load_models_gpu for accurate memory calculations; unpatch load_models_gpu
Refactor memory management in distorch_2.py to patch load_models_gpu instead of LoadedModel.model_memory_required. Implement correct memory reporting based on model flags (eject_models and is_distorch_model), ensuring proper eviction logic and improved handling of virtual VRAM. This drives behavior purely by either comfy core matching or DisTorch flag, fixing potential issues in multi-GPU setups.
Copy file name to clipboardExpand all lines: web/docs/CLIPLoaderDisTorch2MultiGPU.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ This node automatically detects models located in the `ComfyUI/models/clip` fold
14
14
|`virtual_vram_gb`|`FLOAT`| Amount of virtual VRAM in gigabytes to allocate for distributed tensor management (default: 4.0, range: 0.0-128.0). |
15
15
|`donor_device`|`STRING`| Device to donate VRAM from when allocating virtual memory (default: 'cpu'). |
16
16
|`expert_mode_allocations`|`STRING`| Advanced allocation string for expert users to manually specify device/ratio distributions (e.g., 'cuda:0,50%;cpu,*'). |
17
-
|`keep_loaded`|`BOOLEAN`| Whether to keep the model loaded when triggering memory cleanup operations (default: true). |
17
+
|`eject_models`|`BOOLEAN`| Whether to unload ALL models from the target device before loading this model, enabling deterministic model eviction for testing and memory management (default: false for CLIP loaders). |
Copy file name to clipboardExpand all lines: web/docs/CLIPLoaderGGUFDisTorch2MultiGPU.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ This node automatically detects models located in the `ComfyUI/models/clip` and
14
14
|`virtual_vram_gb`|`FLOAT`| Amount of virtual VRAM in gigabytes to allocate for distributed tensor management (default: 4.0, range: 0.0-128.0). |
15
15
|`donor_device`|`STRING`| Device to donate VRAM from when allocating virtual memory (default: 'cpu'). |
16
16
|`expert_mode_allocations`|`STRING`| Advanced allocation string for expert users to manually specify device/ratio distributions (e.g., 'cuda:0,50%;cpu,*'). |
17
-
|`keep_loaded`|`BOOLEAN`| Whether to keep the model loaded when triggering memory cleanup operations (default: true). |
17
+
|`eject_models`|`BOOLEAN`| Whether to unload ALL models from the target device before loading this model, enabling deterministic model eviction for testing and memory management (default: false for CLIP loaders). |
Copy file name to clipboardExpand all lines: web/docs/CLIPVisionLoaderDisTorch2MultiGPU.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ This node automatically detects models located in the `ComfyUI/models/clip_visio
13
13
|`virtual_vram_gb`|`FLOAT`| Amount of virtual VRAM in gigabytes to allocate for distributed tensor management (default: 4.0, range: 0.0-128.0). |
14
14
|`donor_device`|`STRING`| Device to donate VRAM from when allocating virtual memory (default: 'cpu'). |
15
15
|`expert_mode_allocations`|`STRING`| Advanced allocation string for expert users to manually specify device/ratio distributions (e.g., 'cuda:0,50%;cpu,*'). |
16
-
|`keep_loaded`|`BOOLEAN`| Whether to keep the model loaded when triggering memory cleanup operations (default: true). |
16
+
|`eject_models`|`BOOLEAN`| Whether to unload ALL models from the target device before loading this model, enabling deterministic model eviction for testing and memory management (default: true). |
Copy file name to clipboardExpand all lines: web/docs/CheckpointLoaderSimpleDisTorch2MultiGPU.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ This node automatically detects models located in the `ComfyUI/models/checkpoint
13
13
|`virtual_vram_gb`|`FLOAT`| Amount of virtual VRAM in gigabytes to allocate for distributed tensor management (default: 4.0, range: 0.0-128.0). |
14
14
|`donor_device`|`STRING`| Device to donate VRAM from when allocating virtual memory (default: 'cpu'). |
15
15
|`expert_mode_allocations`|`STRING`| Advanced allocation string for expert users to manually specify device/ratio distributions (e.g., 'cuda:0,50%;cpu,*'). |
16
-
|`keep_loaded`|`BOOLEAN`| Whether to keep the model loaded when triggering memory cleanup operations (default: true). |
16
+
|`eject_models`|`BOOLEAN`| Whether to unload ALL models from the target device before loading this model, enabling deterministic model eviction for testing and memory management (default: true). |
Copy file name to clipboardExpand all lines: web/docs/ControlNetLoaderDisTorch2MultiGPU.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ This node automatically detects models located in the `ComfyUI/models/controlnet
13
13
|`virtual_vram_gb`|`FLOAT`| Amount of virtual VRAM in gigabytes to allocate for distributed tensor management (default: 4.0, range: 0.0-128.0). |
14
14
|`donor_device`|`STRING`| Device to donate VRAM from when allocating virtual memory (default: 'cpu'). |
15
15
|`expert_mode_allocations`|`STRING`| Advanced allocation string for expert users to manually specify device/ratio distributions (e.g., 'cuda:0,50%;cpu,*'). |
16
-
|`keep_loaded`|`BOOLEAN`| Whether to keep the model loaded when triggering memory cleanup operations (default: true). |
16
+
|`eject_models`|`BOOLEAN`| Whether to unload ALL models from the target device before loading this model, enabling deterministic model eviction for testing and memory management (default: true). |
Copy file name to clipboardExpand all lines: web/docs/DiffControlNetLoaderDisTorch2MultiGPU.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ This node loads ControlNet models directly from HuggingFace model repositories b
13
13
|`virtual_vram_gb`|`FLOAT`| Amount of virtual VRAM in gigabytes to allocate for distributed tensor management (default: 4.0, range: 0.0-128.0). |
14
14
|`donor_device`|`STRING`| Device to donate VRAM from when allocating virtual memory (default: 'cpu'). |
15
15
|`expert_mode_allocations`|`STRING`| Advanced allocation string for expert users to manually specify device/ratio distributions (e.g., 'cuda:0,50%;cpu,*'). |
16
-
|`keep_loaded`|`BOOLEAN`| Whether to keep the model loaded when triggering memory cleanup operations (default: true). |
16
+
|`eject_models`|`BOOLEAN`| Whether to unload ALL models from the target device before loading this model, enabling deterministic model eviction for testing and memory management (default: true). |
0 commit comments