patrickligardes commited on
Commit
029e043
β€’
1 Parent(s): 1c35dfa

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -153,6 +153,7 @@ def start_tryon(dict,garm_img,garment_des,is_checked,is_checked_crop,denoise_ste
153
  right = (width + target_width) / 2
154
  bottom = (height + target_height) / 2
155
  cropped_img = human_img_orig.crop((left, top, right, bottom))
 
156
  human_img = cropped_img.resize((768, 1024))
157
 
158
 
@@ -248,7 +249,7 @@ def start_tryon(dict,garm_img,garment_des,is_checked,is_checked_crop,denoise_ste
248
  )[0]
249
 
250
  if is_checked_crop:
251
- out_img = human_img.resize((int(right - left), int(bottom - top)))
252
  human_img_orig.paste(out_img, (int(left), int(top)))
253
 
254
  return human_img_orig, mask_gray
 
153
  right = (width + target_width) / 2
154
  bottom = (height + target_height) / 2
155
  cropped_img = human_img_orig.crop((left, top, right, bottom))
156
+ crop_size = cropped_img.size
157
  human_img = cropped_img.resize((768, 1024))
158
 
159
 
 
249
  )[0]
250
 
251
  if is_checked_crop:
252
+ out_img =images[0].resize(crop_size)
253
  human_img_orig.paste(out_img, (int(left), int(top)))
254
 
255
  return human_img_orig, mask_gray