rustholm commited on
Commit
31f0bab
·
verified ·
1 Parent(s): f9ce590

fp16 weights, declared duration 90/45 -> 30

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -29,7 +29,7 @@ torch.backends.cudnn.allow_tf32 = True
29
  log = logging.getLogger()
30
 
31
  device = 'cuda' if torch.cuda.is_available() else 'cpu'
32
- dtype = torch.float32
33
 
34
  # Every weight comes from our own namespace; the CLIP encoder and the 44kHz vocoder are repointed
35
  # inside the vendored `mmaudio` package (features_utils.py / ext/autoencoder.py).
@@ -119,7 +119,7 @@ def _audio_for_video(video, prompt: str, negative_prompt: str, seed: int, num_st
119
  return video_info, audios.float().cpu()[0]
120
 
121
 
122
- @spaces.GPU(duration=90)
123
  @torch.inference_mode()
124
  def video_to_audio(video: gr.Video, prompt: str, negative_prompt: str, seed: int, num_steps: int,
125
  cfg_strength: float, duration: float):
@@ -132,7 +132,7 @@ def video_to_audio(video: gr.Video, prompt: str, negative_prompt: str, seed: int
132
  return video_save_path
133
 
134
 
135
- @spaces.GPU(duration=90)
136
  @torch.inference_mode()
137
  def video_to_track(video: gr.Video, prompt: str, negative_prompt: str, seed: int, num_steps: int,
138
  cfg_strength: float, duration: float):
@@ -151,7 +151,7 @@ def video_to_track(video: gr.Video, prompt: str, negative_prompt: str, seed: int
151
  return audio_save_path
152
 
153
 
154
- @spaces.GPU(duration=90)
155
  @torch.inference_mode()
156
  def image_to_audio(image: gr.Image, prompt: str, negative_prompt: str, seed: int, num_steps: int,
157
  cfg_strength: float, duration: float):
@@ -181,7 +181,7 @@ def image_to_audio(image: gr.Image, prompt: str, negative_prompt: str, seed: int
181
  return video_save_path
182
 
183
 
184
- @spaces.GPU(duration=45)
185
  @torch.inference_mode()
186
  def text_to_audio(prompt: str, negative_prompt: str, seed: int, num_steps: int, cfg_strength: float,
187
  duration: float):
 
29
  log = logging.getLogger()
30
 
31
  device = 'cuda' if torch.cuda.is_available() else 'cpu'
32
+ dtype = torch.float16
33
 
34
  # Every weight comes from our own namespace; the CLIP encoder and the 44kHz vocoder are repointed
35
  # inside the vendored `mmaudio` package (features_utils.py / ext/autoencoder.py).
 
119
  return video_info, audios.float().cpu()[0]
120
 
121
 
122
+ @spaces.GPU(duration=30)
123
  @torch.inference_mode()
124
  def video_to_audio(video: gr.Video, prompt: str, negative_prompt: str, seed: int, num_steps: int,
125
  cfg_strength: float, duration: float):
 
132
  return video_save_path
133
 
134
 
135
+ @spaces.GPU(duration=30)
136
  @torch.inference_mode()
137
  def video_to_track(video: gr.Video, prompt: str, negative_prompt: str, seed: int, num_steps: int,
138
  cfg_strength: float, duration: float):
 
151
  return audio_save_path
152
 
153
 
154
+ @spaces.GPU(duration=30)
155
  @torch.inference_mode()
156
  def image_to_audio(image: gr.Image, prompt: str, negative_prompt: str, seed: int, num_steps: int,
157
  cfg_strength: float, duration: float):
 
181
  return video_save_path
182
 
183
 
184
+ @spaces.GPU(duration=30)
185
  @torch.inference_mode()
186
  def text_to_audio(prompt: str, negative_prompt: str, seed: int, num_steps: int, cfg_strength: float,
187
  duration: float):