Spaces:
Running on Zero
Running on Zero
Commit ·
d1e77f7
1
Parent(s): 9d0034c
Layout: prompt + run inline above image; advanced settings in accordion below; match slider max_height to height
Browse files
app.py
CHANGED
|
@@ -332,28 +332,30 @@ CSS = " .dark .gradio-container { color: var(--body-text-color);"
|
|
| 332 |
with gr.Blocks(theme=gr.themes.Citrus(), css=CSS) as demo:
|
| 333 |
gr.Markdown(DESCRIPTION)
|
| 334 |
with gr.Row():
|
| 335 |
-
|
| 336 |
-
|
| 337 |
-
|
| 338 |
-
|
| 339 |
-
|
| 340 |
-
|
| 341 |
-
|
| 342 |
-
|
| 343 |
-
|
| 344 |
-
|
| 345 |
-
|
| 346 |
-
|
| 347 |
-
|
| 348 |
-
|
| 349 |
-
|
| 350 |
-
|
| 351 |
-
|
| 352 |
-
|
| 353 |
-
|
| 354 |
-
|
| 355 |
-
|
| 356 |
-
|
|
|
|
|
|
|
| 357 |
|
| 358 |
run.click(
|
| 359 |
fn=generate,
|
|
|
|
| 332 |
with gr.Blocks(theme=gr.themes.Citrus(), css=CSS) as demo:
|
| 333 |
gr.Markdown(DESCRIPTION)
|
| 334 |
with gr.Row():
|
| 335 |
+
prompt = gr.Textbox(
|
| 336 |
+
label="Prompt",
|
| 337 |
+
value="A photorealistic close-up of a brown tabby cat sitting on a rustic wooden table, morning light, ultra-detailed fur",
|
| 338 |
+
lines=1,
|
| 339 |
+
scale=4,
|
| 340 |
+
)
|
| 341 |
+
run = gr.Button("Run", variant="primary", scale=1)
|
| 342 |
+
|
| 343 |
+
live_preview = gr.Image(label="Generating Z-Image…", visible=True, show_label=True, type="pil", height=720)
|
| 344 |
+
slider = gr.ImageSlider(
|
| 345 |
+
label="Z-Image (left) ↔ PiD 4× upscale (right)",
|
| 346 |
+
visible=False,
|
| 347 |
+
type="pil",
|
| 348 |
+
height=720,
|
| 349 |
+
max_height=720,
|
| 350 |
+
)
|
| 351 |
+
|
| 352 |
+
with gr.Accordion("Advanced settings", open=False):
|
| 353 |
+
with gr.Row():
|
| 354 |
+
resolution = gr.Slider(label="Z-Image resolution", minimum=256, maximum=1024, step=128, value=512)
|
| 355 |
+
num_inference_steps = gr.Slider(label="Z-Image steps", minimum=8, maximum=50, step=1, value=28)
|
| 356 |
+
with gr.Row():
|
| 357 |
+
guidance_scale = gr.Slider(label="Guidance", minimum=1.0, maximum=10.0, step=0.5, value=5.0)
|
| 358 |
+
seed = gr.Number(label="Seed", value=0, precision=0)
|
| 359 |
|
| 360 |
run.click(
|
| 361 |
fn=generate,
|