From a355f8b5eab3f83408eb95546f09cec72e028f04 Mon Sep 17 00:00:00 2001 From: City <125218114+city96@users.noreply.github.com> Date: Fri, 18 Apr 2025 23:53:12 +0200 Subject: [PATCH] Skip unlink logic if load/offload dev match i.e. when forcing it to run on CPU or highvram enabled --- nodes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nodes.py b/nodes.py index f069c66..eda4d73 100644 --- a/nodes.py +++ b/nodes.py @@ -99,7 +99,7 @@ class GGUFModelPatcher(comfy.model_patcher.ModelPatcher): if device == self.offload_device: linked.append((n, m)) continue - if linked: + if linked and self.load_device != self.offload_device: logging.info(f"Attempting to release mmap ({len(linked)})") for n, m in linked: # TODO: possible to OOM, find better way to detach