Spaces:
Sleeping
Sleeping
yisol
commited on
Commit
β’
b7d9c38
1
Parent(s):
9296647
fix manual masking
Browse files
app.py
CHANGED
@@ -139,8 +139,8 @@ def start_tryon(dict,garm_img,garment_des,is_checked,denoise_steps,seed):
|
|
139 |
mask = mask.resize((768,1024))
|
140 |
else:
|
141 |
mask = pil_to_binary_mask(dict['layers'][0].convert("RGB").resize((768, 1024)))
|
142 |
-
mask = transforms.ToTensor()(mask)
|
143 |
-
mask = mask.unsqueeze(0)
|
144 |
mask_gray = (1-transforms.ToTensor()(mask)) * tensor_transfrom(human_img)
|
145 |
mask_gray = to_pil_image((mask_gray+1.0)/2.0)
|
146 |
|
|
|
139 |
mask = mask.resize((768,1024))
|
140 |
else:
|
141 |
mask = pil_to_binary_mask(dict['layers'][0].convert("RGB").resize((768, 1024)))
|
142 |
+
# mask = transforms.ToTensor()(mask)
|
143 |
+
# mask = mask.unsqueeze(0)
|
144 |
mask_gray = (1-transforms.ToTensor()(mask)) * tensor_transfrom(human_img)
|
145 |
mask_gray = to_pil_image((mask_gray+1.0)/2.0)
|
146 |
|