Eueuiaa commited on
Commit
4082610
·
verified ·
1 Parent(s): 62bc76f

Update api/ltx_server.py

Browse files
Files changed (1) hide show
  1. api/ltx_server.py +15 -5
api/ltx_server.py CHANGED
@@ -864,11 +864,15 @@ class VideoService:
864
  pass
865
 
866
  latents_parts_up = self._dividir_latentes_por_tamanho(latents_cpu_up,4,1)
867
-
 
 
 
868
  for latents in latents_parts_up:
869
-
 
870
  # # --- ETAPA 3: REFINAMENTO DE TEXTURA (SECOND PASS) ---
871
- print("\n--- INICIANDO ETAPA 3: REFINAMENTO DE TEXTURA (SECOND PASS) ---")
872
 
873
  second_pass_config = self.config.get("second_pass", {}).copy()
874
  # --- <INÍCIO DA LÓGICA DE CÁLCULO EXATA PARA SECOND PASS> ---
@@ -880,7 +884,9 @@ class VideoService:
880
  t_pass2 = time.perf_counter()
881
 
882
  num_latent_frames_part = latents.shape[2]
883
-
 
 
884
 
885
  vae_temporal_scale = self.pipeline.video_scale_factor # Geralmente 4 ou 8
886
  num_pixel_frames_part = ((num_latent_frames_part - 1) * vae_temporal_scale) + 1
@@ -903,7 +909,11 @@ class VideoService:
903
  print(f"[DEBUG] Second part Pass concluída em {time.perf_counter() - t_pass2:.2f}s")
904
 
905
  latents_list.append(final_latents)
906
-
 
 
 
 
907
  else: # Geração de etapa única
908
  print("\n--- INICIANDO GERAÇÃO DE ETAPA ÚNICA ---")
909
  t_single = time.perf_counter()
 
864
  pass
865
 
866
  latents_parts_up = self._dividir_latentes_por_tamanho(latents_cpu_up,4,1)
867
+
868
+ print("\n\n--- INICIANDO ETAPA 3: REFINAMENTO DE TEXTURA (SECOND PASS) ---")
869
+
870
+ cc = 1
871
  for latents in latents_parts_up:
872
+
873
+ print("\n\n#########################################")
874
  # # --- ETAPA 3: REFINAMENTO DE TEXTURA (SECOND PASS) ---
875
+ print(f"\n--- INICIANDO ETAPA 3/{cc} ")
876
 
877
  second_pass_config = self.config.get("second_pass", {}).copy()
878
  # --- <INÍCIO DA LÓGICA DE CÁLCULO EXATA PARA SECOND PASS> ---
 
884
  t_pass2 = time.perf_counter()
885
 
886
  num_latent_frames_part = latents.shape[2]
887
+
888
+ log_tensor_info(final_latents, "Latentes input (Pre-Pós-Second Pass)")
889
+
890
 
891
  vae_temporal_scale = self.pipeline.video_scale_factor # Geralmente 4 ou 8
892
  num_pixel_frames_part = ((num_latent_frames_part - 1) * vae_temporal_scale) + 1
 
909
  print(f"[DEBUG] Second part Pass concluída em {time.perf_counter() - t_pass2:.2f}s")
910
 
911
  latents_list.append(final_latents)
912
+ cc+=1
913
+ print("#########################################")
914
+
915
+ print("\n\n--- FIM ETAPA 3: REFINAMENTO DE TEXTURA (SECOND PASS) ---")
916
+
917
  else: # Geração de etapa única
918
  print("\n--- INICIANDO GERAÇÃO DE ETAPA ÚNICA ---")
919
  t_single = time.perf_counter()