simapeng commited on
Commit
ee7ac8f
·
1 Parent(s): 722a9f9
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -304,7 +304,7 @@ def generate_image(
304
  image.save(tmp_img.name, format="PNG")
305
  image_paths.append(tmp_img.name)
306
 
307
- return images, ", ".join(str(s) for s in seeds), image_paths
308
 
309
 
310
 
@@ -419,7 +419,7 @@ with gr.Blocks(title="Z-Image-Turbo Demo", css=CUSTOM_CSS, analytics_enabled=Fal
419
  )
420
  randomize_seed = gr.Checkbox(
421
  label="Randomize",
422
- value=False,
423
  interactive=True,
424
  )
425
 
@@ -467,7 +467,7 @@ with gr.Blocks(title="Z-Image-Turbo Demo", css=CUSTOM_CSS, analytics_enabled=Fal
467
  generate_btn.click(
468
  fn=generate_image,
469
  inputs=[prompt, negative_prompt, height, width, images_count, num_inference_steps, guidance_scale, seed, randomize_seed],
470
- outputs=[output_images, used_seeds, image_state],
471
  ).success(
472
  fn=append_history,
473
  inputs=[image_state, history_state],
@@ -478,7 +478,7 @@ with gr.Blocks(title="Z-Image-Turbo Demo", css=CUSTOM_CSS, analytics_enabled=Fal
478
  prompt.submit(
479
  fn=generate_image,
480
  inputs=[prompt, negative_prompt, height, width, images_count, num_inference_steps, guidance_scale, seed, randomize_seed],
481
- outputs=[output_images, used_seeds, image_state],
482
  ).success(
483
  fn=append_history,
484
  inputs=[image_state, history_state],
 
304
  image.save(tmp_img.name, format="PNG")
305
  image_paths.append(tmp_img.name)
306
 
307
+ return images, ", ".join(str(s) for s in seeds), image_paths, base_seed
308
 
309
 
310
 
 
419
  )
420
  randomize_seed = gr.Checkbox(
421
  label="Randomize",
422
+ value=True,
423
  interactive=True,
424
  )
425
 
 
467
  generate_btn.click(
468
  fn=generate_image,
469
  inputs=[prompt, negative_prompt, height, width, images_count, num_inference_steps, guidance_scale, seed, randomize_seed],
470
+ outputs=[output_images, used_seeds, image_state, seed],
471
  ).success(
472
  fn=append_history,
473
  inputs=[image_state, history_state],
 
478
  prompt.submit(
479
  fn=generate_image,
480
  inputs=[prompt, negative_prompt, height, width, images_count, num_inference_steps, guidance_scale, seed, randomize_seed],
481
+ outputs=[output_images, used_seeds, image_state, seed],
482
  ).success(
483
  fn=append_history,
484
  inputs=[image_state, history_state],