This document is relevant for: Trn2, Trn3

LTX-2.3 22B Model Card#

Introduction#

LTX-2.3 is an audio-video diffusion model from Lightricks. It has 22 billion parameters. It generates a video and a synchronized audio track from a text prompt. It can also start from a first-frame image. This plugin runs it with vLLM-Omni on AWS Trainium2 (Trn2) and Trainium3 (Trn3).

The Neuron pipeline, NeuronLTX2Pipeline, subclasses vLLM-Omni’s LTX2Pipeline. It replaces the parts that need a Neuron implementation.

In this card, “the reference” is the Lightricks code, and the DiT is the diffusion transformer. TP is tensor parallelism, SP is sequence parallelism, and GP is guidance parallelism. CFG is classifier-free guidance, and STG is spatio-temporal guidance.

Compatible model checkpoints:

Model

Hugging Face

Hardware

Precision

LTX-2.3 22B

Lightricks/LTX-2.3

Trn2, Trn3

bf16 weights. The DiT runs in bf16 or fp8 (see DiT precision)

Gemma-3-12B text encoder

google/gemma-3-12b-it-qat-q4_0-unquantized

Trn2, Trn3

bf16

Download these files of Lightricks/LTX-2.3 into one model directory:

  • ltx-2.3-22b-dev.safetensors, the checkpoint. It holds the DiT, the VAEs, the vocoder and the text connectors by key prefix, and the config in its metadata. The pipeline reads the file directly.

  • For the two-stage pipeline only (Trn3): ltx-2.3-spatial-upscaler-x2-1.1.safetensors and ltx-2.3-22b-distilled-lora-384-1.1.safetensors. See Two-stage pipeline.

Also put a model_index.json file with {"_class_name": "LTX2Pipeline"} in the model directory. vLLM-Omni reads this file at start-up, before it loads the pipeline. Give the model directory with --model-path of examples/ltx2/run.py.

The checkpoint does not hold the Gemma-3-12B text encoder and its tokenizer. Accept the Gemma license on Hugging Face. Hugging Face then gives access to the Gemma repository. Download all files of this repository into one directory. Give the directory with --gemma-root of examples/ltx2/run.py, or with model_config={"gemma_root": ...}. The pipeline stops at start-up without it.

The pipeline imports the ltx-core and ltx-pipelines packages of the Lightricks LTX-2 repository. The validation runs used version 1.1.2 of the two packages, from commit 41d92437 of the repository. Install them before a run:

LTX2_GIT=git+https://github.com/Lightricks/LTX-2.git@41d924371612b692c0fd1e4d9d94c3dfb3c02cb3
pip install --no-deps "$LTX2_GIT#subdirectory=packages/ltx-core" \
    "$LTX2_GIT#subdirectory=packages/ltx-pipelines"
pip install av OpenImageIO

--no-deps keeps the packages of the Neuron environment, for example torch. The last command installs av and OpenImageIO. ltx-pipelines imports these two packages. Only the LTX-2 pipeline uses ltx-core, ltx-pipelines, av and OpenImageIO. PyPI does not have version 1.1.2 of ltx-core or ltx-pipelines. Thus the requirement files of the plugin do not list these four packages.

This plugin runs LTX-2.3 on the vLLM-Omni version that requirements/core.txt pins (0.32 on 2026-11-03), with PyTorch 2.13 and Python 3.13. This card calls it the pinned version.

Components#

Component

Implementation

Runs on

Diffusion transformer (48 blocks)

vLLM-Omni’s transformer, subclassed for the LTX-2.3 features

Neuron, tensor-parallel

Video self-attention

NKI attention_ltx2 megakernel (QKV projection, Q/K norm, RoPE and attention in one kernel)

Neuron

Audio self-attention, text cross-attention, audio-video cross-attention

NKI audio_cross_attention_ltx2 kernel

Neuron

Attention output projection

NKI output_projection_cte kernel

Neuron

FeedForward (video and audio)

NKI hf_ffn kernel

Neuron

Video decode

