mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-10-01 01:26:03 -04:00
Update LoRA.py
This commit is contained in:
parent
bf22d16ebc
commit
b0abb327d8
@ -14,7 +14,11 @@ def add_lora_to_model(lora_name):
|
|||||||
|
|
||||||
from peft import PeftModel
|
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 != "None" or lora_name == "None":
|
||||||
reload_model()
|
reload_model()
|
||||||
|
shared.lora_name = lora_name
|
||||||
|
|
||||||
if lora_name != "None":
|
if lora_name != "None":
|
||||||
print(f"Adding the LoRA {lora_name} to the model...")
|
print(f"Adding the LoRA {lora_name} to the model...")
|
||||||
|
Loading…
Reference in New Issue
Block a user