parokshsaxena commited on
Commit
3f3bc41
Β·
1 Parent(s): 91c7a78

handling input as image or dict containing image and mask

Browse files
Files changed (1) hide show
  1. app.py +4 -2
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
- human_img_orig = human_img_dict["background"].convert("RGB") # ImageEditor
166
- #human_img_orig = human_img_dict.convert("RGB") # Image
 
 
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
  """