multimodalart HF Staff commited on
Commit
908b63e
·
verified ·
1 Parent(s): 6961549
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -18,6 +18,8 @@ import wan
18
  from wan.configs import WAN_CONFIGS, SIZE_CONFIGS, MAX_AREA_CONFIGS, SUPPORTED_SIZES
19
  from wan.utils.utils import cache_video
20
 
 
 
21
  # --- 1. Global Setup and Model Loading ---
22
 
23
  print("Starting Gradio App for Wan 2.2 TI2V-5B...")
@@ -154,7 +156,8 @@ def generate_video(
154
  normalize=True,
155
  value_range=(-1, 1)
156
  )
157
-
 
158
  return video_path
159
 
160
 
 
18
  from wan.configs import WAN_CONFIGS, SIZE_CONFIGS, MAX_AREA_CONFIGS, SUPPORTED_SIZES
19
  from wan.utils.utils import cache_video
20
 
21
+ import gc
22
+
23
  # --- 1. Global Setup and Model Loading ---
24
 
25
  print("Starting Gradio App for Wan 2.2 TI2V-5B...")
 
156
  normalize=True,
157
  value_range=(-1, 1)
158
  )
159
+ del video_tensor
160
+ gc.collect()
161
  return video_path
162
 
163