Skip to content
AI Learning Ground Start learning

Research ·

Taking Trainium3 to the Track: Generating Videos with LTX-2.5

Hugging Face engineers got LTX-2.5 video generation running on an AWS Trainium3 instance, reaching 22-23s per 10-second clip with sound on half the machine, matching LTX's own API speed.

Taking Trainium3 to the Track: Generating Videos with LTX-2.5
Image: Hugging Face

Hugging Face, through its partnership with AWS, got a month on a Trainium3 machine (trn3.48xlarge, 64 NeuronCores). With five days left, they used it to generate videos with LTX-2.5 from Lightricks, which produces video and sound together. Once models are loaded, a 10-second clip at 2048x1024 takes 22 to 23 seconds to generate, using only half the machine. That matches and slightly beats LTX's online API, which the company says makes a 10-second 1080p clip in 23.7 seconds; no comparable CUDA figure was available, since LTX's claim of 6.8s on four B200s lacks measurement details.

The setup generates short films from a JSON script of shots, each with a prompt covering style, subject, motion, camera, light and sound. Shots can be chained with from and to keys, starting from the last frames of an earlier shot or ending on the first frames of a later one, so subjects persist across cuts. Building a film follows an animation approach: either straight ahead or pose to pose, where a key shot is made first and surrounding shots connect to it. Three diffusers pipelines share the LTX-2.5 models: one generates shots from prompts, one handles shots tied to other shots' frames, and a third upscales latents 2x before three final steps. The film logic is about 160 lines of Python on top; code and example films are in the dacorvo/video-generation repository and bucket.

The model did not run on NeuronCores out of the box: the transformer does not fit on one core, and the first working attempt took about 5 minutes 20 seconds per clip, with the cores computing only about 45 seconds of that. Getting it fast required tensor parallelism, sequence parallelism, and host-side work; host time fell from about 280s to about 8s (roughly 35x) and device time from 45s to 15s (3x, at four times the pixels). Some fixes are upstreaming to diffusers, and three unexplained issues remain, including a NaN at one size and the latent upsampler staying on CPU.

For builders, this shows that recent generative video models can run competitively on non-CUDA hardware like AWS Trainium, though it takes nontrivial parallelism and host-side optimization work. The chaining approach for multi-shot films is a practical recipe for scripted video generation with diffusers.

References

Read the full story at Hugging Face ↗Like, save or discuss on Buzz

#open-weights #tooling #research