Linaqruf commited on
Commit
74c9a77
1 Parent(s): 2c7a9ac

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -146,7 +146,7 @@ def generate(
146
  output_type="latent",
147
  ).images
148
  upscaled_latents = utils.upscale(latents, "nearest-exact", upscale_by)
149
- image = upscaler_pipe(
150
  prompt=prompt,
151
  negative_prompt=negative_prompt,
152
  image=upscaled_latents,
@@ -155,9 +155,9 @@ def generate(
155
  strength=upscaler_strength,
156
  generator=generator,
157
  output_type="pil",
158
- ).images[0]
159
  else:
160
- image = pipe(
161
  prompt=prompt,
162
  negative_prompt=negative_prompt,
163
  width=width,
@@ -166,7 +166,7 @@ def generate(
166
  num_inference_steps=num_inference_steps,
167
  generator=generator,
168
  output_type="pil",
169
- ).images[0]
170
 
171
  if images and IS_COLAB:
172
  for image in images:
 
146
  output_type="latent",
147
  ).images
148
  upscaled_latents = utils.upscale(latents, "nearest-exact", upscale_by)
149
+ images = upscaler_pipe(
150
  prompt=prompt,
151
  negative_prompt=negative_prompt,
152
  image=upscaled_latents,
 
155
  strength=upscaler_strength,
156
  generator=generator,
157
  output_type="pil",
158
+ ).images
159
  else:
160
+ images = pipe(
161
  prompt=prompt,
162
  negative_prompt=negative_prompt,
163
  width=width,
 
166
  num_inference_steps=num_inference_steps,
167
  generator=generator,
168
  output_type="pil",
169
+ ).images
170
 
171
  if images and IS_COLAB:
172
  for image in images: