This document is relevant for: Trn2, Trn3
HunyuanVideo-1.5 (T2V) Model Card#
Introduction#
HunyuanVideo-1.5 is a text-to-video diffusion model from Tencent. Prompts are encoded by a Qwen2.5-VL text encoder, with a ByT5 encoder for quoted text, and latents are decoded by a causal 3D VAE.
HunyuanVideo-1.5 (T2V) is supported for inference serving with
vLLM Omni using the Neuron SDK on AWS
Trainium2 (trn2) and Trainium3 (trn3).
Compatible model checkpoints (diffusers layout):
Variant |
HuggingFace |
Guidance |
Hardware |
Quantization |
|---|---|---|---|---|
|
|
CFG-distilled: one forward per step |
Trn2, Trn3 |
BF16 |
|
classifier-free guidance |
Trn2, Trn3 |
BF16 |
|
|
classifier-free guidance |
Trn2, Trn3 |
BF16 |
There is no distilled 720p text-to-video checkpoint. Checkpoints are read from the local Hugging
Face cache or a local directory, for example after
hf download hunyuanvideo-community/HunyuanVideo-1.5-Diffusers-480p_t2v_distilled; see
examples/hunyuan/README.md.
License: the weights are released by Tencent under the Tencent Hunyuan Community License Agreement, not under this plugin’s Apache-2.0 license. That license does not apply in the European Union, the United Kingdom or South Korea. Review it before use.
Features#
Category |
Feature |
Status |
|---|---|---|
Generation |
Text-to-video |
✅ |
848x480 (480p) |
✅ |
|
1280x720 (720p) |
✅ |
|
121 frames; 241 frames at 480p |
✅ |
|
Image-to-video |
❌ |
|
Precision |
BF16 (DiT, ByT5 text encoder and VAE; Qwen2.5-VL text encoder in FP16) |
✅ |
Parallelism |
Tensor parallelism (TP) |
✅ |
Context parallelism (CP, ring attention) |
✅ |
|
CFG parallelism (CFG variants) |
✅ |
|
VAE tile parallelism |
✅ |
|
Acceleration |
TeaCache (calibrated per variant) |
✅ |
Status legend:
✅ Supported: integrated and tested for HunyuanVideo-1.5
❌ Not supported: image-to-video checkpoints are refused at load
Recommended configuration#
Every stage config runs on 64 NeuronCores (devices: "0-63"). Parallelism is set by the stage config,
not a flag.
Stage config |
TP × CP × CFG |
Use with |
|---|---|---|
|
4 × 16 × 1 |
|
4 × 8 × 2 |
|
CP is ring_degree in parallel_config; with CP > 1 attention runs as ring attention, and
engine_args.model_config.enable_ring_attention: false selects K/V all-gather instead (each rank
gathers every rank’s keys and values and attends locally). Do not run the distilled variant with the CFG-parallel
config: it has no second guidance branch. The TeaCache configs are listed in
examples/hunyuan/README.md.
The Qwen2.5-VL text encoder is staged in /dev/shm (about 17.8 GiB on 64 cores) and loaded for each
encode, so start the container with a --shm-size that leaves room for it on top of the
setup guide’s 2g, for example --shm-size=20g.
Usage#
# 480p distilled, 121 frames (all defaults)
python examples/hunyuan/run.py --prompt "A red fox trotting through a snowy forest at sunrise"
# 720p CFG on the CFG-parallel layout
python examples/hunyuan/run.py --variant 720p_t2v --height 720 --width 1280 \
--stage-config hunyuan_stage_tp4cp8cfg2_121f.yaml --output hy_720p.mp4
A request that leaves
guidance_scaleunset gets the checkpoint’s value (1.0 distilled, 6.0 CFG).Height and width must be multiples of 16 and the frame count
4k + 1; other values are refused before any encode. A request that leaves them unset gets the stage config’sdefault_sampling_params(848x480, 121 frames; 1280x720 for the 720p TeaCache config).Entry points other than
run.py(vllm serve, a directOmni(...)) must apply theHUNYUAN15_T2Venv profile or exportTORCH_NEURONX_NEFF_CACHE_LOCK_TIMEOUT=3600: otherwise ranks waiting on another rank’s compile time out after the runtime’s default lock timeout of 1200 s.The full flag set and TeaCache are in
examples/hunyuan/README.md.
Performance#
Warm DiT time per denoising step on 64 NeuronCores (BF16, a 256-token text bucket): the mean of 10 back-to-back steps after 5 warm-up steps. A CFG step runs both guidance branches, one per CFG replica.
Configuration |
Stage config |
Trn2 (ms/step) |
Trn3 (ms/step) |
|---|---|---|---|
480p distilled, 121 frames |
|
273 |
249 |
480p CFG, 121 frames |
|
554 |
381 |
Accuracy Evaluation#
No VBench result has been published for this model. Accuracy is tested at two levels:
Per component: the DiT, text encoder, VAE and the full pipeline’s denoised latents are each compared three ways with
assert_close_three_way(vllm_neuron.accuracy.testing): an FP32 CPU baseline, a same-dtype CPU run, and the Neuron run.End to end: a full render is compared with a stored Neuron reference render (a regression check, not a comparison with another implementation) by per-frame SSIM: mean ≥ 0.85 and every frame ≥ 0.75. The TeaCache configs are compared against the uncached reference render.
Known limitations#
Deterministic sampling only. A scheduler with
stochastic_samplingraisesNotImplementedErrorat the first denoise step, as doescfg_normalizeon the CFG-parallel config. Every stage config setsmax_num_seqs: 1, so requests run one at a time.Tested layouts only. The stage configs above (TP4 x CP16, or TP4 x CP8 x CFG2) are the tested layouts. TP below 4 is refused at load: the per-rank fused QKV width exceeds the fused QKV kernel’s supported width.
Prompt length. The Qwen2.5-VL prompt is truncated to 1000 tokens. The text tokens the DiT sees are padded to the smallest of 128, 256, 512 or 1024 that holds them (the full width above that), and the first request in each bucket compiles its DiT graphs.
Up to 64 steps per compiled shape. The per-timestep AdaLN tables are padded to 64 rows, so any schedule of at most 64 steps reuses the same DiT graphs; a longer one compiles new graphs on first use.
Text-to-video only. Image-to-video checkpoints (
task_type: i2v) and meanflow checkpoints (use_meanflow: true) raiseNotImplementedErrorat load.Each CP rank needs at least 128 video tokens. The DiT raises
ValueErrorfor a geometry that gives fewer (latent frames × H/16 × W/16, divided by CP): on the CP16 config, 256x256 needs at least 29 frames. The stage configs’ default geometries are far above it.A too-small
--shm-sizefails the first request, not startup. The text encoder (about 17.8 GiB) is written to/dev/shmon the first request, so a container started with the setup guide’s2gcomes up and then fails its first generate. Start it with--shm-size=20gor more; rank 0’s error states the free and needed sizes.A killed run leaves its staged text encoder in
/dev/shm. The next run must stage a full new copy before replacing it, so with--shm-size=20gits first request fails the same way. Delete/dev/shm/vllm_omni_offload_*.ptbefore restarting in the same container.
Tutorials#
This document is relevant for: Trn2, Trn3