Update api/ltx_server.py
Browse files- api/ltx_server.py +9 -12
api/ltx_server.py
CHANGED
|
@@ -423,19 +423,16 @@ class VideoService:
|
|
| 423 |
print(f"[DEBUG] LATENTES min por chunk = {num_latente_por_chunk}")
|
| 424 |
print(f"[DEBUG] Número de chunks = {n_chunks}")
|
| 425 |
if n_chunks > 1:
|
| 426 |
-
|
| 427 |
-
i
|
| 428 |
-
|
| 429 |
-
|
| 430 |
-
|
| 431 |
-
|
| 432 |
-
|
| 433 |
-
chunk = latents_brutos[:, :, start-1:end+1, :, :].clone().detach()
|
| 434 |
-
print(f"[DEBUG] chunk{i}[:, :, {start-1}:{end+1}, :, :] = {chunk.shape[2]}")
|
| 435 |
else:
|
| 436 |
-
|
| 437 |
-
chunk
|
| 438 |
-
print(f"[DEBUG] chunk{i}[:, :, {start-1}:, :, :] = {chunk.shape[2]}")
|
| 439 |
chunks.append(chunk)
|
| 440 |
else:
|
| 441 |
print(f"[DEBUG] numero chunks minimo ")
|
|
|
|
| 423 |
print(f"[DEBUG] LATENTES min por chunk = {num_latente_por_chunk}")
|
| 424 |
print(f"[DEBUG] Número de chunks = {n_chunks}")
|
| 425 |
if n_chunks > 1:
|
| 426 |
+
i=0
|
| 427 |
+
while i < n_chunks-1:
|
| 428 |
+
start = num_latente_por_chunk*i
|
| 429 |
+
end = start+num_latente_por_chunk+overlap
|
| 430 |
+
if end < sum_latent-3:
|
| 431 |
+
chunk = latents_brutos[:, :, start:end, :, :].clone().detach()
|
| 432 |
+
print(f"[DEBUG] chunk{i}[:, :, {start}:{end}, :, :] = {chunk.shape[2]}")
|
|
|
|
|
|
|
| 433 |
else:
|
| 434 |
+
chunk = latents_brutos[:, :, start:, :, :].clone().detach()
|
| 435 |
+
print(f"[DEBUG] chunk{i}[:, :, {start}:, :, :] = {chunk.shape[2]}")
|
|
|
|
| 436 |
chunks.append(chunk)
|
| 437 |
else:
|
| 438 |
print(f"[DEBUG] numero chunks minimo ")
|