euiiiia commited on
Commit
1fb446f
·
verified ·
1 Parent(s): af533e2

Update api/ltx_server_refactored.py

Browse files
Files changed (1) hide show
  1. api/ltx_server_refactored.py +3 -1
api/ltx_server_refactored.py CHANGED
@@ -368,8 +368,10 @@ class VideoService:
368
  """
369
  print(f"[DEBUG] Codificando imagem para latente ({height}x{width})...")
370
  # 1. Carrega a imagem e a transforma em um tensor de pixel 5D
 
 
371
  pixel_tensor = self._load_image_to_tensor_with_resize_and_crop(
372
- image_input, target_height=height, target_width=width
373
  )
374
  pixel_tensor_gpu = pixel_tensor.to(self.device, dtype=self.pipeline.vae.dtype)
375
 
 
368
  """
369
  print(f"[DEBUG] Codificando imagem para latente ({height}x{width})...")
370
  # 1. Carrega a imagem e a transforma em um tensor de pixel 5D
371
+ downscaled_height, downscaled_width = self._calculate_downscaled_dims(height, width)
372
+
373
  pixel_tensor = self._load_image_to_tensor_with_resize_and_crop(
374
+ image_input, target_height=downscaled_height, target_width=downscaled_width
375
  )
376
  pixel_tensor_gpu = pixel_tensor.to(self.device, dtype=self.pipeline.vae.dtype)
377