euiia commited on
Commit
62b888b
·
verified ·
1 Parent(s): ca345ff

Update deformes4D_engine.py

Browse files
Files changed (1) hide show
  1. deformes4D_engine.py +6 -4
deformes4D_engine.py CHANGED
@@ -262,7 +262,6 @@ class Deformes4DEngine:
262
  yield {"final_path": high_quality_video_path}
263
 
264
 
265
-
266
  def _render_and_post_process(self, final_concatenated_latents: torch.Tensor,
267
  base_name: str, expected_height: int, expected_width: int, fps: int = 24) -> str:
268
  logger.info("Iniciando pós-processamento: upscale + refinamento...")
@@ -277,17 +276,20 @@ class Deformes4DEngine:
277
  upscaled_latents,
278
  height=h,
279
  width=w,
280
- denoise_strength=0.4,
281
- refine_steps=10
282
  )
283
  logger.info("Refinamento concluído.")
284
 
285
  # --- 3. Decodificação ---
286
  pixel_tensor = self.latents_to_pixels(refined_latents)
 
 
287
  video_path = os.path.join(self.workspace_dir, f"{base_name}_HQ.mp4")
288
  self.save_video_from_tensor(pixel_tensor, video_path, fps=fps)
289
  logger.info(f"Vídeo final salvo em: {video_path}")
290
- return refined_latents
 
291
 
292
 
293
 
 
262
  yield {"final_path": high_quality_video_path}
263
 
264
 
 
265
  def _render_and_post_process(self, final_concatenated_latents: torch.Tensor,
266
  base_name: str, expected_height: int, expected_width: int, fps: int = 24) -> str:
267
  logger.info("Iniciando pós-processamento: upscale + refinamento...")
 
276
  upscaled_latents,
277
  height=h,
278
  width=w,
279
+ denoise_strength=0.35, # levemente menor pra preservar nitidez
280
+ refine_steps=12 # mais iterações pra polir detalhes
281
  )
282
  logger.info("Refinamento concluído.")
283
 
284
  # --- 3. Decodificação ---
285
  pixel_tensor = self.latents_to_pixels(refined_latents)
286
+
287
+ # --- 4. Render final ---
288
  video_path = os.path.join(self.workspace_dir, f"{base_name}_HQ.mp4")
289
  self.save_video_from_tensor(pixel_tensor, video_path, fps=fps)
290
  logger.info(f"Vídeo final salvo em: {video_path}")
291
+
292
+ return video_path
293
 
294
 
295