apolinario commited on
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
Files changed (1) hide show
  1. app.py +24 -22
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
- with gr.Column(scale=1):
336
- prompt = gr.Textbox(
337
- label="Prompt",
338
- value="A photorealistic close-up of a brown tabby cat sitting on a rustic wooden table, morning light, ultra-detailed fur",
339
- lines=3,
340
- )
341
- with gr.Row():
342
- resolution = gr.Slider(label="Z-Image resolution", minimum=256, maximum=1024, step=128, value=512)
343
- num_inference_steps = gr.Slider(label="Z-Image steps", minimum=8, maximum=50, step=1, value=28)
344
- with gr.Row():
345
- guidance_scale = gr.Slider(label="Guidance", minimum=1.0, maximum=10.0, step=0.5, value=5.0)
346
- seed = gr.Number(label="Seed", value=0, precision=0)
347
- run = gr.Button("Run", variant="primary")
348
- with gr.Column(scale=2):
349
- live_preview = gr.Image(label="Generating Z-Image…", visible=True, show_label=True, type="pil", height=720)
350
- slider = gr.ImageSlider(
351
- label="Z-Image (left) ↔ PiD 4× upscale (right)",
352
- visible=False,
353
- type="pil",
354
- height=720,
355
- max_height=900,
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 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,