Spaces:
Running
on
Zero
Running
on
Zero
alex
commited on
Commit
·
3f16767
1
Parent(s):
1fad7ce
duration fixed
Browse files
app.py
CHANGED
|
@@ -147,7 +147,7 @@ def update_required_time(steps, max_duration):
|
|
| 147 |
return get_required_time_string(steps, max_duration)
|
| 148 |
|
| 149 |
|
| 150 |
-
def generate_scene(prompt_text, steps, image_paths, audio_file_path, tea_cache_l1_thresh, max_duration =
|
| 151 |
|
| 152 |
print(image_paths)
|
| 153 |
prompt_text_check = (prompt_text or "").strip()
|
|
@@ -160,9 +160,9 @@ def generate_scene(prompt_text, steps, image_paths, audio_file_path, tea_cache_l
|
|
| 160 |
return run_pipeline(prompt_text, steps, image_paths, audio_file_path, tea_cache_l1_thresh, max_duration, session_id)
|
| 161 |
|
| 162 |
|
| 163 |
-
def generate_example(prompt_text, steps, image_paths, audio_file_path
|
| 164 |
|
| 165 |
-
return run_pipeline(prompt_text, steps, image_paths, audio_file_path
|
| 166 |
|
| 167 |
def upload_inductor_cache_to_hub(
|
| 168 |
repo_id: str,
|
|
@@ -216,7 +216,7 @@ def upload_inductor_cache_to_hub(
|
|
| 216 |
|
| 217 |
|
| 218 |
@spaces.GPU(duration=get_duration)
|
| 219 |
-
def run_pipeline(prompt_text, steps, image_paths, audio_file_path, tea_cache_l1_thresh = 0.0, max_duration =
|
| 220 |
|
| 221 |
if session_id is None:
|
| 222 |
session_id = uuid.uuid4().hex
|
|
@@ -348,9 +348,9 @@ with gr.Blocks(css=css) as demo:
|
|
| 348 |
gr.Markdown("**SETTINGS**")
|
| 349 |
|
| 350 |
default_steps = 10
|
| 351 |
-
default_max_duration =
|
| 352 |
|
| 353 |
-
max_duration = gr.Slider(minimum=2, maximum=
|
| 354 |
steps_input = gr.Slider(minimum=10, maximum=50, value=default_steps, step=5, label="Diffusion Steps")
|
| 355 |
tea_cache_l1_thresh = gr.Slider(minimum=0.0, maximum=1.0, value=0.0, step=0.01, label="Cache", visible=False)
|
| 356 |
|
|
|
|
| 147 |
return get_required_time_string(steps, max_duration)
|
| 148 |
|
| 149 |
|
| 150 |
+
def generate_scene(prompt_text, steps, image_paths, audio_file_path, tea_cache_l1_thresh, max_duration = 3, session_id = None):
|
| 151 |
|
| 152 |
print(image_paths)
|
| 153 |
prompt_text_check = (prompt_text or "").strip()
|
|
|
|
| 160 |
return run_pipeline(prompt_text, steps, image_paths, audio_file_path, tea_cache_l1_thresh, max_duration, session_id)
|
| 161 |
|
| 162 |
|
| 163 |
+
def generate_example(prompt_text, steps, image_paths, audio_file_path):
|
| 164 |
|
| 165 |
+
return run_pipeline(prompt_text, steps, image_paths, audio_file_path)
|
| 166 |
|
| 167 |
def upload_inductor_cache_to_hub(
|
| 168 |
repo_id: str,
|
|
|
|
| 216 |
|
| 217 |
|
| 218 |
@spaces.GPU(duration=get_duration)
|
| 219 |
+
def run_pipeline(prompt_text, steps, image_paths, audio_file_path, tea_cache_l1_thresh = 0.0, max_duration = 3, session_id = None):
|
| 220 |
|
| 221 |
if session_id is None:
|
| 222 |
session_id = uuid.uuid4().hex
|
|
|
|
| 348 |
gr.Markdown("**SETTINGS**")
|
| 349 |
|
| 350 |
default_steps = 10
|
| 351 |
+
default_max_duration = 3
|
| 352 |
|
| 353 |
+
max_duration = gr.Slider(minimum=2, maximum=4, value=default_max_duration, step=1, label="Max Duration")
|
| 354 |
steps_input = gr.Slider(minimum=10, maximum=50, value=default_steps, step=5, label="Diffusion Steps")
|
| 355 |
tea_cache_l1_thresh = gr.Slider(minimum=0.0, maximum=1.0, value=0.0, step=0.01, label="Cache", visible=False)
|
| 356 |
|