Update api/ltx_server.py
Browse files- api/ltx_server.py +10 -9
api/ltx_server.py
CHANGED
|
@@ -416,7 +416,8 @@ class VideoService:
|
|
| 416 |
if num_latente_por_chunk >= sum_latent:
|
| 417 |
return [latents_brutos.clone()]
|
| 418 |
|
| 419 |
-
|
|
|
|
| 420 |
print("================PODA CAUSAL=================")
|
| 421 |
print(f"[DEBUG] TOTAL LATENTES = {sum_latent}")
|
| 422 |
print(f"[DEBUG] Num LATENTES por chunk = {num_latente_por_chunk}")
|
|
@@ -424,16 +425,16 @@ class VideoService:
|
|
| 424 |
|
| 425 |
start = 0
|
| 426 |
end = num_latente_por_chunk
|
| 427 |
-
|
| 428 |
if steps > 1:
|
| 429 |
-
while
|
| 430 |
-
|
| 431 |
-
|
| 432 |
-
|
| 433 |
-
|
| 434 |
-
chunk = latents_brutos[:, :, start:end
|
| 435 |
chunks.append(chunk)
|
| 436 |
-
print(f"[DEBUG] chunk{i+1}[:, :, {start}:{end
|
| 437 |
start += steps
|
| 438 |
i += 1
|
| 439 |
else:
|
|
|
|
| 416 |
if num_latente_por_chunk >= sum_latent:
|
| 417 |
return [latents_brutos.clone()]
|
| 418 |
|
| 419 |
+
n_chunks = (sum_latent) // num_latente_por_chunk
|
| 420 |
+
steps = sum_latent//n_chunks
|
| 421 |
print("================PODA CAUSAL=================")
|
| 422 |
print(f"[DEBUG] TOTAL LATENTES = {sum_latent}")
|
| 423 |
print(f"[DEBUG] Num LATENTES por chunk = {num_latente_por_chunk}")
|
|
|
|
| 425 |
|
| 426 |
start = 0
|
| 427 |
end = num_latente_por_chunk
|
| 428 |
+
|
| 429 |
if steps > 1:
|
| 430 |
+
while i < steps:
|
| 431 |
+
start = i*num_latente_por_chunk
|
| 432 |
+
end = (start+num_latente_por_chunk)-1
|
| 433 |
+
if i+1 >= steps:
|
| 434 |
+
end = sum_latent-1
|
| 435 |
+
chunk = latents_brutos[:, :, start:end, :, :].clone()
|
| 436 |
chunks.append(chunk)
|
| 437 |
+
print(f"[DEBUG] chunk{i+1}[:, :, {start}:{end}, :, :] = {chunk.shape[2]}")
|
| 438 |
start += steps
|
| 439 |
i += 1
|
| 440 |
else:
|