Spaces:
Running
on
Zero
Running
on
Zero
update
Browse files
app.py
CHANGED
@@ -328,9 +328,10 @@ with gr.Blocks() as demo:
|
|
328 |
6. **Click "Generate"**:
|
329 |
Your personalized image will be created. Enjoy!
|
330 |
|
331 |
-
|
|
|
332 |
|
333 |
-
Alternatively, you can randomly sample a specific number of male and female face images from our provided identity image dataset and choose a pose from the available options.
|
334 |
""")
|
335 |
|
336 |
with gr.Row():
|
@@ -388,13 +389,37 @@ with gr.Blocks() as demo:
|
|
388 |
}
|
389 |
|
390 |
|
391 |
-
with gr.
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
398 |
|
399 |
with gr.Row():
|
400 |
with gr.Column(scale=3):
|
@@ -410,33 +435,11 @@ with gr.Blocks() as demo:
|
|
410 |
show_label=True,
|
411 |
interactive=True
|
412 |
)
|
413 |
-
|
414 |
-
# Random Identity Selection
|
415 |
-
with gr.Row():
|
416 |
-
num_men_dropdown = gr.Dropdown(
|
417 |
-
choices=[str(i) for i in range(11)],
|
418 |
-
value="0",
|
419 |
-
label="Number of Men"
|
420 |
-
)
|
421 |
-
num_women_dropdown = gr.Dropdown(
|
422 |
-
choices=[str(i) for i in range(11)],
|
423 |
-
value="0",
|
424 |
-
label="Number of Women"
|
425 |
-
)
|
426 |
-
random_select_button = gr.Button("Random Select IDs")
|
427 |
|
428 |
|
429 |
with gr.Column(scale=2, min_width=100):
|
430 |
ui_control_image = gr.Image(label="Pose Reference Image", type="pil", height=370, min_width=100)
|
431 |
|
432 |
-
# Pose Selection based on Example Choices
|
433 |
-
pose_dropdown = gr.Dropdown(
|
434 |
-
choices=list(pose_name_to_path.keys()),
|
435 |
-
label="Select Pose Example",
|
436 |
-
interactive=True
|
437 |
-
)
|
438 |
-
pose_select_button = gr.Button("Load Pose")
|
439 |
-
|
440 |
|
441 |
ui_prompt_text = gr.Textbox(label="Text Prompt (Describe the image you would like to generate)", value="Portrait, 4K, high quality, cinematic")
|
442 |
ui_id_order = gr.Textbox(label="ID Order (If not specified, the images will follow the original upload order)", value = None)
|
@@ -456,7 +459,7 @@ with gr.Blocks() as demo:
|
|
456 |
|
457 |
|
458 |
with gr.Column(scale=2):
|
459 |
-
image_output = gr.Image(label="Generated Image", interactive=False, height=
|
460 |
openpose_control_image = gr.Image(label="OpenPose Image", interactive=False, height=549, format='png')
|
461 |
|
462 |
|
|
|
328 |
6. **Click "Generate"**:
|
329 |
Your personalized image will be created. Enjoy!
|
330 |
|
331 |
+
### 🔫 Example Playground
|
332 |
+
- We offer example settings that users can easily select and load all required settings (identity images, pose image and others) by clicking the **“Load Settings”** button for testing.
|
333 |
|
334 |
+
- Alternatively, you can randomly sample a specific number of male and female face images from our provided identity image dataset and/or choose a pose from the available options.
|
335 |
""")
|
336 |
|
337 |
with gr.Row():
|
|
|
389 |
}
|
390 |
|
391 |
|
392 |
+
with gr.Accordion("Example Playground", open=False):
|
393 |
+
with gr.Column():
|
394 |
+
selected_example = gr.Dropdown(
|
395 |
+
choices=list(example_choices.keys()),
|
396 |
+
label="Example Setting Selections (Identity Images + Pose + Others)",
|
397 |
+
interactive=True
|
398 |
+
)
|
399 |
+
load_example_btn = gr.Button("Load Settings")
|
400 |
+
|
401 |
+
with gr.Row():
|
402 |
+
with gr.Column(scale=3):
|
403 |
+
with gr.Row():
|
404 |
+
num_men_dropdown = gr.Dropdown(
|
405 |
+
choices=[str(i) for i in range(11)],
|
406 |
+
value="0",
|
407 |
+
label="Number of Men"
|
408 |
+
)
|
409 |
+
num_women_dropdown = gr.Dropdown(
|
410 |
+
choices=[str(i) for i in range(11)],
|
411 |
+
value="0",
|
412 |
+
label="Number of Women"
|
413 |
+
)
|
414 |
+
random_select_button = gr.Button("Random Select Identity Images")
|
415 |
+
|
416 |
+
with gr.Column(scale=2):
|
417 |
+
pose_dropdown = gr.Dropdown(
|
418 |
+
choices=list(pose_name_to_path.keys()),
|
419 |
+
label="Select Pose Example",
|
420 |
+
interactive=True
|
421 |
+
)
|
422 |
+
pose_select_button = gr.Button("Load Pose")
|
423 |
|
424 |
with gr.Row():
|
425 |
with gr.Column(scale=3):
|
|
|
435 |
show_label=True,
|
436 |
interactive=True
|
437 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
438 |
|
439 |
|
440 |
with gr.Column(scale=2, min_width=100):
|
441 |
ui_control_image = gr.Image(label="Pose Reference Image", type="pil", height=370, min_width=100)
|
442 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
443 |
|
444 |
ui_prompt_text = gr.Textbox(label="Text Prompt (Describe the image you would like to generate)", value="Portrait, 4K, high quality, cinematic")
|
445 |
ui_id_order = gr.Textbox(label="ID Order (If not specified, the images will follow the original upload order)", value = None)
|
|
|
459 |
|
460 |
|
461 |
with gr.Column(scale=2):
|
462 |
+
image_output = gr.Image(label="Generated Image", interactive=False, height=615, format='png')
|
463 |
openpose_control_image = gr.Image(label="OpenPose Image", interactive=False, height=549, format='png')
|
464 |
|
465 |
|