From a21e5807821a8aee7ecddfdbcc9f8e3bde8c83a3 Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Wed, 29 Mar 2023 22:50:58 -0300 Subject: [PATCH] Move an import --- modules/LoRA.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/LoRA.py b/modules/LoRA.py index 1d36c333..8c30e609 100644 --- a/modules/LoRA.py +++ b/modules/LoRA.py @@ -1,6 +1,7 @@ from pathlib import Path import torch +from peft import PeftModel import modules.shared as shared from modules.models import load_model @@ -14,8 +15,6 @@ def reload_model(): def add_lora_to_model(lora_name): - from peft import PeftModel - # If a LoRA had been previously loaded, or if we want # to unload a LoRA, reload the model if shared.lora_name not in ['None', ''] or lora_name in ['None', '']: