Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
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 |
-
|
| 250 |
-
|
|
|
|
|
|
|
|
|
|
| 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:
|