The video VAE decoder of LTX-2 in spatial tiles, one tile on each decode rank (ltx2_neuron_vae). --video-decoder host runs the reference decoder on the host

Neuron

Audio decode

The audio VAE decoder, vocoder and bandwidth extension (BWE) as compiled stages (ltx2_neuron_audio), on the last rank during the video decode. --audio-decoder host runs the reference AudioDecoder on the host. See Audio decode

Neuron

Text encoder (Gemma-3-12B)

Gemma-3 in bf16, TP over the DiT TP group, with its layers split over the SP x GP grid, and the embeddings processor (ltx2_neuron_text_encoder). --text-encoder host runs vLLM-Omni’s host text encoder

Neuron

Sampler

Port of ltx_core’s LTX2Scheduler sigma schedule

Host

Guidance

CFG, STG and modality guidance, as the reference runs them

Neuron

The plugin includes the source of these NKI kernels, in vllm_omni_neuron/kernels/nkilib_ltx2 and vllm_omni_neuron/kernels/hf_ffn.py.

Supported Features#

Feature

Status

Notes

Text to video and audio

✅

1280x704 and 1920x1088 (width x height), 121 frames

Image to video and audio

Limited

--image sets the first frame

Two-stage pipeline

Limited

LTX2TwoStagePipeline: generate at half size, upsample, then 3 refine steps. Trn3 only (see Known Limitations)

Tensor parallelism

✅

TP4

Sequence parallelism

✅

SP4, with a video-only shard plan and ring attention for the video self-attention

Guidance parallelism

✅

The four guidance branches on four replicas (GP4)

Audio sample rate

✅

48 kHz, after the bandwidth extension of the audio decoder

Status legend:

  • ✅ Supported: the validation of this plugin version ran end to end with all 48 DiT blocks on the pinned version.

  • Limited: on the pinned version, this plugin version completed a run with 4 DiT blocks.

On the pinned version, the validation with 48 DiT blocks used TP4 x SP4 x GP4, 121 frames and 40 steps. It ran 1280x704 and 1920x1088 on Trn2 and Trn3, in bf16 and in fp8. By default, examples/ltx2/run.py makes a 768x512 video with 121 frames and 30 steps. The validation with 48 DiT blocks on the pinned version did not include this size.

Configuration#

The sections that follow describe the stage configs, the environment variables and the default guidance of the pipeline.

Parallel configurations#

The stage config sets TP with tensor_parallel_size, SP with ulysses_degree and GP with cfg_parallel_size. Keep ring_degree at 1, because examples/ltx2/run.py reads the SP size from ulysses_degree. The Wan2.2 cards use the term context parallelism (CP) for this type of sequence shard, and they set CP with ring_degree. In those cards, SP is Megatron sequence parallelism, which is a different feature.

Configuration

NeuronCores

Stage config

TP4 x SP4 x GP4 (the default)

64

examples/ltx2/ltx2_stage.yaml

Two-stage pipeline, TP4 x SP4 x GP4

64

examples/ltx2/stage_configs/ltx2_two_stage.yaml

examples/ltx2/run.py uses the default stage config. To use the two-stage stage config, give it with --stage-config. On the pinned version, the end-to-end validation with 48 DiT blocks used only these two configurations. For another mesh, change tensor_parallel_size, ulysses_degree and cfg_parallel_size in a copy of the default stage config, and keep TP4 (see Known Limitations).

Two-stage pipeline#

The two-stage pipeline needs three files in the model directory: the checkpoint, the spatial upsampler ltx-2.3-spatial-upscaler-x2-1.1.safetensors, and the refine checkpoint ltx-2.3-22b-distilled-merged.safetensors. The refine checkpoint is the checkpoint with the distilled LoRA merged in. The two-stage pipeline of the reference refines with the same checkpoint and LoRA. Lightricks/LTX-2.3 also has ltx-2.3-22b-distilled-1.1.safetensors, but that file is a different model, for the distilled pipeline of the reference. Make the refine checkpoint one time:

