Spaces:
Runtime error
Runtime error
Cagliostro
commited on
Commit
•
433fc87
1
Parent(s):
add553d
Update app.py
Browse files
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 |
-
|
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
|
159 |
else:
|
160 |
-
|
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
|
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:
|