Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -462,7 +462,6 @@ css = """
|
|
| 462 |
with gr.Blocks(css=css) as demo:
|
| 463 |
# description
|
| 464 |
gr.Markdown(title)
|
| 465 |
-
gr.Markdown(description)
|
| 466 |
|
| 467 |
with gr.Row():
|
| 468 |
with gr.Column():
|
|
@@ -471,11 +470,6 @@ with gr.Blocks(css=css) as demo:
|
|
| 471 |
face_file = gr.Image(
|
| 472 |
label="Upload a photo of your face", type="filepath"
|
| 473 |
)
|
| 474 |
-
# optional: upload a reference pose image
|
| 475 |
-
pose_file = gr.Image(
|
| 476 |
-
label="Upload a reference pose image (Optional)",
|
| 477 |
-
type="filepath",
|
| 478 |
-
)
|
| 479 |
|
| 480 |
# prompt
|
| 481 |
prompt = gr.Textbox(
|
|
@@ -486,32 +480,38 @@ with gr.Blocks(css=css) as demo:
|
|
| 486 |
)
|
| 487 |
|
| 488 |
submit = gr.Button("Submit", variant="primary")
|
| 489 |
-
|
| 490 |
-
|
| 491 |
-
|
| 492 |
-
|
| 493 |
-
|
| 494 |
-
|
| 495 |
-
|
| 496 |
-
|
| 497 |
-
|
|
|
|
| 498 |
|
| 499 |
-
|
| 500 |
-
|
| 501 |
-
|
| 502 |
-
|
| 503 |
-
|
| 504 |
-
|
| 505 |
-
|
| 506 |
-
|
| 507 |
-
|
| 508 |
-
|
| 509 |
-
|
| 510 |
-
|
| 511 |
-
|
| 512 |
-
|
| 513 |
-
|
| 514 |
-
with gr.Accordion("Controlnet"):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 515 |
controlnet_selection = gr.CheckboxGroup(
|
| 516 |
["canny", "depth"], label="Controlnet", value=[],
|
| 517 |
info="Use pose for skeleton inference, canny for edge detection, and depth for depth map estimation. You can try all three to control the generation process"
|
|
|
|
| 462 |
with gr.Blocks(css=css) as demo:
|
| 463 |
# description
|
| 464 |
gr.Markdown(title)
|
|
|
|
| 465 |
|
| 466 |
with gr.Row():
|
| 467 |
with gr.Column():
|
|
|
|
| 470 |
face_file = gr.Image(
|
| 471 |
label="Upload a photo of your face", type="filepath"
|
| 472 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 473 |
|
| 474 |
# prompt
|
| 475 |
prompt = gr.Textbox(
|
|
|
|
| 480 |
)
|
| 481 |
|
| 482 |
submit = gr.Button("Submit", variant="primary")
|
| 483 |
+
with gr.Accordion("Advanced options", open=False):
|
| 484 |
+
enable_LCM = gr.Checkbox(
|
| 485 |
+
label="Enable Fast Inference with LCM", value=enable_lcm_arg,
|
| 486 |
+
info="LCM speeds up the inference step, the trade-off is the quality of the generated image. It performs better with portrait face images rather than distant faces",
|
| 487 |
+
)
|
| 488 |
+
style = gr.Dropdown(
|
| 489 |
+
label="Style template",
|
| 490 |
+
choices=STYLE_NAMES,
|
| 491 |
+
value=DEFAULT_STYLE_NAME,
|
| 492 |
+
)
|
| 493 |
|
| 494 |
+
# strength
|
| 495 |
+
identitynet_strength_ratio = gr.Slider(
|
| 496 |
+
label="IdentityNet strength (for fidelity)",
|
| 497 |
+
minimum=0,
|
| 498 |
+
maximum=1.5,
|
| 499 |
+
step=0.05,
|
| 500 |
+
value=0.80,
|
| 501 |
+
)
|
| 502 |
+
adapter_strength_ratio = gr.Slider(
|
| 503 |
+
label="Image adapter strength (for detail)",
|
| 504 |
+
minimum=0,
|
| 505 |
+
maximum=1.5,
|
| 506 |
+
step=0.05,
|
| 507 |
+
value=0.80,
|
| 508 |
+
)
|
| 509 |
+
with gr.Accordion("Controlnet", open=False):
|
| 510 |
+
# optional: upload a reference pose image
|
| 511 |
+
pose_file = gr.Image(
|
| 512 |
+
label="Upload a reference pose image (Optional)",
|
| 513 |
+
type="filepath",
|
| 514 |
+
)
|
| 515 |
controlnet_selection = gr.CheckboxGroup(
|
| 516 |
["canny", "depth"], label="Controlnet", value=[],
|
| 517 |
info="Use pose for skeleton inference, canny for edge detection, and depth for depth map estimation. You can try all three to control the generation process"
|