Spaces:
Runtime error
Runtime error
Commit
β’
acdd535
1
Parent(s):
a7bc50e
Update run/gradio_ootd.py
Browse files- run/gradio_ootd.py +24 -12
run/gradio_ootd.py
CHANGED
@@ -191,13 +191,13 @@ with block:
|
|
191 |
with gr.Column():
|
192 |
vton_img_dc = gr.Image(label="Model", sources='upload', type="filepath", height=384, value=model_dc)
|
193 |
example = gr.Examples(
|
194 |
-
label="",
|
195 |
inputs=vton_img_dc,
|
196 |
examples_per_page=7,
|
197 |
examples=[
|
198 |
-
|
199 |
# os.path.join(example_path, 'model/049447_0.jpg'),
|
200 |
-
|
201 |
# os.path.join(example_path, 'model/051482_0.jpg'),
|
202 |
# os.path.join(example_path, 'model/051918_0.jpg'),
|
203 |
# os.path.join(example_path, 'model/051962_0.jpg'),
|
@@ -205,14 +205,14 @@ with block:
|
|
205 |
]
|
206 |
)
|
207 |
example = gr.Examples(
|
208 |
-
label="",
|
209 |
inputs=vton_img_dc,
|
210 |
examples_per_page=7,
|
211 |
examples=[
|
212 |
-
|
213 |
# os.path.join(example_path, 'model/052767_0.jpg'),
|
214 |
# os.path.join(example_path, 'model/052472_0.jpg'),
|
215 |
-
|
216 |
# os.path.join(example_path, 'model/053228_0.jpg'),
|
217 |
# os.path.join(example_path, 'model/052964_0.jpg'),
|
218 |
# os.path.join(example_path, 'model/053700_0.jpg'),
|
@@ -226,6 +226,18 @@ with block:
|
|
226 |
inputs=garm_img_dc,
|
227 |
examples_per_page=7,
|
228 |
examples=[
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
229 |
os.path.join(example_path, 'garment/048554_1.jpg'),
|
230 |
os.path.join(example_path, 'garment/049920_1.jpg'),
|
231 |
os.path.join(example_path, 'garment/049965_1.jpg'),
|
@@ -264,13 +276,13 @@ with block:
|
|
264 |
result_gallery_dc = gr.Gallery(label='Output', show_label=False, elem_id="gallery", preview=True, scale=1)
|
265 |
with gr.Column():
|
266 |
run_button_dc = gr.Button(value="Run")
|
267 |
-
n_samples_dc = gr.Slider(label="Images", minimum=1, maximum=4, value=1, step=1)
|
268 |
-
n_steps_dc = gr.Slider(label="Steps", minimum=20, maximum=40, value=20, step=1)
|
269 |
-
# scale_dc = gr.Slider(label="Scale", minimum=1.0, maximum=12.0, value=5.0, step=0.1)
|
270 |
-
image_scale_dc = gr.Slider(label="Guidance scale", minimum=1.0, maximum=5.0, value=2.0, step=0.1)
|
271 |
-
seed_dc = gr.Slider(label="Seed", minimum=-1, maximum=2147483647, step=1, value=-1)
|
272 |
|
273 |
-
ips_dc = [vton_img_dc, garm_img_dc, category_dc,
|
274 |
run_button_dc.click(fn=process_dc, inputs=ips_dc, outputs=[result_gallery_dc])
|
275 |
|
276 |
|
|
|
191 |
with gr.Column():
|
192 |
vton_img_dc = gr.Image(label="Model", sources='upload', type="filepath", height=384, value=model_dc)
|
193 |
example = gr.Examples(
|
194 |
+
label="Select for Upper/Lower Body",
|
195 |
inputs=vton_img_dc,
|
196 |
examples_per_page=7,
|
197 |
examples=[
|
198 |
+
os.path.join(example_path, 'model/model_8.png'),
|
199 |
# os.path.join(example_path, 'model/049447_0.jpg'),
|
200 |
+
os.path.join(example_path, 'model/049713_0.jpg')
|
201 |
# os.path.join(example_path, 'model/051482_0.jpg'),
|
202 |
# os.path.join(example_path, 'model/051918_0.jpg'),
|
203 |
# os.path.join(example_path, 'model/051962_0.jpg'),
|
|
|
205 |
]
|
206 |
)
|
207 |
example = gr.Examples(
|
208 |
+
label="Select for Full Body Dress",
|
209 |
inputs=vton_img_dc,
|
210 |
examples_per_page=7,
|
211 |
examples=[
|
212 |
+
os.path.join(example_path, 'model/model_9.png'),
|
213 |
# os.path.join(example_path, 'model/052767_0.jpg'),
|
214 |
# os.path.join(example_path, 'model/052472_0.jpg'),
|
215 |
+
os.path.join(example_path, 'model/053514_0.jpg')
|
216 |
# os.path.join(example_path, 'model/053228_0.jpg'),
|
217 |
# os.path.join(example_path, 'model/052964_0.jpg'),
|
218 |
# os.path.join(example_path, 'model/053700_0.jpg'),
|
|
|
226 |
inputs=garm_img_dc,
|
227 |
examples_per_page=7,
|
228 |
examples=[
|
229 |
+
os.path.join(example_path,'garment/01260_00.jpg '),
|
230 |
+
os.path.join(example_path,'garment/01430_00.jpg '),
|
231 |
+
os.path.join(example_path,'garment/02783_00.jpg '),
|
232 |
+
os.path.join(example_path,'garment/03751_00.jpg '),
|
233 |
+
os.path.join(example_path,'garment/06429_00.jpg '),
|
234 |
+
os.path.join(example_path,'garment/06802_00.jpg '),
|
235 |
+
os.path.join(example_path,'garment/07429_00.jpg '),
|
236 |
+
os.path.join(example_path,'garment/08348_00.jpg '),
|
237 |
+
os.path.join(example_path,'garment/09933_00.jpg '),
|
238 |
+
os.path.join(example_path,'garment/11028_00.jpg '),
|
239 |
+
os.path.join(example_path,'garment/11351_00.jpg '),
|
240 |
+
os.path.join(example_path,'garment/11791_00.jpg '),
|
241 |
os.path.join(example_path, 'garment/048554_1.jpg'),
|
242 |
os.path.join(example_path, 'garment/049920_1.jpg'),
|
243 |
os.path.join(example_path, 'garment/049965_1.jpg'),
|
|
|
276 |
result_gallery_dc = gr.Gallery(label='Output', show_label=False, elem_id="gallery", preview=True, scale=1)
|
277 |
with gr.Column():
|
278 |
run_button_dc = gr.Button(value="Run")
|
279 |
+
# n_samples_dc = gr.Slider(label="Images", minimum=1, maximum=4, value=1, step=1)
|
280 |
+
# n_steps_dc = gr.Slider(label="Steps", minimum=20, maximum=40, value=20, step=1)
|
281 |
+
# # scale_dc = gr.Slider(label="Scale", minimum=1.0, maximum=12.0, value=5.0, step=0.1)
|
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, 1, 20, 2.0, -1]
|
286 |
run_button_dc.click(fn=process_dc, inputs=ips_dc, outputs=[result_gallery_dc])
|
287 |
|
288 |
|