Commit 12a6e931 authored by comfyanonymous's avatar comfyanonymous
Browse files

Del the right object when applying lora.

parent 85a8900a
......@@ -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):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment