Running LTX-2.5 Video Generation on AWS Trainium3
Hugging Face has successfully deployed the LTX-2.5 video generation model on AWS Trainium3 hardware, achieving performance that rivals LTX's own commercial API. By utilizing 32 NeuronCores on a trn3.48xlarge instance, the team generated 10-second, 2048×1024 resolution clips in approximately 22 to 23 seconds, once models were loaded. This effort demonstrates the feasibility of running complex, high-resolution generative video pipelines on specialized AI accelerators through rigorous optimization of memory and compute distribution.
Optimizing for Trainium3
Running LTX-2.5 on Trainium3 required significant architectural adjustments because the model's transformer architecture does not natively fit on a single NeuronCore. The team employed two primary parallelization strategies to overcome memory and compute bottlenecks:
- Tensor Parallelism: The transformer weights were split across four cores to manage memory constraints.
- Sequence Parallelism: The video sequence was split across eight segments, allowing the model to process higher resolution outputs (2048×1024) by distributing the workload across 32 total NeuronCores.
Additional performance gains were realized by moving video decoding from the CPU to the NeuronCores, optimizing host-side thread management, and implementing custom attention processors. These changes reduced the generation time for a 10-second clip from an initial 5 minutes and 20 seconds down to roughly 22 seconds.
Filmmaking with LTX-2.5
Beyond raw performance, the project established a framework for generating structured video content using a JSON-based "film" format. This approach treats video generation like animation, allowing for:
- Shot Chaining: Using
fromandtokeys, the model can bridge shots by conditioning new clips on the final frames of previous ones. This maintains visual consistency for subjects across cuts. - Pose-to-Pose Animation: By generating a key "payoff" shot first and then chaining preceding and succeeding shots to it, the model can maintain continuity in complex scenes.
- Reproducibility: By storing shot parameters, prompts, and seeds in a JSON file, the entire film can be reconstructed byte-for-byte.
Potential for World Models in Robotics
LTX-2.5 functions as a world model, capable of extending real-world footage. In experiments using head-camera footage from a Fourier GR1-T2 humanoid robot, the model successfully synthesized continuations of actions—such as grabbing an object—based on only the first second of real-world input.
This capability suggests that world models could be used to generate diverse, reproducible training data for robotics, including rare or risky scenarios. However, the team notes that current generation is conditioned on visual prompts rather than robot commands; effective integration for robotics would require fine-tuning the pre-trained LTX-2.5 checkpoint on specific robot action-frame datasets.