Hugging Face runs LTX-2.5 video generation on AWS Trainium3, matching LTX's API speed
With tensor and sequence parallelism across 32 NeuronCores, Hugging Face's diffusers pipelines generated a 10-second 2048x1024 clip with sound in 22-23 seconds on half a trn3.48xlarge, roughly matching LTX's own 1080p API time.
Summary
Hugging Face engineers spent a month with an AWS Trainium3 instance (trn3.48xlarge, 64 NeuronCores) under the AWS partnership and used the final days to test video generation with Lightricks' LTX-2.5, a model that produces video and audio together. The out-of-the-box model did not run on NeuronCores: the transformer did not fit on a single core and diffusers had no built-in plan to split it. A first working attempt, with the transformer split over four cores plus patches, took about 5 minutes 20 seconds for a 10-second clip at 960x544, of which only about 45 seconds were actual NeuronCore compute.
After five days of work the setup produced a 10-second clip with sound at 2048x1024 in 22 to 23 seconds on 32 NeuronCores, with 15 seconds of compute time, a 14x improvement over the first attempt at roughly four times the pixel count. Hugging Face compares this to LTX's online API, which the company says makes a 10-second 1080p clip in 23.7 seconds, and notes it could not find a comparable CUDA figure beyond LTX's claim of 6.8 seconds for a 10-second 720p clip on four B200 GPUs. The work is documented with three example films (seal, fox, goat) and about 160 lines of Python on top of the diffusers pipelines, published in the dacorvo/video-generation repository.
How LTX-2.5 was made to run on Trainium3
- Tensor and sequence parallelism: The LTX-2.5 transformer does not fit on one NeuronCore, so it was split across cores with tensor parallelism, then spread over more cores with sequence parallelism; the optimized run used 32 of the machine's 64 NeuronCores.
- Three diffusers pipelines: LTX2Pipeline generates shots from a prompt alone, LTX2ConditionPipeline handles shots that start or end on frames of another shot, and LTX2LatentUpsamplePipeline upscales latents 2x; generation follows the model card's two-stage distilled recipe of 8 steps, upscale, then 3 final steps.
- Shot chaining via from/to keys: A film is a JSON list of shots with name, prompt and optional seed; the from key starts a shot from the last frames of an earlier shot (last frame preserves a subject's look, last 25 frames continue motion) and the to key ends a shot on the first frames of a later one.
- Film assembly layer: About 160 lines of Python read the film file, order shots so each keyframe exists before the shot that needs it, cut frames for handover, then trim, caption, even out the sound and assemble the final film.
- Performance progression: The first working version ran at 960x544 on 4 cores in 5 min 20 s with only 45 s of NeuronCore compute; the optimized version reached 2048x1024 on 32 cores in 22-23 s with 15 s of compute.
Why it matters
The result shows that AWS's Neuron stack can host modern diffusion video pipelines at competitive latency, which matters for teams that want an alternative to NVIDIA CUDA hardware for generative media workloads. Because the pipelines are built on diffusers and the film-assembly code is published, other developers can reproduce the shot-chaining approach on Trainium or adapt it to other accelerators. It also gives the open-model video community a concrete, documented data point on LTX-2.5 throughput outside the vendor's own API.
Original reference: huggingface.co →