Spaces:
Running
on
Zero
Running
on
Zero
alex
commited on
Commit
·
e067264
1
Parent(s):
6e127d9
4 seconds
Browse files
app.py
CHANGED
|
@@ -127,7 +127,6 @@ def calculate_required_time(steps, max_duration):
|
|
| 127 |
2: 8,
|
| 128 |
3: 11,
|
| 129 |
4: 20,
|
| 130 |
-
5: 30,
|
| 131 |
}
|
| 132 |
each_step_s = max_duration_duration_mapping[max_duration]
|
| 133 |
duration_s = (each_step_s * steps) + warmup_s
|
|
@@ -161,7 +160,7 @@ def generate_scene(prompt_text, steps, image_paths, audio_file_path, tea_cache_l
|
|
| 161 |
return run_pipeline(prompt_text, steps, image_paths, audio_file_path, tea_cache_l1_thresh, max_duration, session_id, progress)
|
| 162 |
|
| 163 |
|
| 164 |
-
def generate_example(prompt_text, steps, image_paths, audio_file_path, tea_cache_l1_thresh = 0.0, max_duration =
|
| 165 |
|
| 166 |
return run_pipeline(prompt_text, steps, image_paths, audio_file_path, tea_cache_l1_thresh, max_duration, session_id, progress)
|
| 167 |
|
|
@@ -257,8 +256,7 @@ def run_pipeline(prompt_text, steps, image_paths, audio_file_path, tea_cache_l1_
|
|
| 257 |
1:25,
|
| 258 |
2:45,
|
| 259 |
3:70,
|
| 260 |
-
4:97
|
| 261 |
-
5:129
|
| 262 |
}
|
| 263 |
|
| 264 |
# Run inference
|
|
|
|
| 127 |
2: 8,
|
| 128 |
3: 11,
|
| 129 |
4: 20,
|
|
|
|
| 130 |
}
|
| 131 |
each_step_s = max_duration_duration_mapping[max_duration]
|
| 132 |
duration_s = (each_step_s * steps) + warmup_s
|
|
|
|
| 160 |
return run_pipeline(prompt_text, steps, image_paths, audio_file_path, tea_cache_l1_thresh, max_duration, session_id, progress)
|
| 161 |
|
| 162 |
|
| 163 |
+
def generate_example(prompt_text, steps, image_paths, audio_file_path, tea_cache_l1_thresh = 0.0, max_duration = 4, session_id = None, progress=gr.Progress(track_tqdm=True)):
|
| 164 |
|
| 165 |
return run_pipeline(prompt_text, steps, image_paths, audio_file_path, tea_cache_l1_thresh, max_duration, session_id, progress)
|
| 166 |
|
|
|
|
| 256 |
1:25,
|
| 257 |
2:45,
|
| 258 |
3:70,
|
| 259 |
+
4:97
|
|
|
|
| 260 |
}
|
| 261 |
|
| 262 |
# Run inference
|