Update app.py
Browse files
app.py
CHANGED
|
@@ -288,7 +288,8 @@ class LTX23DistilledA2VPipeline:
|
|
| 288 |
)
|
| 289 |
|
| 290 |
torch.cuda.synchronize()
|
| 291 |
-
|
|
|
|
| 292 |
|
| 293 |
# ββ Upscaling ββ
|
| 294 |
upscaled_video_latent = upsample_video(
|
|
@@ -324,9 +325,6 @@ class LTX23DistilledA2VPipeline:
|
|
| 324 |
)
|
| 325 |
|
| 326 |
torch.cuda.synchronize()
|
| 327 |
-
del transformer
|
| 328 |
-
del video_encoder
|
| 329 |
-
cleanup_memory()
|
| 330 |
|
| 331 |
# ββ Decode both video and audio ββ
|
| 332 |
decoded_video = vae_decode_video(
|
|
|
|
| 288 |
)
|
| 289 |
|
| 290 |
torch.cuda.synchronize()
|
| 291 |
+
del video_state # release Stage 1 latent only, keep encoder/transformer on GPU
|
| 292 |
+
torch.cuda.empty_cache() # lightweight, no sync
|
| 293 |
|
| 294 |
# ββ Upscaling ββ
|
| 295 |
upscaled_video_latent = upsample_video(
|
|
|
|
| 325 |
)
|
| 326 |
|
| 327 |
torch.cuda.synchronize()
|
|
|
|
|
|
|
|
|
|
| 328 |
|
| 329 |
# ββ Decode both video and audio ββ
|
| 330 |
decoded_video = vae_decode_video(
|