Phil Sobrepena commited on
Commit
eb4ead1
·
1 Parent(s): 2c4e2b0

front end simplify, default vals

Browse files
Files changed (1) hide show
  1. app.py +9 -10
app.py CHANGED
@@ -60,11 +60,11 @@ net, feature_utils, seq_cfg = get_model()
60
 
61
  @spaces.GPU(duration=120)
62
  @torch.inference_mode()
63
- def video_to_audio(video: gr.Video, prompt: str, negative_prompt: str, seed: int, num_steps: int,
64
- cfg_strength: float, duration: float):
65
 
66
  rng = torch.Generator(device=device)
67
- if seed >= 0:
68
  rng.manual_seed(seed)
69
  else:
70
  rng.seed()
@@ -133,8 +133,7 @@ def text_to_audio(prompt: str, negative_prompt: str, seed: int, num_steps: int,
133
  video_to_audio_tab = gr.Interface(
134
  fn=video_to_audio,
135
  description="""
136
- Sonisphere
137
- Video-to-Audio
138
  NOTE: It takes longer to process high-resolution videos (>384 px on the shorter side).
139
  Doing so does not improve results.
140
 
@@ -144,14 +143,14 @@ video_to_audio_tab = gr.Interface(
144
  gr.Video(),
145
  gr.Text(label='Prompt'),
146
  gr.Text(label='Negative prompt', value='music'),
147
- gr.Number(label='Seed (-1: random)', value=-1, precision=0, minimum=-1),
148
- gr.Number(label='Num steps', value=25, precision=0, minimum=1),
149
- gr.Number(label='Guidance Strength', value=4.5, minimum=1),
150
- gr.Number(label='Duration (sec)', value=8, minimum=1),
151
  ],
152
  outputs='playable_video',
153
  cache_examples=False,
154
- title='MMAudio — Video-to-Audio Synthesis',
155
  examples=[
156
  ])
157
 
 
60
 
61
  @spaces.GPU(duration=120)
62
  @torch.inference_mode()
63
+ def video_to_audio(video: gr.Video, prompt: str, negative_prompt: str, seed: 0, num_steps: 25,
64
+ cfg_strength: 4.5, duration: 8.0):
65
 
66
  rng = torch.Generator(device=device)
67
+ if seed >= 1:
68
  rng.manual_seed(seed)
69
  else:
70
  rng.seed()
 
133
  video_to_audio_tab = gr.Interface(
134
  fn=video_to_audio,
135
  description="""
136
+ Sonisphere | Video-to-Audio
 
137
  NOTE: It takes longer to process high-resolution videos (>384 px on the shorter side).
138
  Doing so does not improve results.
139
 
 
143
  gr.Video(),
144
  gr.Text(label='Prompt'),
145
  gr.Text(label='Negative prompt', value='music'),
146
+ # gr.Number(label='Seed (-1: random)', value=-1, precision=0, minimum=-1),
147
+ # gr.Number(label='Num steps', value=25, precision=0, minimum=1),
148
+ # gr.Number(label='Guidance Strength', value=4.5, minimum=1),
149
+ # gr.Number(label='Duration (sec)', value=8, minimum=1),
150
  ],
151
  outputs='playable_video',
152
  cache_examples=False,
153
+ title='Sonisphere — Video-to-Audio Synthesis',
154
  examples=[
155
  ])
156