Spaces:
Sleeping
Sleeping
patrickligardes
commited on
Commit
β’
1c35dfa
1
Parent(s):
0fc995e
Update app.py
Browse files
app.py
CHANGED
@@ -154,6 +154,9 @@ def start_tryon(dict,garm_img,garment_des,is_checked,is_checked_crop,denoise_ste
|
|
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 |
else:
|
158 |
human_img = human_img_orig.resize((768,1024))
|
159 |
|
@@ -245,8 +248,9 @@ def start_tryon(dict,garm_img,garment_des,is_checked,is_checked_crop,denoise_ste
|
|
245 |
)[0]
|
246 |
|
247 |
if is_checked_crop:
|
248 |
-
out_img =
|
249 |
-
human_img_orig.paste(out_img, (int(left), int(top)))
|
|
|
250 |
return human_img_orig, mask_gray
|
251 |
else:
|
252 |
return images[0], mask_gray
|
|
|
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 |
+
|
159 |
+
|
160 |
else:
|
161 |
human_img = human_img_orig.resize((768,1024))
|
162 |
|
|
|
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
|
255 |
else:
|
256 |
return images[0], mask_gray
|