Spaces:
Running
on
Zero
Running
on
Zero
patrickligardes
commited on
Commit
β’
029e043
1
Parent(s):
1c35dfa
Update app.py
Browse files
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 =
|
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
|