patrickligardes commited on
Commit
e526788
β€’
1 Parent(s): f38a0d1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -246,8 +246,11 @@ def start_tryon(dict,garm_img,garment_des,is_checked,is_checked_crop,denoise_ste
246
  )[0]
247
 
248
  if is_checked_crop:
249
- out_img =images[0].resize(crop_size)
250
- human_img_orig.paste(out_img, (int(left), int(top)))
 
 
 
251
 
252
  return human_img_orig, mask_gray
253
  else:
 
246
  )[0]
247
 
248
  if is_checked_crop:
249
+ if not (0.45 < aspect_ratio < 0.46):
250
+ out_img =images[0].resize(crop_size)
251
+ human_img_orig.paste(out_img, (int(left), int(top)))
252
+ else:
253
+ return images[0], mask_gray
254
 
255
  return human_img_orig, mask_gray
256
  else: