Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -103,7 +103,7 @@ def infer(
|
|
103 |
|
104 |
# добавляем обновление pipe по условию
|
105 |
if model_repo_id != model_id_default:
|
106 |
-
pipe = DiffusionPipeline.from_pretrained(
|
107 |
prompt_embeds = process_prompt(prompt, pipe.tokenizer, pipe.text_encoder)
|
108 |
negative_prompt_embeds = process_prompt(negative_prompt, pipe.tokenizer, pipe.text_encoder)
|
109 |
prompt_embeds, negative_prompt_embeds = align_embeddings(prompt_embeds, negative_prompt_embeds)
|
|
|
103 |
|
104 |
# добавляем обновление pipe по условию
|
105 |
if model_repo_id != model_id_default:
|
106 |
+
pipe = DiffusionPipeline.from_pretrained(model_repo_id, torch_dtype=torch_dtype).to(device)
|
107 |
prompt_embeds = process_prompt(prompt, pipe.tokenizer, pipe.text_encoder)
|
108 |
negative_prompt_embeds = process_prompt(negative_prompt, pipe.tokenizer, pipe.text_encoder)
|
109 |
prompt_embeds, negative_prompt_embeds = align_embeddings(prompt_embeds, negative_prompt_embeds)
|