lnyan commited on
Commit
da9606c
·
1 Parent(s): d4607d7
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -234,9 +234,10 @@ def create_demo(model_name: str, device: str = "cuda", offload: bool = False):
234
  with gr.Row():
235
  seed = gr.Textbox(-1, label="Seed (-1 for random)")
236
  img_size = gr.Radio(["1,024x1,024", "512x512"], label="Image Resolution", value="1,024x1,024")
237
- num_steps = gr.Slider(1, 4, 1, step=1, label="Number of steps")
 
238
  add_sampling_metadata = gr.Checkbox(label="Add sampling parameters to metadata?", value=True)
239
- guidance = gr.Slider(1.0, 10.0, 3.5, step=0.1, label="Guidance", interactive=not is_schnell, visible=False)
240
 
241
 
242
 
@@ -265,5 +266,5 @@ def create_demo(model_name: str, device: str = "cuda", offload: bool = False):
265
  # parser.add_argument("--share", action="store_true", help="Create a public link to your demo")
266
  # args = parser.parse_args()
267
 
268
- demo = create_demo("flux-schnell", None, False)
269
  demo.launch()
 
234
  with gr.Row():
235
  seed = gr.Textbox(-1, label="Seed (-1 for random)")
236
  img_size = gr.Radio(["1,024x1,024", "512x512"], label="Image Resolution", value="1,024x1,024")
237
+ num_steps = gr.Slider(1, 50, 4 if is_schnell else 50, step=1, label="Number of steps")
238
+ guidance = gr.Slider(1.0, 10.0, 3.5, step=0.1, label="Guidance", interactive=not is_schnell)
239
  add_sampling_metadata = gr.Checkbox(label="Add sampling parameters to metadata?", value=True)
240
+ # guidance = gr.Slider(1.0, 10.0, 3.5, step=0.1, label="Guidance", interactive=not is_schnell, visible=False)
241
 
242
 
243
 
 
266
  # parser.add_argument("--share", action="store_true", help="Create a public link to your demo")
267
  # args = parser.parse_args()
268
 
269
+ demo = create_demo("flux-dev", None, False)
270
  demo.launch()