From 372217e9015e23383188ec8e4e36880a30b433b6 Mon Sep 17 00:00:00 2001 From: John Pollock Date: Mon, 11 Aug 2025 12:25:46 -0500 Subject: [PATCH] fixing inconsistent variable naming choices and defaults --- block_swap.py | 8 ++++---- distorch.py | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/block_swap.py b/block_swap.py index 55d82c0..cf6b4ba 100644 --- a/block_swap.py +++ b/block_swap.py @@ -170,7 +170,7 @@ def override_class_with_distorch_safetensor(cls): inputs["optional"] = inputs.get("optional", {}) inputs["optional"]["compute_device"] = (devices, {"default": compute_device}) - inputs["optional"]["virtual_ram_gb"] = ("FLOAT", {"default": 4.0, "min": 0.0, "max": 100.0, "step": 0.1}) + inputs["optional"]["virtual_vram_gb"] = ("FLOAT", {"default": 4.0, "min": 0.0, "max": 128.0, "step": 0.1}) inputs["optional"]["donor_device"] = (devices, {"default": "cpu"}) inputs["optional"]["expert_mode_allocations"] = ("STRING", {"multiline": False, "default": ""}) return inputs @@ -178,11 +178,11 @@ def override_class_with_distorch_safetensor(cls): CATEGORY = "multigpu/distorch_2" FUNCTION = "override" - def override(self, *args, compute_device=None, virtual_ram_gb=4.0, + def override(self, *args, compute_device=None, virtual_vram_gb=4.0, donor_device="cpu", expert_mode_allocations="", **kwargs): from . import set_current_device - logging.info(f"[DisTorch SafeTensor] Override called with: compute_device={compute_device}, donor_device={donor_device}, virtual_ram_gb={virtual_ram_gb}") + logging.info(f"[DisTorch SafeTensor] Override called with: compute_device={compute_device}, donor_device={donor_device}, virtual_vram_gb={virtual_vram_gb}") if compute_device is not None: set_current_device(compute_device) @@ -197,7 +197,7 @@ def override_class_with_distorch_safetensor(cls): model, compute_device=compute_device, swap_device=donor_device, - virtual_vram_gb=virtual_ram_gb, + virtual_vram_gb=virtual_vram_gb, expert_mode_allocations=expert_mode_allocations ) else: diff --git a/distorch.py b/distorch.py index c8ef474..bfa270e 100644 --- a/distorch.py +++ b/distorch.py @@ -365,7 +365,7 @@ def override_class_with_distorch_gguf_v2(cls): inputs["optional"] = inputs.get("optional", {}) inputs["optional"]["compute_device"] = (devices, {"default": compute_device}) - inputs["optional"]["virtual_ram_gb"] = ("FLOAT", {"default": 4.0, "min": 0.0, "max": 100.0, "step": 0.1}) + inputs["optional"]["virtual_vram_gb"] = ("FLOAT", {"default": 4.0, "min": 0.0, "max": 128.0, "step": 0.1}) inputs["optional"]["donor_device"] = (devices, {"default": "cpu"}) inputs["optional"]["expert_mode_allocations"] = ("STRING", {"multiline": False, "default": ""}) return inputs @@ -373,7 +373,7 @@ def override_class_with_distorch_gguf_v2(cls): CATEGORY = "multigpu/distorch_2" FUNCTION = "override" - def override(self, *args, compute_device=None, virtual_ram_gb=4.0, + def override(self, *args, compute_device=None, virtual_vram_gb=4.0, donor_device="cpu", expert_mode_allocations="", **kwargs): from . import set_current_device if compute_device is not None: @@ -384,8 +384,8 @@ def override_class_with_distorch_gguf_v2(cls): out = fn(*args, **kwargs) vram_string = "" - if virtual_ram_gb > 0: - vram_string = f"{compute_device};{virtual_ram_gb};{donor_device}" + if virtual_vram_gb > 0: + vram_string = f"{compute_device};{virtual_vram_gb};{donor_device}" full_allocation = f"{expert_mode_allocations}#{vram_string}" if expert_mode_allocations or vram_string else ""