Просмотр исходного кода

Don't include PeftModel every time

oobabooga 2 лет назад
Родитель
Сommit
7c945cfe8e
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      modules/LoRA.py

+ 2 - 2
modules/LoRA.py

@@ -1,13 +1,13 @@
 from pathlib import Path
 
-from peft import PeftModel
-
 import modules.shared as shared
 from modules.models import load_model
 
 
 def add_lora_to_model(lora_name):
 
+    from peft import PeftModel
+
     # Is there a more efficient way of returning to the base model?
     if lora_name == "None":
         print("Reloading the model to remove the LoRA...")