Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -9,6 +9,7 @@ from tqdm import tqdm
|
|
| 9 |
import threading
|
| 10 |
import os
|
| 11 |
import psutil
|
|
|
|
| 12 |
|
| 13 |
PROC = psutil.Process(os.getpid())
|
| 14 |
|
|
@@ -325,6 +326,8 @@ def run_pipeline(prompt_text, steps, image_paths, audio_file_path, max_duration
|
|
| 325 |
tea_cache_l1_thresh = 0.0,
|
| 326 |
progress_bar_cmd=progress
|
| 327 |
)
|
|
|
|
|
|
|
| 328 |
debug_resources("after generation")
|
| 329 |
|
| 330 |
# Return resulting video path
|
|
|
|
| 9 |
import threading
|
| 10 |
import os
|
| 11 |
import psutil
|
| 12 |
+
import gc
|
| 13 |
|
| 14 |
PROC = psutil.Process(os.getpid())
|
| 15 |
|
|
|
|
| 326 |
tea_cache_l1_thresh = 0.0,
|
| 327 |
progress_bar_cmd=progress
|
| 328 |
)
|
| 329 |
+
gc.collect()
|
| 330 |
+
torch.cuda.empty_cache()
|
| 331 |
debug_resources("after generation")
|
| 332 |
|
| 333 |
# Return resulting video path
|