Spaces:
Running
on
Zero
Running
on
Zero
try to solve some of the GPU Task Aborted for stable aud
Browse files
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 |
-
|
| 113 |
-
|
|
|
|
|
|
|
|
|
|
| 114 |
spare_time = 5
|
| 115 |
-
return max(10, time_for_maxlength
|
| 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,
|