hilamanor commited on
Commit
05f1747
1 Parent(s): 7c56def

try to solve some of the GPU Task Aborted for stable aud

Browse files
Files changed (1) hide show
  1. app.py +6 -3
app.py CHANGED
@@ -109,10 +109,13 @@ def get_duration(input_audio,
109
 
110
  duration = min(utils.get_duration(input_audio), utils.MAX_DURATION)
111
  time_for_maxlength = factor * forwards * 0.15 # 0.25 is the time per forward pass
112
- print('expected time:', time_for_maxlength / utils.MAX_DURATION * duration)
113
-
 
 
 
114
  spare_time = 5
115
- return max(10, time_for_maxlength / utils.MAX_DURATION * duration + spare_time)
116
 
117
 
118
  def verify_model_params(model_id: str, input_audio, src_prompt: str, tar_prompt: str, cfg_scale_src: float,
 
109
 
110
  duration = min(utils.get_duration(input_audio), utils.MAX_DURATION)
111
  time_for_maxlength = factor * forwards * 0.15 # 0.25 is the time per forward pass
112
+
113
+ if model_id != STABLEAUD:
114
+ time_for_maxlength = time_for_maxlength / utils.MAX_DURATION * duration
115
+
116
+ print('expected time:', time_for_maxlength)
117
  spare_time = 5
118
+ return max(10, time_for_maxlength + spare_time)
119
 
120
 
121
  def verify_model_params(model_id: str, input_audio, src_prompt: str, tar_prompt: str, cfg_scale_src: float,