python -m vllm_omni_neuron.diffusion.models.ltx2.ltx2_lora_merge \
    --base MODEL_DIR/ltx-2.3-22b-dev.safetensors \
    --lora MODEL_DIR/ltx-2.3-22b-distilled-lora-384-1.1.safetensors \
    --out MODEL_DIR/ltx-2.3-22b-distilled-merged.safetensors

Kernels#

The DiT uses these fused kernels:

Kernel

Modules

attention_ltx2

The video self-attention

audio_cross_attention_ltx2

The audio self-attention, the audio cross-attentions and the video text cross-attention

output_projection_cte

The attention output projections

hf_ffn

The FeedForward

A module that a kernel does not accept keeps the unfused module path. In that path, the attention core still runs the NKI attention_cte kernel, or the ring kernel under SP. Set VLLM_NEURON_DISABLE_NKI_KERNELS=1 to turn off all NKI kernels. This torch path is less accurate than the kernels, so use it to debug only.

Each kernel gate logs its decision one time, in a line that starts with [nki_kernel]. Set VLLM_OMNI_NEURON_REQUIRE_NKI_KERNELS=1 to make a torch fallback an error. A device that cannot run the kernel and a shape outside the kernel limits are fallbacks. These torch paths are by design, so they do not cause the error: the STG branch, an STG block with an STG mask, a masked attention, and an fp32 attention.

The pipeline also sets the ring-attention schedule of attention_ltx2. LTX2_CM_WEXP=2 runs one exp over two K/V tiles. With LTX2_SP_HOP_AFTER=4 and LTX2_SP_HOP_DEP=1, each ring hop starts after the K/V loads of the last head chunk. The env_profiles.LTX2 profile sets these values. Each worker also writes them before the kernel import, so a server without the profile gets the same schedule. A value that you set yourself wins. The kernel reads these variables at import. The compile cache key does not include these variables. After you change one, use an empty TORCH_NEURONX_NEFF_CACHE_DIR.

The STG blocks also use the fused self-attention kernels. When each GP replica runs one guidance branch, the STG branch skips the attention of these blocks and uses the V projection only. An example is GP4 with CFG, STG and modality guidance. The other branches use the kernels. Thus the ranks of the STG branch compile their own DiT graph. With fewer GP replicas than branches, the STG blocks keep the unfused path with the STG mask.

DiT precision#

VLLM_OMNI_NEURON_LTX2_DIT_PRECISION is auto (the default), bf16 or fp8. auto is fp8 for the one-stage pipeline and bf16 for the two-stage pipeline. fp8 turns on three paths:

Path

Override

The video FeedForward in fp8

VLLM_OMNI_NEURON_LTX2_FFN_FP8

The video self-attention QKV projection in static fp8 (SP only)

VLLM_OMNI_NEURON_LTX2_QKV_FP8

The SP-ring K/V transport in fp8

LTX2_SP_RING_FP8 (read by the kernel at import)

An override value of 0 or 1 sets that path, whatever the precision. fp8 is faster, and the video is softer. The compile cache key does not include LTX2_SP_RING_FP8, so use an empty TORCH_NEURONX_NEFF_CACHE_DIR after you change it.

SP-ring collective chunk#

examples/ltx2/run.py sets NEURON_RT_CC_CHUNK_SIZE so that one SP-ring K/V hop fits in one chunk (env_profiles.ring_cc_chunk_size). At 768x512 (width x height), 121 frames and TP4 x SP4, it is 3 MiB with the fp8 ring (the one-stage default) and 6 MiB with the bf16 ring. A value that you set yourself wins. Set the same value for a server.

Fixed device addresses for the DiT#

The runtime builds the DMA rings of a NEFF for the device addresses of its inputs and outputs, and keeps one ring set. The DiT weights are NEFF inputs, so a new address makes the runtime build all rings again. At 1920x1088 bf16 on Trn2, this takes about 1.6 s of host time in each step. Thus the latents, the timestep index, the prompt contexts and the DiT outputs keep one address. They keep it from step to step, and from one request to the next. The latents keep their address only in the steps that use the fused step tail (guidance parallelism). Thus the two-stage refine phase and sequential CFG get new latents in each step. The output does not change.

