Spaces:
Running
on
Zero
Running
on
Zero
big changes in the object data return
Browse files
app.py
CHANGED
@@ -236,9 +236,11 @@ def start_tryon(dict,garm_img,garment_des,is_checked,is_checked_crop,denoise_ste
|
|
236 |
if is_checked_crop:
|
237 |
out_img = images[0].resize(crop_size)
|
238 |
human_img_orig.paste(out_img, (int(left), int(top)))
|
239 |
-
return human_img_orig, mask_gray
|
|
|
240 |
else:
|
241 |
-
return images[0], mask_gray
|
|
|
242 |
# return images[0], mask_gray
|
243 |
|
244 |
garm_list = os.listdir(os.path.join(example_path,"cloth"))
|
@@ -289,7 +291,7 @@ with image_blocks as demo:
|
|
289 |
# image_out = gr.Image(label="Output", elem_id="output-img", height=400)
|
290 |
# masked_img = gr.Image(label="Masked image output", elem_id="masked-img",show_share_button=False)
|
291 |
|
292 |
-
masked_img = ()
|
293 |
|
294 |
with gr.Column():
|
295 |
# image_out = gr.Image(label="Output", elem_id="output-img", height=400)
|
@@ -304,7 +306,7 @@ with image_blocks as demo:
|
|
304 |
|
305 |
|
306 |
|
307 |
-
try_button.click(fn=start_tryon, inputs=[imgs, garm_img, prompt, is_checked,is_checked_crop, denoise_steps, seed], outputs=[image_out
|
308 |
|
309 |
|
310 |
|
|
|
236 |
if is_checked_crop:
|
237 |
out_img = images[0].resize(crop_size)
|
238 |
human_img_orig.paste(out_img, (int(left), int(top)))
|
239 |
+
# return human_img_orig, mask_gray
|
240 |
+
return human_img_orig
|
241 |
else:
|
242 |
+
# return images[0], mask_gray
|
243 |
+
return images[0]
|
244 |
# return images[0], mask_gray
|
245 |
|
246 |
garm_list = os.listdir(os.path.join(example_path,"cloth"))
|
|
|
291 |
# image_out = gr.Image(label="Output", elem_id="output-img", height=400)
|
292 |
# masked_img = gr.Image(label="Masked image output", elem_id="masked-img",show_share_button=False)
|
293 |
|
294 |
+
# masked_img = ()
|
295 |
|
296 |
with gr.Column():
|
297 |
# image_out = gr.Image(label="Output", elem_id="output-img", height=400)
|
|
|
306 |
|
307 |
|
308 |
|
309 |
+
try_button.click(fn=start_tryon, inputs=[imgs, garm_img, prompt, is_checked,is_checked_crop, denoise_steps, seed], outputs=[image_out], api_name='tryon')
|
310 |
|
311 |
|
312 |
|