Spaces:
Running
on
Zero
Running
on
Zero
parokshsaxena
commited on
Commit
Β·
3f3bc41
1
Parent(s):
91c7a78
handling input as image or dict containing image and mask
Browse files
app.py
CHANGED
@@ -162,8 +162,10 @@ def start_tryon(human_img_dict,garm_img,garment_des, background_img, is_checked,
|
|
162 |
pipe.unet_encoder.to(device)
|
163 |
# pipe.garment_net.to(device)
|
164 |
|
165 |
-
|
166 |
-
|
|
|
|
|
167 |
|
168 |
|
169 |
"""
|
|
|
162 |
pipe.unet_encoder.to(device)
|
163 |
# pipe.garment_net.to(device)
|
164 |
|
165 |
+
if isinstance(human_img_dict, dict):
|
166 |
+
human_img_orig = human_img_dict["background"].convert("RGB") # ImageEditor
|
167 |
+
else:
|
168 |
+
human_img_orig = human_img_dict.convert("RGB") # Image
|
169 |
|
170 |
|
171 |
"""
|