From 12a6e93171ce6d67001362f4cd25cc6d279f17ed Mon Sep 17 00:00:00 2001 From: comfyanonymous Date: Sat, 22 Jul 2023 11:25:49 -0400 Subject: [PATCH] Del the right object when applying lora. --- comfy/sd.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/comfy/sd.py b/comfy/sd.py index 7f7c06bc..ddafa0b5 100644 --- a/comfy/sd.py +++ b/comfy/sd.py @@ -353,7 +353,7 @@ class ModelPatcher: temp_weight = weight.to(torch.float32, copy=True) out_weight = self.calculate_weight(self.patches[key], temp_weight, key).to(weight.dtype) set_attr(self.model, key, out_weight) - del temp_weight + del weight return self.model def calculate_weight(self, patches, weight, key):