From 3d9869240bd4ff786030ad85b09441045bb3fda9 Mon Sep 17 00:00:00 2001 From: City <125218114+city96@users.noreply.github.com> Date: Wed, 28 Aug 2024 17:12:24 +0200 Subject: [PATCH] Always patch weight Should help with #33 --- nodes.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nodes.py b/nodes.py index 0e61662..1deb9ec 100644 --- a/nodes.py +++ b/nodes.py @@ -140,6 +140,10 @@ class GGUFModelPatcher(comfy.model_patcher.ModelPatcher): else: comfy.utils.set_attr_param(self.model, key, out_weight) + def load(self, *args, force_patch_weights=False, **kwargs): + # always call `patch_weight_to_device` even for lowvram + return super().load(*args, force_patch_weights=True, **kwargs) + def clone(self, *args, **kwargs): n = GGUFModelPatcher(self.model, self.load_device, self.offload_device, self.size, weight_inplace_update=self.weight_inplace_update) n.patches = {}