alfredplpl commited on
Commit
662c196
1 Parent(s): 31eb163

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -25,6 +25,7 @@ pipe = AutoPipelineForText2Image.from_pretrained(
25
  torch_dtype=torch.float16 if torch.cuda.is_available() else torch.float32,
26
  scheduler=scheduler,
27
  token=auth_token)
 
28
 
29
  #pipe = AutoPipelineForText2Image.from_pretrained(
30
  # model_id,
@@ -113,7 +114,7 @@ def auto_prompt_correction(prompt_ui,neg_prompt_ui,disable_auto_prompt_correctio
113
  #
114
  def txt_to_img(prompt, neg_prompt, guidance, steps, width, height, generator):
115
  conditioning, pooled = compel([prompt, neg_prompt])
116
- pipe=pipe.to("cuda")
117
  result = pipe(
118
  prompt_embeds=conditioning[0:1],
119
  pooled_prompt_embeds=pooled[0:1],
 
25
  torch_dtype=torch.float16 if torch.cuda.is_available() else torch.float32,
26
  scheduler=scheduler,
27
  token=auth_token)
28
+ pipe=pipe.to("cuda")
29
 
30
  #pipe = AutoPipelineForText2Image.from_pretrained(
31
  # model_id,
 
114
  #
115
  def txt_to_img(prompt, neg_prompt, guidance, steps, width, height, generator):
116
  conditioning, pooled = compel([prompt, neg_prompt])
117
+
118
  result = pipe(
119
  prompt_embeds=conditioning[0:1],
120
  pooled_prompt_embeds=pooled[0:1],