Prompt cache#

With VLLM_OMNI_NEURON_LTX2_PROMPT_CACHE=1 (the default), a request uses the prompt contexts of the previous request again when its prompts and encode settings are the same. The Gemma encode, the embeddings processor and the host-to-device copies then do not run. The key holds the prompts, the negative prompts (with CFG only), the number of videos for each prompt, the maximum sequence length and the dtypes. The cache keeps one entry. It applies to the Neuron text encoder. A request with prompt embeddings, negative prompt embeddings or attention masks does not use the cache. The encode has collectives, so the ranks of one encode take the decision together with a host all-reduce. Rank 0 logs the time of this vote for each hit and each miss. Set 0 for an A/B run.

The pipeline reads the switch one time, at load. Set the same value on each rank, also on each node of a multi-node run. If the ranks of one encode have different values, the load stops with an error.

Audio decode#

The last rank decodes the audio while the other ranks decode the video tiles. This card calls this rank the audio rank. Rank 0 sends its audio latent to the audio rank, and the audio rank decodes it. Thus the waveform always comes from the latent that rank 0 returns.

Two switches and a threshold make the audio decode shorter. On the CPU, the waveform with their defaults is the same as without them, bit for bit. On Trn2 at 1920x1088 and 121 frames, the defaults decrease the audio decode from 1.94 s to 1.18 s, and the wav does not change. Before you change a default, run the same request with each value. Then compare the wav and the time of the decode stage.

Variable

Default

Effect

VLLM_OMNI_NEURON_LTX2_AUDIO_POLYPHASE

1

1 runs the anti-aliased vocoder activations in polyphase form. split also splits each resblock into act-only and conv-only stages. 0 uses the zero-insert form. See the paragraph after this table

VLLM_OMNI_NEURON_LTX2_AUDIO_SPLIT_RANKS

62 on Trn2 at 64 ranks, else none

The three resblock chains of a long vocoder level start from the same input. The audio rank runs the first chains, and these helper ranks run the last chains with the same stage graphs. The audio rank then adds the chain outputs in the original order. 0 turns the split off. It needs the audio overlap

VLLM_OMNI_NEURON_LTX2_AUDIO_SPLIT_MIN_LEN

20000

A vocoder level with fewer samples keeps its chains on the audio rank. The validation runs used this default. Keep a value of 20000 or more

An anti-aliased vocoder activation has three steps: a 2x upsample, the SnakeBeta function and a 2x low-pass. With VLLM_OMNI_NEURON_LTX2_AUDIO_POLYPHASE=1, the upsample skips the products of the inserted zeros, and the low-pass computes only the samples that it keeps. The fp32 products and sums stay in the same order. Only the act-only stages change (the last BWE level at 121 frames). All other stage graphs stay the same. split runs each resblock as act-only and conv-only stages, with each activation in polyphase form. It compiles about 250 more stages. If the parallel stage compile fails in mode 1 or split, all ranks change to mode 0 and compile again.

Select helper ranks that decode no video tile. The video decode leaves the helper ranks out when the tile size and the number of tile rounds stay the same. A helper rank that still has a tile in a request runs no chain in that request, and the audio rank runs its chains. On Trn2 at 64 ranks, the video decode skips rank 0 and ranks 32-47. Thus the 45 tiles of 1920x1088 use ranks 1-31 and 48-61. Rank 62 has no tile and the same DiT state as the audio rank 63, which loads the NEFFs of all audio stages. A helper rank loads the NEFFs of its chain stages (36 at 1920x1088), and these NEFFs stay loaded. Ranks 32-47 also have no tile, but the video decoder does not fit next to their DiT. No run measured their device memory with these NEFFs. Thus a rank in 32-47, for example 62,47, is an opt-in value.

If a helper rank cannot run a chain, the audio rank runs it and gives that helper no chain again. If an exchange with a helper rank fails, the audio rank runs the chains of that helper. Then the two ranks send no message to each other again.

