Update deformes4D_engine.py
Browse files- deformes4D_engine.py +1 -30
deformes4D_engine.py
CHANGED
|
@@ -250,36 +250,7 @@ class Deformes4DEngine:
|
|
| 250 |
new_full_latents = self._generate_latent_tensor_internal(conditioning_items, current_ltx_params, target_resolution_tuple, total_frames_to_generate)
|
| 251 |
|
| 252 |
|
| 253 |
-
|
| 254 |
-
logger.info("--- [VERIFICAÇÃO DE CHUNKS INDIVIDUAIS] ---")
|
| 255 |
-
total_chunks_verificados = new_full_latents.shape[2]
|
| 256 |
-
for chunk_idx in range(total_chunks_verificados):
|
| 257 |
-
try:
|
| 258 |
-
# Isola o chunk atual
|
| 259 |
-
single_chunk_latent = new_full_latents[:, :, chunk_idx:chunk_idx+1, :, :]
|
| 260 |
-
|
| 261 |
-
# Gera um nome de arquivo temporário para o vídeo do chunk
|
| 262 |
-
temp_video_base_name = f"debug_chunk_{chunk_idx}"
|
| 263 |
-
|
| 264 |
-
# Converte o latente do chunk em um vídeo MP4
|
| 265 |
-
pixel_tensor = self.latents_to_pixels(single_chunk_latent)
|
| 266 |
-
|
| 267 |
-
temp_video_path = self.save_video_from_tensor(pixel_tensor, temp_video_base_name, fps=24)
|
| 268 |
-
|
| 269 |
-
# Conta os frames no vídeo gerado
|
| 270 |
-
if os.path.exists(temp_video_path):
|
| 271 |
-
with imageio.get_reader(temp_video_path) as reader:
|
| 272 |
-
frame_count = reader.count_frames()
|
| 273 |
-
logger.info(f" - VERIFICADO: Chunk {chunk_idx} gerou um vídeo com {frame_count} frames.")
|
| 274 |
-
# Apaga o vídeo de debug
|
| 275 |
-
os.remove(temp_video_path)
|
| 276 |
-
else:
|
| 277 |
-
logger.warning(f" - FALHA: Não foi possível gerar o vídeo para o Chunk {chunk_idx}.")
|
| 278 |
-
|
| 279 |
-
except Exception as e:
|
| 280 |
-
logger.error(f" - ERRO ao verificar Chunk {chunk_idx}: {e}")
|
| 281 |
-
logger.info("--- [FIM DA VERIFICAÇÃO] ---")
|
| 282 |
-
# --- [FIM] Bloco de Verificação ---
|
| 283 |
|
| 284 |
|
| 285 |
|
|
|
|
| 250 |
new_full_latents = self._generate_latent_tensor_internal(conditioning_items, current_ltx_params, target_resolution_tuple, total_frames_to_generate)
|
| 251 |
|
| 252 |
|
| 253 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 254 |
|
| 255 |
|
| 256 |
|