altayavci commited on
Commit
c271b37
1 Parent(s): 62805d5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -9,14 +9,14 @@ human = os.path.join(os.path.dirname(__file__), "humans/manken3.jpg")
9
 
10
 
11
  def get_tryon_result(human_path, top_path, down_path):
12
- human_img = Image.open(human_path).convert("RGB")
13
  # UPPER BODY 4 , LOWER BODY 6
14
  if top_path:
15
  segment_id = 4
16
- clothes_img = Image.open(top_path).convert("RGB")
17
  elif down_path:
18
  segment_id = 6
19
- clothes_img = Image.open(down_path).convert("RGB")
20
 
21
  img_openpose_gen = generate_ip_adapter_openpose(human_img, clothes_img)
22
  final_gen = generate_ip_adapter_inpainting(img_openpose_gen,
 
9
 
10
 
11
  def get_tryon_result(human_path, top_path, down_path):
12
+ human_img = Image.open(human_path).convert("RGB").resize((512,512))
13
  # UPPER BODY 4 , LOWER BODY 6
14
  if top_path:
15
  segment_id = 4
16
+ clothes_img = Image.open(top_path).convert("RGB").resize((512,768))
17
  elif down_path:
18
  segment_id = 6
19
+ clothes_img = Image.open(down_path).convert("RGB").resize((512,768))
20
 
21
  img_openpose_gen = generate_ip_adapter_openpose(human_img, clothes_img)
22
  final_gen = generate_ip_adapter_inpainting(img_openpose_gen,