Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -427,7 +427,8 @@ def generate_image(
|
|
| 427 |
|
| 428 |
# Description
|
| 429 |
title = r"""
|
| 430 |
-
<h1 align="center">InstantID: Zero-shot Identity-Preserving Generation in Seconds</h1>
|
|
|
|
| 431 |
"""
|
| 432 |
|
| 433 |
article = r"""
|
|
@@ -506,38 +507,6 @@ with gr.Blocks(css=css) as demo:
|
|
| 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"
|
| 518 |
-
)
|
| 519 |
-
# pose_strength = gr.Slider(
|
| 520 |
-
# label="Pose strength",
|
| 521 |
-
# minimum=0,
|
| 522 |
-
# maximum=1.5,
|
| 523 |
-
# step=0.05,
|
| 524 |
-
# value=0.40,
|
| 525 |
-
# )
|
| 526 |
-
canny_strength = gr.Slider(
|
| 527 |
-
label="Canny strength",
|
| 528 |
-
minimum=0,
|
| 529 |
-
maximum=1.5,
|
| 530 |
-
step=0.05,
|
| 531 |
-
value=0,
|
| 532 |
-
)
|
| 533 |
-
depth_strength = gr.Slider(
|
| 534 |
-
label="Depth strength",
|
| 535 |
-
minimum=0,
|
| 536 |
-
maximum=1.5,
|
| 537 |
-
step=0.05,
|
| 538 |
-
value=0,
|
| 539 |
-
)
|
| 540 |
-
with gr.Accordion(open=False, label="Advanced Options"):
|
| 541 |
negative_prompt = gr.Textbox(
|
| 542 |
label="Negative Prompt",
|
| 543 |
placeholder="low quality",
|
|
@@ -579,6 +548,38 @@ with gr.Blocks(css=css) as demo:
|
|
| 579 |
)
|
| 580 |
randomize_seed = gr.Checkbox(label="Randomize seed", value=True)
|
| 581 |
enhance_face_region = gr.Checkbox(label="Enhance non-face region", value=True)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 582 |
|
| 583 |
with gr.Column(scale=1):
|
| 584 |
gallery = gr.Image(label="Generated Images")
|
|
|
|
| 427 |
|
| 428 |
# Description
|
| 429 |
title = r"""
|
| 430 |
+
<h1 align="center">InstantID FaceID 6M: Zero-shot Identity-Preserving Generation in Seconds</h1>
|
| 431 |
+
Demo for the `Super-shuhe/InstantID-FaceID-6M` trained on the [FaceID 6M](https://huggingface.co/datasets/Super-shuhe/FaceID-6M) open dataset of 6M faces
|
| 432 |
"""
|
| 433 |
|
| 434 |
article = r"""
|
|
|
|
| 507 |
step=0.05,
|
| 508 |
value=0.80,
|
| 509 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 510 |
negative_prompt = gr.Textbox(
|
| 511 |
label="Negative Prompt",
|
| 512 |
placeholder="low quality",
|
|
|
|
| 548 |
)
|
| 549 |
randomize_seed = gr.Checkbox(label="Randomize seed", value=True)
|
| 550 |
enhance_face_region = gr.Checkbox(label="Enhance non-face region", value=True)
|
| 551 |
+
|
| 552 |
+
with gr.Accordion("Controlnet", open=False):
|
| 553 |
+
# optional: upload a reference pose image
|
| 554 |
+
pose_file = gr.Image(
|
| 555 |
+
label="Upload a reference pose image (Optional)",
|
| 556 |
+
type="filepath",
|
| 557 |
+
)
|
| 558 |
+
controlnet_selection = gr.CheckboxGroup(
|
| 559 |
+
["canny", "depth"], label="Controlnet", value=[],
|
| 560 |
+
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"
|
| 561 |
+
)
|
| 562 |
+
# pose_strength = gr.Slider(
|
| 563 |
+
# label="Pose strength",
|
| 564 |
+
# minimum=0,
|
| 565 |
+
# maximum=1.5,
|
| 566 |
+
# step=0.05,
|
| 567 |
+
# value=0.40,
|
| 568 |
+
# )
|
| 569 |
+
canny_strength = gr.Slider(
|
| 570 |
+
label="Canny strength",
|
| 571 |
+
minimum=0,
|
| 572 |
+
maximum=1.5,
|
| 573 |
+
step=0.05,
|
| 574 |
+
value=0,
|
| 575 |
+
)
|
| 576 |
+
depth_strength = gr.Slider(
|
| 577 |
+
label="Depth strength",
|
| 578 |
+
minimum=0,
|
| 579 |
+
maximum=1.5,
|
| 580 |
+
step=0.05,
|
| 581 |
+
value=0,
|
| 582 |
+
)
|
| 583 |
|
| 584 |
with gr.Column(scale=1):
|
| 585 |
gallery = gr.Image(label="Generated Images")
|