euiia commited on
Commit
ea16365
·
verified ·
1 Parent(s): 9bfc665

Update deformes4D_engine.py

Browse files
Files changed (1) hide show
  1. deformes4D_engine.py +12 -1
deformes4D_engine.py CHANGED
@@ -225,7 +225,7 @@ class Deformes4DEngine:
225
  eco_latent_for_next_loop, dejavu_latent_for_next_loop = None, None
226
 
227
 
228
- hig_res_latent_fragments = upscaler_specialist_singleton.upscale(latents_video)
229
 
230
  low_res_latent_fragments.append(hig_res_latent_fragments)
231
 
@@ -298,6 +298,17 @@ class Deformes4DEngine:
298
  return video_path
299
 
300
 
 
 
 
 
 
 
 
 
 
 
 
301
 
302
  def _generate_latent_tensor_internal(self, conditioning_items, ltx_params, target_resolution, total_frames_to_generate):
303
  kwargs = {
 
225
  eco_latent_for_next_loop, dejavu_latent_for_next_loop = None, None
226
 
227
 
228
+ hig_res_latent_fragments = self.upscale_latents(latents_video)
229
 
230
  low_res_latent_fragments.append(hig_res_latent_fragments)
231
 
 
298
  return video_path
299
 
300
 
301
+
302
+ def upscale_latents(self, latents: torch.Tensor) -> torch.Tensor:
303
+ """
304
+ Recebe um tensor latente de baixa resolução e retorna a versão 2x upscaled.
305
+ Este método atua como uma interface para o UpscalerSpecialist.
306
+ """
307
+ logger.info(f"Recebido tensor latente com shape {latents.shape} para upscale.")
308
+ upscaled_latents = upscaler_specialist_singleton.upscale(latents)
309
+ logger.info(f"Retornando tensor latente upscaled com novo shape: {upscaled_latents.shape}")
310
+ return upscaled_latents
311
+
312
 
313
  def _generate_latent_tensor_internal(self, conditioning_items, ltx_params, target_resolution, total_frames_to_generate):
314
  kwargs = {