A Hugging Face engineer successfully generated high-resolution video clips on AWS’s Trainium3 hardware, achieving performance metrics comparable to Lightricks’ proprietary online API. Using a trn3.48xlarge instance, the project demonstrated that custom optimizations could allow LTX-2.5 to produce a 10-second clip with sound in approximately 22 to 23 seconds.

What Happened

During a month-long access period to AWS Trainium3 hardware, a Hugging Face developer tested the LTX-2.5 model, which generates video and audio simultaneously. The initial attempt to run the model on four NeuronCores took over five minutes for a 10-second clip, with the hardware actively computing for only about 45 seconds. Through a series of optimizations involving tensor and sequence parallelism, the final setup utilized 32 NeuronCores on half of the available machine. This configuration reduced the generation time to 22–23 seconds for a 10-second clip at 2048×1024 resolution.

The optimization process involved splitting the model across multiple cores and fixing various compatibility issues with the diffusers library. Key improvements included running the pipeline on a single rank to avoid redundant text encoding, adjusting memory allocation to reduce usage from 22.96 GiB to 10.2 GiB per core, and moving video decoding from the CPU to the NeuronCores. These changes reduced host processing time by approximately 35 times and improved device-side efficiency by three times, despite generating at four times the pixel count of the initial attempt.

Why It Matters

The results suggest that AWS Trainium3 can serve as a viable alternative to NVIDIA GPUs for video generation tasks, particularly for organizations already invested in the AWS ecosystem. The engineer noted that the optimized Trainium3 setup matched Lightricks’ reported API speed of 23.7 seconds for a 10-second 1080p clip, and even slightly exceeded it. This performance parity is significant given that the test used only half of the available hardware resources on the instance.

Beyond raw speed, the project highlighted specific challenges in adapting video models for non-CUDA accelerators. The engineer encountered issues such as NaN outputs during graph compilation and memory allocation inefficiencies in torch-neuronx. Some of these fixes are being contributed upstream to the Hugging Face diffusers library, potentially easing future adoption of Trainium hardware for video AI workloads. The ability to generate consistent, multi-shot sequences with reproducible seeds also points toward potential applications in automated film drafting and robotics training data generation.

The Bottom Line

Hugging Face’s experiment confirms that LTX-2.5 can run efficiently on AWS Trainium3 with substantial optimization, achieving sub-25-second generation times for 10-second videos. While the model still requires multiple takes to ensure visual consistency and has limits on shot duration and audio continuity, the performance matches leading proprietary APIs. This development expands the hardware options available for developers building video AI applications, offering a competitive path on AWS infrastructure.