Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -391,6 +391,45 @@ with gr.Blocks(delete_cache=(600, 600)) as demo:
|
|
| 391 |
with gr.Row():
|
| 392 |
prompt = gr.Textbox(label="Prompt")
|
| 393 |
style = gr.Dropdown(label="Style", choices=STYLE_NAMES, value=DEFAULT_STYLE_NAME)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 394 |
|
| 395 |
with gr.Tab(label="Multiple Images", id=1, visible=False) as multiimage_input_tab:
|
| 396 |
multiimage_prompt = gr.Gallery(label="Image Prompt", format="png", type="pil", height=300, columns=3)
|
|
@@ -400,44 +439,7 @@ with gr.Blocks(delete_cache=(600, 600)) as demo:
|
|
| 400 |
*NOTE: this is an experimental algorithm without training a specialized model. It may not produce the best results for all images, especially those having different poses or inconsistent details.*
|
| 401 |
""")
|
| 402 |
|
| 403 |
-
|
| 404 |
-
with gr.Tab(label="sketch-to-image generation"):
|
| 405 |
-
negative_prompt = gr.Textbox(label="Negative prompt")
|
| 406 |
-
|
| 407 |
-
num_steps = gr.Slider(
|
| 408 |
-
label="Number of steps",
|
| 409 |
-
minimum=1,
|
| 410 |
-
maximum=20,
|
| 411 |
-
step=1,
|
| 412 |
-
value=8,
|
| 413 |
-
)
|
| 414 |
-
guidance_scale = gr.Slider(
|
| 415 |
-
label="Guidance scale",
|
| 416 |
-
minimum=0.1,
|
| 417 |
-
maximum=10.0,
|
| 418 |
-
step=0.1,
|
| 419 |
-
value=5,
|
| 420 |
-
)
|
| 421 |
-
controlnet_conditioning_scale = gr.Slider(
|
| 422 |
-
label="controlnet conditioning scale",
|
| 423 |
-
minimum=0.5,
|
| 424 |
-
maximum=5.0,
|
| 425 |
-
step=0.01,
|
| 426 |
-
value=0.8,
|
| 427 |
-
)
|
| 428 |
-
with gr.Tab(label="3D generation"):
|
| 429 |
-
seed = gr.Slider(0, MAX_SEED, label="Seed", value=0, step=1)
|
| 430 |
-
randomize_seed = gr.Checkbox(label="Randomize Seed", value=True)
|
| 431 |
-
gr.Markdown("Stage 1: Sparse Structure Generation")
|
| 432 |
-
with gr.Row():
|
| 433 |
-
ss_guidance_strength = gr.Slider(0.0, 10.0, label="Guidance Strength", value=7.5, step=0.1)
|
| 434 |
-
ss_sampling_steps = gr.Slider(1, 50, label="Sampling Steps", value=12, step=1)
|
| 435 |
-
gr.Markdown("Stage 2: Structured Latent Generation")
|
| 436 |
-
with gr.Row():
|
| 437 |
-
slat_guidance_strength = gr.Slider(0.0, 10.0, label="Guidance Strength", value=3.0, step=0.1)
|
| 438 |
-
slat_sampling_steps = gr.Slider(1, 50, label="Sampling Steps", value=12, step=1)
|
| 439 |
-
multiimage_algo = gr.Radio(["stochastic", "multidiffusion"], label="Multi-image Algorithm", value="stochastic")
|
| 440 |
-
|
| 441 |
#generate_btn = gr.Button("Generate")
|
| 442 |
|
| 443 |
with gr.Accordion(label="GLB Extraction Settings", open=False):
|
|
|
|
| 391 |
with gr.Row():
|
| 392 |
prompt = gr.Textbox(label="Prompt")
|
| 393 |
style = gr.Dropdown(label="Style", choices=STYLE_NAMES, value=DEFAULT_STYLE_NAME)
|
| 394 |
+
|
| 395 |
+
with gr.Accordion(label="Generation Settings", open=False):
|
| 396 |
+
with gr.Tab(label="sketch-to-image generation"):
|
| 397 |
+
negative_prompt = gr.Textbox(label="Negative prompt")
|
| 398 |
+
|
| 399 |
+
num_steps = gr.Slider(
|
| 400 |
+
label="Number of steps",
|
| 401 |
+
minimum=1,
|
| 402 |
+
maximum=20,
|
| 403 |
+
step=1,
|
| 404 |
+
value=8,
|
| 405 |
+
)
|
| 406 |
+
guidance_scale = gr.Slider(
|
| 407 |
+
label="Guidance scale",
|
| 408 |
+
minimum=0.1,
|
| 409 |
+
maximum=10.0,
|
| 410 |
+
step=0.1,
|
| 411 |
+
value=5,
|
| 412 |
+
)
|
| 413 |
+
controlnet_conditioning_scale = gr.Slider(
|
| 414 |
+
label="controlnet conditioning scale",
|
| 415 |
+
minimum=0.5,
|
| 416 |
+
maximum=5.0,
|
| 417 |
+
step=0.01,
|
| 418 |
+
value=0.85,
|
| 419 |
+
)
|
| 420 |
+
with gr.Tab(label="3D generation"):
|
| 421 |
+
seed = gr.Slider(0, MAX_SEED, label="Seed", value=0, step=1)
|
| 422 |
+
randomize_seed = gr.Checkbox(label="Randomize Seed", value=True)
|
| 423 |
+
gr.Markdown("Stage 1: Sparse Structure Generation")
|
| 424 |
+
with gr.Row():
|
| 425 |
+
ss_guidance_strength = gr.Slider(0.0, 10.0, label="Guidance Strength", value=7.5, step=0.1)
|
| 426 |
+
ss_sampling_steps = gr.Slider(1, 50, label="Sampling Steps", value=12, step=1)
|
| 427 |
+
gr.Markdown("Stage 2: Structured Latent Generation")
|
| 428 |
+
with gr.Row():
|
| 429 |
+
slat_guidance_strength = gr.Slider(0.0, 10.0, label="Guidance Strength", value=3.0, step=0.1)
|
| 430 |
+
slat_sampling_steps = gr.Slider(1, 50, label="Sampling Steps", value=12, step=1)
|
| 431 |
+
multiimage_algo = gr.Radio(["stochastic", "multidiffusion"], label="Multi-image Algorithm", value="stochastic")
|
| 432 |
+
|
| 433 |
|
| 434 |
with gr.Tab(label="Multiple Images", id=1, visible=False) as multiimage_input_tab:
|
| 435 |
multiimage_prompt = gr.Gallery(label="Image Prompt", format="png", type="pil", height=300, columns=3)
|
|
|
|
| 439 |
*NOTE: this is an experimental algorithm without training a specialized model. It may not produce the best results for all images, especially those having different poses or inconsistent details.*
|
| 440 |
""")
|
| 441 |
|
| 442 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 443 |
#generate_btn = gr.Button("Generate")
|
| 444 |
|
| 445 |
with gr.Accordion(label="GLB Extraction Settings", open=False):
|