leoeric commited on
Commit
06f3d78
Β·
1 Parent(s): 3421c13

Remove unsupported info parameters from Gradio components for compatibility

Browse files
Files changed (1) hide show
  1. app.py +12 -24
app.py CHANGED
@@ -388,14 +388,12 @@ with gr.Blocks(title="STARFlow - Text-to-Image & Video Generation") as demo:
388
  image_prompt = gr.Textbox(
389
  label="πŸ“ Prompt",
390
  placeholder="a film still of a cat playing piano",
391
- lines=4,
392
- info="Describe the image you want to generate"
393
  )
394
  image_config = gr.Textbox(
395
  label="βš™οΈ Config Path",
396
  value="configs/starflow_3B_t2i_256x256.yaml",
397
- interactive=False,
398
- info="Model configuration file"
399
  )
400
 
401
  with gr.Group():
@@ -403,22 +401,19 @@ with gr.Blocks(title="STARFlow - Text-to-Image & Video Generation") as demo:
403
  image_aspect = gr.Dropdown(
404
  label="Aspect Ratio",
405
  choices=["1:1", "2:3", "3:2", "16:9", "9:16", "4:5", "5:4"],
406
- value="1:1",
407
- info="Image dimensions ratio"
408
  )
409
  image_cfg = gr.Slider(
410
  label="CFG Scale",
411
  minimum=1.0,
412
  maximum=10.0,
413
  value=3.6,
414
- step=0.1,
415
- info="Classifier-free guidance scale (higher = more prompt adherence)"
416
  )
417
  image_seed = gr.Number(
418
  value=999,
419
  label="🎲 Seed",
420
- precision=0,
421
- info="Random seed for reproducibility"
422
  )
423
 
424
  # Hidden checkpoint field
@@ -468,14 +463,12 @@ with gr.Blocks(title="STARFlow - Text-to-Image & Video Generation") as demo:
468
  video_prompt = gr.Textbox(
469
  label="πŸ“ Prompt",
470
  placeholder="a corgi dog looks at the camera",
471
- lines=4,
472
- info="Describe the video you want to generate"
473
  )
474
  video_config = gr.Textbox(
475
  label="βš™οΈ Config Path",
476
  value="configs/starflow-v_7B_t2v_caus_480p.yaml",
477
- interactive=False,
478
- info="Model configuration file"
479
  )
480
 
481
  with gr.Group():
@@ -483,38 +476,33 @@ with gr.Blocks(title="STARFlow - Text-to-Image & Video Generation") as demo:
483
  video_aspect = gr.Dropdown(
484
  label="Aspect Ratio",
485
  choices=["16:9", "1:1", "4:3"],
486
- value="16:9",
487
- info="Video dimensions ratio"
488
  )
489
  video_cfg = gr.Slider(
490
  label="CFG Scale",
491
  minimum=1.0,
492
  maximum=10.0,
493
  value=3.5,
494
- step=0.1,
495
- info="Classifier-free guidance scale"
496
  )
497
  video_seed = gr.Number(
498
  value=99,
499
  label="🎲 Seed",
500
- precision=0,
501
- info="Random seed for reproducibility"
502
  )
503
  video_length = gr.Slider(
504
  label="Target Length (frames)",
505
  minimum=81,
506
  maximum=481,
507
  value=81,
508
- step=80,
509
- info="Number of frames in the generated video"
510
  )
511
 
512
  with gr.Group():
513
  gr.Markdown("#### πŸ–ΌοΈ Optional Input")
514
  video_input_image = gr.Image(
515
  label="Input Image (optional)",
516
- type="filepath",
517
- info="Provide an initial image for video generation"
518
  )
519
 
520
  # Hidden checkpoint field
 
388
  image_prompt = gr.Textbox(
389
  label="πŸ“ Prompt",
390
  placeholder="a film still of a cat playing piano",
391
+ lines=4
 
392
  )
393
  image_config = gr.Textbox(
394
  label="βš™οΈ Config Path",
395
  value="configs/starflow_3B_t2i_256x256.yaml",
396
+ interactive=False
 
397
  )
398
 
399
  with gr.Group():
 
401
  image_aspect = gr.Dropdown(
402
  label="Aspect Ratio",
403
  choices=["1:1", "2:3", "3:2", "16:9", "9:16", "4:5", "5:4"],
404
+ value="1:1"
 
405
  )
406
  image_cfg = gr.Slider(
407
  label="CFG Scale",
408
  minimum=1.0,
409
  maximum=10.0,
410
  value=3.6,
411
+ step=0.1
 
412
  )
413
  image_seed = gr.Number(
414
  value=999,
415
  label="🎲 Seed",
416
+ precision=0
 
417
  )
418
 
419
  # Hidden checkpoint field
 
463
  video_prompt = gr.Textbox(
464
  label="πŸ“ Prompt",
465
  placeholder="a corgi dog looks at the camera",
466
+ lines=4
 
467
  )
468
  video_config = gr.Textbox(
469
  label="βš™οΈ Config Path",
470
  value="configs/starflow-v_7B_t2v_caus_480p.yaml",
471
+ interactive=False
 
472
  )
473
 
474
  with gr.Group():
 
476
  video_aspect = gr.Dropdown(
477
  label="Aspect Ratio",
478
  choices=["16:9", "1:1", "4:3"],
479
+ value="16:9"
 
480
  )
481
  video_cfg = gr.Slider(
482
  label="CFG Scale",
483
  minimum=1.0,
484
  maximum=10.0,
485
  value=3.5,
486
+ step=0.1
 
487
  )
488
  video_seed = gr.Number(
489
  value=99,
490
  label="🎲 Seed",
491
+ precision=0
 
492
  )
493
  video_length = gr.Slider(
494
  label="Target Length (frames)",
495
  minimum=81,
496
  maximum=481,
497
  value=81,
498
+ step=80
 
499
  )
500
 
501
  with gr.Group():
502
  gr.Markdown("#### πŸ–ΌοΈ Optional Input")
503
  video_input_image = gr.Image(
504
  label="Input Image (optional)",
505
+ type="filepath"
 
506
  )
507
 
508
  # Hidden checkpoint field