Spaces:
Running
on
Zero
Running
on
Zero
rlawjdghek
commited on
Commit
β’
4405af8
1
Parent(s):
6facc96
stableviton
Browse files- app.py +3 -4
- examples/garment/00176_00.jpg +0 -0
- examples/garment/11967_00.jpg +0 -0
- examples/garment/12469_00.jpg +0 -0
app.py
CHANGED
@@ -28,6 +28,7 @@ IMG_H = 512
|
|
28 |
IMG_W = 384
|
29 |
|
30 |
openpose_model_hd = OpenPose(0)
|
|
|
31 |
parsing_model_hd = Parsing(0)
|
32 |
densepose_model_hd = DensePose4Gradio(
|
33 |
cfg='preprocess/detectron2/projects/DensePose/configs/densepose_rcnn_R_50_FPN_s1x.yaml',
|
@@ -92,8 +93,6 @@ def process_hd(vton_img, garm_img, n_steps):
|
|
92 |
model_type = 'hd'
|
93 |
category = 0 # 0:upperbody; 1:lowerbody; 2:dress
|
94 |
|
95 |
-
openpose_model_hd.preprocessor.body_estimation.model.to('cuda')
|
96 |
-
|
97 |
stt = time.time()
|
98 |
print('load images... ', end='')
|
99 |
garm_img = Image.open(garm_img).resize((IMG_W, IMG_H))
|
@@ -186,11 +185,11 @@ with gr.Blocks(css='style.css') as demo:
|
|
186 |
run_button = gr.Button(value="Run")
|
187 |
# TODO: change default values (important!)
|
188 |
# n_samples = gr.Slider(label="Images", minimum=1, maximum=4, value=1, step=1)
|
189 |
-
n_steps = gr.Slider(label="Steps", minimum=20, maximum=70, value=
|
190 |
# guidance_scale = gr.Slider(label="Guidance scale", minimum=1.0, maximum=5.0, value=2.0, step=0.1)
|
191 |
# seed = gr.Slider(label="Seed", minimum=-1, maximum=2147483647, step=1, value=-1)
|
192 |
|
193 |
ips = [vton_img, garm_img, n_steps]
|
194 |
run_button.click(fn=process_hd, inputs=ips, outputs=[result_gallery])
|
195 |
|
196 |
-
demo.queue().launch()
|
|
|
28 |
IMG_W = 384
|
29 |
|
30 |
openpose_model_hd = OpenPose(0)
|
31 |
+
openpose_model_hd.preprocessor.body_estimation.model.to('cuda')
|
32 |
parsing_model_hd = Parsing(0)
|
33 |
densepose_model_hd = DensePose4Gradio(
|
34 |
cfg='preprocess/detectron2/projects/DensePose/configs/densepose_rcnn_R_50_FPN_s1x.yaml',
|
|
|
93 |
model_type = 'hd'
|
94 |
category = 0 # 0:upperbody; 1:lowerbody; 2:dress
|
95 |
|
|
|
|
|
96 |
stt = time.time()
|
97 |
print('load images... ', end='')
|
98 |
garm_img = Image.open(garm_img).resize((IMG_W, IMG_H))
|
|
|
185 |
run_button = gr.Button(value="Run")
|
186 |
# TODO: change default values (important!)
|
187 |
# n_samples = gr.Slider(label="Images", minimum=1, maximum=4, value=1, step=1)
|
188 |
+
n_steps = gr.Slider(label="Steps", minimum=20, maximum=70, value=25, step=1)
|
189 |
# guidance_scale = gr.Slider(label="Guidance scale", minimum=1.0, maximum=5.0, value=2.0, step=0.1)
|
190 |
# seed = gr.Slider(label="Seed", minimum=-1, maximum=2147483647, step=1, value=-1)
|
191 |
|
192 |
ips = [vton_img, garm_img, n_steps]
|
193 |
run_button.click(fn=process_hd, inputs=ips, outputs=[result_gallery])
|
194 |
|
195 |
+
demo.queue().launch(share=True)
|
examples/garment/00176_00.jpg
DELETED
Binary file (46.3 kB)
|
|
examples/garment/11967_00.jpg
ADDED
examples/garment/12469_00.jpg
ADDED