mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-11-22 16:17:57 +01:00
Don't include PeftModel every time
This commit is contained in:
parent
86b99006d9
commit
7c945cfe8e
@ -1,13 +1,13 @@
|
|||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
from peft import PeftModel
|
|
||||||
|
|
||||||
import modules.shared as shared
|
import modules.shared as shared
|
||||||
from modules.models import load_model
|
from modules.models import load_model
|
||||||
|
|
||||||
|
|
||||||
def add_lora_to_model(lora_name):
|
def add_lora_to_model(lora_name):
|
||||||
|
|
||||||
|
from peft import PeftModel
|
||||||
|
|
||||||
# Is there a more efficient way of returning to the base model?
|
# Is there a more efficient way of returning to the base model?
|
||||||
if lora_name == "None":
|
if lora_name == "None":
|
||||||
print("Reloading the model to remove the LoRA...")
|
print("Reloading the model to remove the LoRA...")
|
||||||
|
Loading…
Reference in New Issue
Block a user