Spaces:
Runtime error
Runtime error
Commit
•
856c9dc
1
Parent(s):
247fbd7
Update app.py
Browse files
app.py
CHANGED
@@ -257,6 +257,7 @@ def run_lora(face_image, prompt, negative, lora_scale, selected_state, sdxl_lora
|
|
257 |
if(is_pivotal):
|
258 |
#Add the textual inversion embeddings from pivotal tuning models
|
259 |
text_embedding_name = sdxl_loras[selected_state.index]["text_embedding_weights"]
|
|
|
260 |
state_dict_embedding = load_file(text_embedding_name)
|
261 |
pipe.load_textual_inversion(state_dict_embedding["clip_l"], token=["<s0>", "<s1>"], text_encoder=pipe.text_encoder, tokenizer=pipe.tokenizer)
|
262 |
pipe.load_textual_inversion(state_dict_embedding["clip_g"], token=["<s0>", "<s1>"], text_encoder=pipe.text_encoder_2, tokenizer=pipe.tokenizer_2)
|
|
|
257 |
if(is_pivotal):
|
258 |
#Add the textual inversion embeddings from pivotal tuning models
|
259 |
text_embedding_name = sdxl_loras[selected_state.index]["text_embedding_weights"]
|
260 |
+
embedding_path = hf_hub_download(repo_id=repo_name, filename=text_embedding_name, repo_type="model")
|
261 |
state_dict_embedding = load_file(text_embedding_name)
|
262 |
pipe.load_textual_inversion(state_dict_embedding["clip_l"], token=["<s0>", "<s1>"], text_encoder=pipe.text_encoder, tokenizer=pipe.tokenizer)
|
263 |
pipe.load_textual_inversion(state_dict_embedding["clip_g"], token=["<s0>", "<s1>"], text_encoder=pipe.text_encoder_2, tokenizer=pipe.tokenizer_2)
|