Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -25,7 +25,8 @@ def upscale_image(model, input_image):
|
|
| 25 |
if model == "SD 2.0 2x Latent Upscaler":
|
| 26 |
upscaled_image = sd_2_0_2x(prompt="", image=input_image, num_inference_steps=5).images[0]
|
| 27 |
else:
|
| 28 |
-
|
|
|
|
| 29 |
|
| 30 |
# Convert the upscaled tensor back to a PIL image
|
| 31 |
|
|
|
|
| 25 |
if model == "SD 2.0 2x Latent Upscaler":
|
| 26 |
upscaled_image = sd_2_0_2x(prompt="", image=input_image, num_inference_steps=5).images[0]
|
| 27 |
else:
|
| 28 |
+
low_res_img = input_image.resize((128, 128))
|
| 29 |
+
upscaled_image = sd_2_1_4x(prompt="", image=low_res_img, num_inference_steps=5).images[0]
|
| 30 |
|
| 31 |
# Convert the upscaled tensor back to a PIL image
|
| 32 |
|