From c7b902bf9a7f8a020a370249d56f9b339c447c65 Mon Sep 17 00:00:00 2001 From: City <125218114+city96@users.noreply.github.com> Date: Mon, 2 Sep 2024 02:00:10 +0200 Subject: [PATCH] Patch load/unload fix May break other things. For some reason T5 decided to run on the CPU with this change, but only like once and I can't for the life of me reproduce it. --- nodes.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/nodes.py b/nodes.py index 58934b0..062aafe 100644 --- a/nodes.py +++ b/nodes.py @@ -140,8 +140,7 @@ class GGUFModelPatcher(comfy.model_patcher.ModelPatcher): continue if len(patches) > 0: p.patches = [] - - return super().unpatch_model(device_to=device_to, unpatch_weights=unpatch_weights) + return super().unpatch_model(device_to=None, unpatch_weights=unpatch_weights) def load(self, *args, force_patch_weights=False, **kwargs): # always call `patch_weight_to_device` even for lowvram