Spaces:
Runtime error
Runtime error
Commit
•
48542ca
1
Parent(s):
cdc008c
Update app.py
Browse files
app.py
CHANGED
@@ -154,6 +154,8 @@ def run_lora(prompt, negative, lora_scale, selected_state, sdxl_loras, progress=
|
|
154 |
full_path_lora = state_dicts[repo_name]["saved_name"]
|
155 |
loaded_state_dict = state_dicts[repo_name]["state_dict"]
|
156 |
cross_attention_kwargs = None
|
|
|
|
|
157 |
if last_lora != repo_name:
|
158 |
if last_merged:
|
159 |
del pipe
|
@@ -183,7 +185,6 @@ def run_lora(prompt, negative, lora_scale, selected_state, sdxl_loras, progress=
|
|
183 |
embedding_path = hf_hub_download(repo_id=repo_name, filename=text_embedding_name, repo_type="model")
|
184 |
embhandler = TokenEmbeddingsHandler(text_encoders, tokenizers)
|
185 |
embhandler.load_embeddings(embedding_path)
|
186 |
-
|
187 |
else:
|
188 |
merge_incompatible_lora(full_path_lora, lora_scale)
|
189 |
last_fused=False
|
|
|
154 |
full_path_lora = state_dicts[repo_name]["saved_name"]
|
155 |
loaded_state_dict = state_dicts[repo_name]["state_dict"]
|
156 |
cross_attention_kwargs = None
|
157 |
+
print("Last LoRA:", last_lora, "Was it last merged? ", last_merged, "Was it last fused?", last_fused)
|
158 |
+
print("Current LoRA: ", repo_name)
|
159 |
if last_lora != repo_name:
|
160 |
if last_merged:
|
161 |
del pipe
|
|
|
185 |
embedding_path = hf_hub_download(repo_id=repo_name, filename=text_embedding_name, repo_type="model")
|
186 |
embhandler = TokenEmbeddingsHandler(text_encoders, tokenizers)
|
187 |
embhandler.load_embeddings(embedding_path)
|
|
|
188 |
else:
|
189 |
merge_incompatible_lora(full_path_lora, lora_scale)
|
190 |
last_fused=False
|