Other environment variables#

Variable

Default

Effect

VLLM_OMNI_NEURON_LTX2_VAE_FRAME_BANDS

256@40x40:2,512@40x40:4,512@32x32:4,tail@80x80:2

The video decoder pieces that run as frame bands, as key:bands pairs. The key is <channels>@<H>x<W> for a residual block or tail@<H>x<W> for the decoder tail, with the input size of the piece. "" gives none

VLLM_OMNI_NEURON_LTX2_VAE_SKIP_RANKS

0,32-47 on Trn2 at 64 ranks, else none

The ranks that decode no video tile. "" gives none

VLLM_OMNI_NEURON_LTX2_ZERO_COPY_OUTPUT

1

The uint8 video goes from the worker to the engine in its shared-memory segment, with no copy. The engine keeps the segment while the caller holds the output array

VLLM_OMNI_NEURON_LTX2_RELEASE_FUSED_WEIGHTS

1 on Trn2 and for the two-stage pipeline, else 0

Free the attention weights that the fused kernels replace

VLLM_OMNI_NEURON_LTX2_ENCODE_ON_EVERY_RANK

0

With the host text encoder, load Gemma and encode the prompt on each rank

VLLM_OMNI_NEURON_LTX2_AUDIO_PARALLEL_COMPILE

1

Compile the audio decode stages on all ranks

VLLM_OMNI_NEURON_LTX2_AUDIO_OVERLAP

1

Decode the audio on the last rank during the video decode

VLLM_OMNI_NEURON_LTX2_PROMPT_CACHE

1

Use the prompt contexts of the previous request again for the same prompts and encode settings (see Prompt cache)

VLLM_OMNI_NEURON_LTX2_GEMMA_FP32

0

Run Gemma with fp32 weights. On Trn2 they do not fit next to the DiT

VLLM_OMNI_NEURON_LTX2_PROFILE_DIR

unset

Capture a runtime profile of DiT calls. VLLM_OMNI_NEURON_LTX2_PROFILE_FROM_CALL (6), VLLM_OMNI_NEURON_LTX2_PROFILE_NUM_CALLS (2) and VLLM_OMNI_NEURON_LTX2_PROFILE_RANKS (all ranks) select the calls

VLLM_OMNI_NEURON_LTX2_TIME_DIT_STEPS

0

Log the time of each step phase. The waits make each step slower

Collectives#

The runtime cannot load a NEFF that has collectives without NEURON_RT_ROOT_COMM_ID. The worker gets one shared value from rank 0 (rendezvous_ccom_bootstrap of vllm-neuron). To pin the address, set NEURON_RT_ROOT_COMM_ID (for example localhost:61239).

Default guidance#

A request that does not set guidance gets the reference values. The CFG scale is 3.0 for the video and 7.0 for the audio. The video and the audio both use a rescale of 0.7, STG 1.0 at block 28 and modality guidance 3.0. These values come from the LTX-2.3 recipe of vLLM-Omni.

Accuracy Evaluation#

  1. Attention kernel: a test compares the NKI attention_cte kernel of the unfused attention path with float64 attention on the host. The test uses the video self-attention and audio-video cross-attention shapes of 17 and 121 frames. The error does not increase with the sequence length.

  2. Video self-attention megakernel: a test compares attention_ltx2 with an fp32 torch computation of the video self-attention. The test uses five parallel configurations, from TP4 alone up to TP4 x SP4 x GP4. The kernel needs TP4 for the 32 heads of LTX-2.3, because its QKV projection takes at most 4096 columns on a rank.

  3. Components: a test runs the pipeline with 2 DiT blocks on 64 ranks (TP4 x SP4 x GP4) at 768x512 and 17 frames. It compares the DiT, the text encoder, the tiled video decode and the windowed image encode with CPU references in fp32 and in bf16. assert_close_three_way of vLLM Neuron compares the error of the Neuron result with the error of the bf16 reference. The audio decode runs in fp32, so the test compares it with the fp32 reference only. The test also compares the tiled video decode and the windowed image encode on the CPU with one decode or encode of the full frame.

