Carlos s
commited on
Update api/ltx_server.py
Browse files- api/ltx_server.py +5 -5
api/ltx_server.py
CHANGED
|
@@ -414,7 +414,7 @@ class VideoService:
|
|
| 414 |
chunks = []
|
| 415 |
|
| 416 |
if num_latente_por_chunk >= sum_latent:
|
| 417 |
-
return [latents_brutos
|
| 418 |
|
| 419 |
n_chunks = (sum_latent) // num_latente_por_chunk
|
| 420 |
steps = sum_latent//n_chunks
|
|
@@ -429,13 +429,13 @@ class VideoService:
|
|
| 429 |
end=1
|
| 430 |
while i < n_chunks:
|
| 431 |
start += end
|
| 432 |
-
end = num_latente_por_chunk
|
| 433 |
-
if
|
| 434 |
-
end = (sum_latent-1)
|
| 435 |
i = n_chunks
|
| 436 |
else:
|
| 437 |
i += 1
|
| 438 |
-
chunk = latents_brutos[:, :, start-1:end, :, :].clone()
|
| 439 |
chunks.append(chunk)
|
| 440 |
print(f"[DEBUG] chunk{i}[:, :, {start-1}:{end}, :, :] = {chunk.shape[2]}")
|
| 441 |
else:
|
|
|
|
| 414 |
chunks = []
|
| 415 |
|
| 416 |
if num_latente_por_chunk >= sum_latent:
|
| 417 |
+
return [latents_brutos]
|
| 418 |
|
| 419 |
n_chunks = (sum_latent) // num_latente_por_chunk
|
| 420 |
steps = sum_latent//n_chunks
|
|
|
|
| 429 |
end=1
|
| 430 |
while i < n_chunks:
|
| 431 |
start += end
|
| 432 |
+
end = start+num_latente_por_chunk
|
| 433 |
+
if end+3>=sum_latent-1:
|
| 434 |
+
end = (sum_latent-1)
|
| 435 |
i = n_chunks
|
| 436 |
else:
|
| 437 |
i += 1
|
| 438 |
+
chunk = latents_brutos[:, :, start-1:end, :, :].clone().detach())
|
| 439 |
chunks.append(chunk)
|
| 440 |
print(f"[DEBUG] chunk{i}[:, :, {start-1}:{end}, :, :] = {chunk.shape[2]}")
|
| 441 |
else:
|