Update api/ltx_server.py
Browse files- api/ltx_server.py +2 -5
api/ltx_server.py
CHANGED
|
@@ -743,7 +743,7 @@ class VideoService:
|
|
| 743 |
print(f"[DEBUG] output_type={call_kwargs['output_type']} skip_layer_strategy={call_kwargs['skip_layer_strategy']}")
|
| 744 |
|
| 745 |
latents = None
|
| 746 |
-
latents_list[]
|
| 747 |
|
| 748 |
try:
|
| 749 |
ctx = torch.autocast(device_type="cuda", dtype=self.runtime_autocast_dtype) if self.device == "cuda" else contextlib.nullcontext()
|
|
@@ -794,8 +794,6 @@ class VideoService:
|
|
| 794 |
print(f"[DEBUG] Upscale de Latentes concluído em {time.perf_counter() - t_upscale:.2f}s")
|
| 795 |
del base_latents; gc.collect(); torch.cuda.empty_cache()
|
| 796 |
|
| 797 |
-
|
| 798 |
-
|
| 799 |
par = 0
|
| 800 |
latents_cpu_up = upsampled_latents.detach().to("cpu", non_blocking=True)
|
| 801 |
torch.cuda.empty_cache()
|
|
@@ -808,7 +806,6 @@ class VideoService:
|
|
| 808 |
temp_dir = tempfile.mkdtemp(prefix="ltxv_"); self._register_tmp_dir(temp_dir)
|
| 809 |
results_dir = "/app/output"; os.makedirs(results_dir, exist_ok=True)
|
| 810 |
|
| 811 |
-
|
| 812 |
for latents in latents_parts_up:
|
| 813 |
|
| 814 |
# # --- ETAPA 3: REFINAMENTO DE TEXTURA (SECOND PASS) ---
|
|
@@ -864,7 +861,7 @@ class VideoService:
|
|
| 864 |
#except Exception:
|
| 865 |
# pass
|
| 866 |
|
| 867 |
-
latents_parts[]
|
| 868 |
for latents in latents_list:
|
| 869 |
latents_parts.append(self._dividir_latentes_por_tamanho(latents_cpu,4,1))
|
| 870 |
temp_dir = tempfile.mkdtemp(prefix="ltxv_"); self._register_tmp_dir(temp_dir)
|
|
|
|
| 743 |
print(f"[DEBUG] output_type={call_kwargs['output_type']} skip_layer_strategy={call_kwargs['skip_layer_strategy']}")
|
| 744 |
|
| 745 |
latents = None
|
| 746 |
+
latents_list = []
|
| 747 |
|
| 748 |
try:
|
| 749 |
ctx = torch.autocast(device_type="cuda", dtype=self.runtime_autocast_dtype) if self.device == "cuda" else contextlib.nullcontext()
|
|
|
|
| 794 |
print(f"[DEBUG] Upscale de Latentes concluído em {time.perf_counter() - t_upscale:.2f}s")
|
| 795 |
del base_latents; gc.collect(); torch.cuda.empty_cache()
|
| 796 |
|
|
|
|
|
|
|
| 797 |
par = 0
|
| 798 |
latents_cpu_up = upsampled_latents.detach().to("cpu", non_blocking=True)
|
| 799 |
torch.cuda.empty_cache()
|
|
|
|
| 806 |
temp_dir = tempfile.mkdtemp(prefix="ltxv_"); self._register_tmp_dir(temp_dir)
|
| 807 |
results_dir = "/app/output"; os.makedirs(results_dir, exist_ok=True)
|
| 808 |
|
|
|
|
| 809 |
for latents in latents_parts_up:
|
| 810 |
|
| 811 |
# # --- ETAPA 3: REFINAMENTO DE TEXTURA (SECOND PASS) ---
|
|
|
|
| 861 |
#except Exception:
|
| 862 |
# pass
|
| 863 |
|
| 864 |
+
latents_parts = []
|
| 865 |
for latents in latents_list:
|
| 866 |
latents_parts.append(self._dividir_latentes_por_tamanho(latents_cpu,4,1))
|
| 867 |
temp_dir = tempfile.mkdtemp(prefix="ltxv_"); self._register_tmp_dir(temp_dir)
|