A comparison of the final frame against another implementation is not a quality measure. Two implementations can draw their initial noise through different random paths. Thus with one seed, they render different pictures. From the same initial noise, a small difference after one step increases in each later step. This increase is normal for a diffusion model.

To check correctness against another implementation, for example the reference, compare the per-step latents from the same initial noise:

  1. Save the initial noise of the other run in one directory with torch.save. Use init_v_lat.pt for the video and init_a_lat.pt for the audio. Each tensor must have the shape of the noise that this pipeline draws. The pipeline ignores a tensor with another shape.

  2. Set VLLM_OMNI_NEURON_LTX2_INIT_LATENTS_DIR to this directory.

  3. Set VLLM_OMNI_NEURON_LTX2_TRAJ_DUMP_DIR to a directory for the latent of each step.

VLLM_OMNI_NEURON_LTX2_INIT_LATENTS_DIR=NOISE_DIR VLLM_OMNI_NEURON_LTX2_TRAJ_DUMP_DIR=TRAJ_DIR \
    python examples/ltx2/run.py --model-path MODEL_DIR --gemma-root GEMMA_DIR

To check quality, look at the frames, or use a metric over many samples.

Known Limitations#

  • Use TP4. Each stage config in examples/ltx2/ uses TP4. The attention_ltx2 kernel projects at most 4096 QKV columns on a rank. At TP4, a rank has 3072 QKV columns (8 of the 32 heads). With SP, the gate adds 128 columns, for a total of 3200. With a smaller TP size, the video self-attention runs the slower module path. This limit is by design.

  • The two-stage pipeline keeps two DiTs on each rank. On Trn2, two bf16 DiTs do not fit in the device memory. Use Trn3 for the two-stage pipeline.

  • This plugin version supports only the pinned version.

  • On a cold compile cache, the first request also compiles the Neuron video decoder and the Neuron audio decode stages. This adds several minutes to the first request. Use --video-decoder host and --audio-decoder host to skip these compiles.

  • At some frame counts, a stage of the bandwidth extension does not compile, for example at 9 and 41 frames (NCC_EBIR026). The fallback to the zero-insert form fails in the same way, so the request stops. 17 and 121 frames compile. If the audio decode of a frame count does not compile, use --audio-decoder host.

  • In the compiled transformer, the NKI attention_cte kernel gives a wrong result for a K/V shorter than 128 tokens. The pipeline repeats such a K/V to 128 tokens before the kernel. This changes nothing in the result.

  • The Neuron video decode uses /dev/shm. The tile segments use about 3.3 GB at 1920x1088 and 121 frames, and they stay for the full run. Each output is one uint8 video in /dev/shm (about 0.76 GB). It stays there while the caller holds it, for example the result of the last request. A decode rank puts its tiles in shared memory only if /dev/shm keeps room for two more outputs and 512 MiB after all tile segments exist. Else the rank sends its tiles on gloo, and it logs a warning. At 1920x1088 and 121 frames, give /dev/shm at least 6.2 GB for the tiles in shared memory, plus the other users of /dev/shm. A caller that holds more than one output needs 0.76 GB more for each other output. If /dev/shm has no room for an output, the worker sends the output in the result message. This is slower, but the request does not fail.

  • A process that stops with SIGKILL cannot unlink its segments (omni_neuron_vae_* and omni_neuron_out_* in /dev/shm). Rank 0 of a later run removes them at its first decode. It removes only the segments of stopped processes in its PID namespace.

Tutorials#

  • examples/ltx2/run.py: a runnable example. It writes the mp4, with the audio track, and the wav:

    python examples/ltx2/run.py --model-path MODEL_DIR --gemma-root GEMMA_DIR
    

    MODEL_DIR is the model directory. GEMMA_DIR is the directory of the Gemma-3-12B text encoder and its tokenizer. See Introduction. Add --dev for a small and fast run. Add --image IMAGE for image-to-video.

This document is relevant for: Trn2, Trn3