From 6e4de001f1c3aa8e2abe9ec77d0d30341b9f95ba Mon Sep 17 00:00:00 2001 From: Ryan Dick Date: Thu, 4 Apr 2024 11:29:32 -0400 Subject: [PATCH] Remove line that was intended to save memory, but wasn't actually having any effect. --- invokeai/backend/lora.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/invokeai/backend/lora.py b/invokeai/backend/lora.py index 77c2150f33..e2820e392b 100644 --- a/invokeai/backend/lora.py +++ b/invokeai/backend/lora.py @@ -544,12 +544,8 @@ class LoRAModelRaw(RawModel): # (torch.nn.Module): for layer_key, values in state_dict.items(): layer = layer_cls(layer_key, values) - # lower memory consumption by removing already parsed layer values - state_dict[layer_key].clear() - layer.to(device=device, dtype=dtype) model.layers[layer_key] = layer - return model @staticmethod