Spaces:
Runtime error
Runtime error
Update run/gradio_ootd.py
Browse files- run/gradio_ootd.py +6 -6
run/gradio_ootd.py
CHANGED
|
@@ -76,7 +76,7 @@ def process_hd(vton_img, garm_img, n_samples, n_steps, image_scale, seed):
|
|
| 76 |
return images
|
| 77 |
|
| 78 |
@spaces.GPU
|
| 79 |
-
def process_dc(vton_img, garm_img, category
|
| 80 |
model_type = 'dc'
|
| 81 |
if category == 'Upper-body':
|
| 82 |
category = 0
|
|
@@ -109,10 +109,10 @@ def process_dc(vton_img, garm_img, category, n_samples, n_steps, image_scale, se
|
|
| 109 |
image_vton=masked_vton_img,
|
| 110 |
mask=mask,
|
| 111 |
image_ori=vton_img,
|
| 112 |
-
num_samples=
|
| 113 |
-
num_steps=
|
| 114 |
-
image_scale=
|
| 115 |
-
seed
|
| 116 |
)
|
| 117 |
|
| 118 |
return images
|
|
@@ -282,7 +282,7 @@ with block:
|
|
| 282 |
# image_scale_dc = gr.Slider(label="Guidance scale", minimum=1.0, maximum=5.0, value=2.0, step=0.1)
|
| 283 |
# seed_dc = gr.Slider(label="Seed", minimum=-1, maximum=2147483647, step=1, value=-1)
|
| 284 |
|
| 285 |
-
ips_dc = [vton_img_dc, garm_img_dc, category_dc
|
| 286 |
run_button_dc.click(fn=process_dc, inputs=ips_dc, outputs=[result_gallery_dc])
|
| 287 |
|
| 288 |
|
|
|
|
| 76 |
return images
|
| 77 |
|
| 78 |
@spaces.GPU
|
| 79 |
+
def process_dc(vton_img, garm_img, category):
|
| 80 |
model_type = 'dc'
|
| 81 |
if category == 'Upper-body':
|
| 82 |
category = 0
|
|
|
|
| 109 |
image_vton=masked_vton_img,
|
| 110 |
mask=mask,
|
| 111 |
image_ori=vton_img,
|
| 112 |
+
num_samples=1,
|
| 113 |
+
num_steps=20,
|
| 114 |
+
image_scale=2.0,
|
| 115 |
+
seed=-1,
|
| 116 |
)
|
| 117 |
|
| 118 |
return images
|
|
|
|
| 282 |
# image_scale_dc = gr.Slider(label="Guidance scale", minimum=1.0, maximum=5.0, value=2.0, step=0.1)
|
| 283 |
# seed_dc = gr.Slider(label="Seed", minimum=-1, maximum=2147483647, step=1, value=-1)
|
| 284 |
|
| 285 |
+
ips_dc = [vton_img_dc, garm_img_dc, category_dc]
|
| 286 |
run_button_dc.click(fn=process_dc, inputs=ips_dc, outputs=[result_gallery_dc])
|
| 287 |
|
| 288 |
|