From 79ac94cc2f26560631bc6d76a600c1c3e068d820 Mon Sep 17 00:00:00 2001 From: Clay Shoaf <31578812+ClayShoaf@users.noreply.github.com> Date: Mon, 8 May 2023 15:21:55 -0400 Subject: [PATCH] fixed LoRA loading issue (#1865) --- modules/LoRA.py | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/LoRA.py b/modules/LoRA.py index f996289a..08bf5b88 100644 --- a/modules/LoRA.py +++ b/modules/LoRA.py @@ -28,6 +28,7 @@ def add_lora_to_model(lora_names): # If any LoRA needs to be removed, start over if len(removed_set) > 0: shared.model.disable_adapter() + shared.model = shared.model.base_model.model if len(lora_names) > 0: logging.info("Applying the following LoRAs to {}: {}".format(shared.model_name, ', '.join(lora_names)))