alexnasa commited on
Commit
078e897
·
verified ·
1 Parent(s): 8f03b92

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
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