EuuIia commited on
Commit
67bc380
·
verified ·
1 Parent(s): 8ebd638

Update api/ltx_server.py

Browse files
Files changed (1) hide show
  1. api/ltx_server.py +7 -0
api/ltx_server.py CHANGED
@@ -544,6 +544,13 @@ class VideoService:
544
  output_video_path = os.path.join(temp_dir, f"output_{used_seed}.mp4")
545
  final_output_path = None
546
 
 
 
 
 
 
 
 
547
  print("[DEBUG] Decodificando bloco de latentes com VAE → tensor de pixels...")
548
  # Se desejar “desocupar” a GPU antes do decode, pode-se mover p/ CPU e limpar:
549
  # latents_cpu = latents.detach().to("cpu", non_blocking=True); torch.cuda.empty_cache(); torch.cuda.ipc_collect(); latents = latents_cpu.to(self.device)
 
544
  output_video_path = os.path.join(temp_dir, f"output_{used_seed}.mp4")
545
  final_output_path = None
546
 
547
+ vae_manager_singleton.attach_pipeline(
548
+ self.pipeline,
549
+ device=self.device,
550
+ autocast_dtype=self.runtime_autocast_dtype
551
+ )
552
+
553
+
554
  print("[DEBUG] Decodificando bloco de latentes com VAE → tensor de pixels...")
555
  # Se desejar “desocupar” a GPU antes do decode, pode-se mover p/ CPU e limpar:
556
  # latents_cpu = latents.detach().to("cpu", non_blocking=True); torch.cuda.empty_cache(); torch.cuda.ipc_collect(); latents = latents_cpu.to(self.device)