SemaSci commited on
Commit
00e8883
·
verified ·
1 Parent(s): 98e3bfb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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(model_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)
 
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)