Generating Videos with LTX-2.5 on Trainium3: 10s Clips in 22–23s

Authors David Corvoysier, Jingya Huang and Sayak Paul describe an experiment that ran LTX-2.5 on a trn3.48xlarge (64 NeuronCores) to generate short films. Using half the machine (32 NeuronCores), they report a 10-second clip with sound took 22 to 23 seconds at 2048×1024 once models were loaded. This runtime is compared with LTX’s online API claim of 23.7 s for a 10-second 1080p clip.

Experiment and results

The input format was a JSON “film” composed of named shots with prompts and optional seeds. Shots were chained with from/to keys so one shot could start from or end on frames of another, which helps maintain characters and motion across cuts. The team produced several short films (seal, fox, goat) and tested continuations from real footage, including a GR1-T2 humanoid head-camera clip; generated takes diverged from the real continuation but preserved scene elements.

Initial runs were much slower: an early attempt at 960×544 on 4 NeuronCores took about 5 minutes 20 seconds wall time, with NeuronCores active only ~45 seconds. After optimization, a 10-second clip at 2048×1024 ran in 22–23 s on 32 cores, with NeuronCores compute time around 15 s.

Engineering changes

Getting the model to run and perform required three classes of work: enabling tensor parallelism so the transformer fit on multiple cores, adding sequence parallelism to split video tokens across chips, and reducing host-side waste. The transformer was split 4 ways (tensor parallelism) and the sequence split 8 ways, yielding 4×8 = 32 cores for a clip. Key software workarounds included compile_repeated_blocks to reduce tracing cost, computing GELU activations in fp32 to avoid numerical errors with bf16, and packing parameters into ≤1 GiB buffers to cut memory per core from ~22.96 GiB to ~10.2 GiB.

Host optimizations cut prompt encoding from ~205 s to ~7.5 s (then to ~1.4 s after further changes). Moving video decode to the NeuronCores reduced CPU decode time from 357 s to 1.6 s at 2048×1024. Other targeted fixes improved transformer step times and removed slow device copies.

Limits and practical notes

The authors note remaining constraints: shots are limited to 20 s, sound is generated per shot and does not carry across cuts, and many shots require multiple takes to get details right. Models need about 3 minutes to load and roughly 80 s for their first clip. The post also highlights potential robotics uses: LTX-2.5 can generate multiple plausible continuations from a short camera clip, which the authors present as useful for data augmentation but not as a replacement for action-conditioned generation without further fine-tuning.


Original source: Hugging Face Blog

Leave a Comment