Update api/ltx_server.py
Browse files- api/ltx_server.py +8 -9
api/ltx_server.py
CHANGED
|
@@ -420,9 +420,8 @@ class VideoService:
|
|
| 420 |
steps = sum_latent//n_chunks
|
| 421 |
print("================PODA CAUSAL=================")
|
| 422 |
print(f"[DEBUG] TOTAL LATENTES = {sum_latent}")
|
| 423 |
-
print(f"[DEBUG]
|
| 424 |
print(f"[DEBUG] Número de chunks = {n_chunks}")
|
| 425 |
-
|
| 426 |
if n_chunks > 1:
|
| 427 |
start = 0
|
| 428 |
i = 0
|
|
@@ -430,16 +429,16 @@ class VideoService:
|
|
| 430 |
while i < n_chunks:
|
| 431 |
start += end
|
| 432 |
end = start+num_latente_por_chunk
|
| 433 |
-
if end+3
|
| 434 |
-
|
| 435 |
-
i =
|
| 436 |
else:
|
| 437 |
-
i
|
| 438 |
-
|
|
|
|
| 439 |
chunks.append(chunk)
|
| 440 |
-
print(f"[DEBUG] chunk{i}[:, :, {start-1}:{end+1}, :, :] = {chunk.shape[2]}")
|
| 441 |
else:
|
| 442 |
-
print(f"[DEBUG] numero chunks minimo")
|
| 443 |
print(f"[DEBUG] latents_brutos[:, :, :, :, :] = {latents_brutos.shape[2]}")
|
| 444 |
chunks.append(latents_brutos)
|
| 445 |
print("================PODA CAUSAL=================")
|
|
|
|
| 420 |
steps = sum_latent//n_chunks
|
| 421 |
print("================PODA CAUSAL=================")
|
| 422 |
print(f"[DEBUG] TOTAL LATENTES = {sum_latent}")
|
| 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 |
start = 0
|
| 427 |
i = 0
|
|
|
|
| 429 |
while i < n_chunks:
|
| 430 |
start += end
|
| 431 |
end = start+num_latente_por_chunk
|
| 432 |
+
if end+3<sum_latent:
|
| 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 |
+
i = n_chunks
|
| 437 |
+
chunk = latents_brutos[:, :, start-1:, :, :].clone().detach()
|
| 438 |
+
print(f"[DEBUG] chunk{i}[:, :, {start-1}:, :, :] = {chunk.shape[2]}")
|
| 439 |
chunks.append(chunk)
|
|
|
|
| 440 |
else:
|
| 441 |
+
print(f"[DEBUG] numero chunks minimo ")
|
| 442 |
print(f"[DEBUG] latents_brutos[:, :, :, :, :] = {latents_brutos.shape[2]}")
|
| 443 |
chunks.append(latents_brutos)
|
| 444 |
print("================PODA CAUSAL=================")
|