Spaces:
Paused
Paused
Update api/ltx_server_refactored.py
Browse files
api/ltx_server_refactored.py
CHANGED
|
@@ -469,12 +469,7 @@ class VideoService:
|
|
| 469 |
# Filtro AdaIN para manter consistência de cor/estilo com o vídeo de baixa resolução
|
| 470 |
return adain_filter_latent(latents=upsampled_latents_normalized, reference_latents=latents)
|
| 471 |
|
| 472 |
-
|
| 473 |
-
"""Carrega uma imagem, redimensiona, aplica padding e move para o dispositivo."""
|
| 474 |
-
tensor = load_image_to_tensor_with_resize_and_crop(filepath, height, width)
|
| 475 |
-
tensor = F.pad(tensor, padding)
|
| 476 |
-
return tensor.to(self.device, dtype=self.runtime_autocast_dtype)
|
| 477 |
-
|
| 478 |
def _calculate_downscaled_dims(self, height: int, width: int) -> Tuple[int, int]:
|
| 479 |
"""Calcula as dimensões para o primeiro passo (baixa resolução)."""
|
| 480 |
height_padded = ((height - 1) // 8 + 1) * 8
|
|
|
|
| 469 |
# Filtro AdaIN para manter consistência de cor/estilo com o vídeo de baixa resolução
|
| 470 |
return adain_filter_latent(latents=upsampled_latents_normalized, reference_latents=latents)
|
| 471 |
|
| 472 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 473 |
def _calculate_downscaled_dims(self, height: int, width: int) -> Tuple[int, int]:
|
| 474 |
"""Calcula as dimensões para o primeiro passo (baixa resolução)."""
|
| 475 |
height_padded = ((height - 1) // 8 + 1) * 8
|