dagloop5 commited on
Commit
2cd6532
Β·
verified Β·
1 Parent(s): 5169404

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -4
app.py CHANGED
@@ -288,7 +288,8 @@ class LTX23DistilledA2VPipeline:
288
  )
289
 
290
  torch.cuda.synchronize()
291
- cleanup_memory()
 
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(