Manjushri commited on
Commit
d56c06c
·
1 Parent(s): 8194643

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
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
- upscaled_image = sd_2_1_4x(prompt="", image=input_image, num_inference_steps=5).images[0]
 
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