mikitona commited on
Commit
8a29c2c
·
verified ·
1 Parent(s): fcb4ba0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -141,7 +141,7 @@ def start_tryon(
141
  left = (width - target_width) / 2
142
  top = (height - target_height) / 2
143
  right = (width + target_width) / 2
144
- bottom = (height + target_width) / 2
145
  cropped_img = human_img_orig.crop((left, top, right, bottom))
146
  crop_size = cropped_img.size
147
  human_img = cropped_img.resize((768, 1024))
@@ -258,10 +258,10 @@ def start_tryon(
258
  output_images.value.append(new_image)
259
 
260
  # ギャラリーを更新しつつmasked_imgを保持
261
- yield output_images.value, gr.update()
262
 
263
  # 最終的な結果を返す
264
- return output_images.value, None
265
 
266
 
267
  garm_list = os.listdir(os.path.join(example_path, "cloth"))
 
141
  left = (width - target_width) / 2
142
  top = (height - target_height) / 2
143
  right = (width + target_width) / 2
144
+ bottom = (height + target_height) / 2
145
  cropped_img = human_img_orig.crop((left, top, right, bottom))
146
  crop_size = cropped_img.size
147
  human_img = cropped_img.resize((768, 1024))
 
258
  output_images.value.append(new_image)
259
 
260
  # ギャラリーを更新しつつmasked_imgを保持
261
+ yield output_images.value, mask_gray # mask_grayを再度渡す
262
 
263
  # 最終的な結果を返す
264
+ return output_images.value, mask_gray
265
 
266
 
267
  garm_list = os.listdir(os.path.join(example_path, "cloth"))