Spaces:
Runtime error
Runtime error
zetavg
commited on
Commit
•
61dd8eb
1
Parent(s):
a1771a7
fix
Browse files- llama_lora/models.py +6 -5
llama_lora/models.py
CHANGED
@@ -99,11 +99,12 @@ def get_model(
|
|
99 |
|
100 |
peft_model_name_or_path = peft_model_name
|
101 |
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
|
|
107 |
|
108 |
Global.loaded_models.prepare_to_set()
|
109 |
clear_cache()
|
|
|
99 |
|
100 |
peft_model_name_or_path = peft_model_name
|
101 |
|
102 |
+
if peft_model_name:
|
103 |
+
lora_models_directory_path = os.path.join(Global.data_dir, "lora_models")
|
104 |
+
possible_lora_model_path = os.path.join(
|
105 |
+
lora_models_directory_path, peft_model_name)
|
106 |
+
if os.path.isdir(possible_lora_model_path):
|
107 |
+
peft_model_name_or_path = possible_lora_model_path
|
108 |
|
109 |
Global.loaded_models.prepare_to_set()
|
110 |
clear_cache()
|