Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/source/models/supported-models.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ For full documentation, see the [Visual Generation](./visual-generation.md) page
| `Wan-AI/Wan2.2-I2V-A14B-Diffusers` | Image-to-Video |
| `Wan-AI/Wan2.2-TI2V-5B-Diffusers` | Text-to-Video, Image-to-Video |
| `Lightricks/LTX-2` | Text-to-Video (with Audio), Image-to-Video (with Audio) |
| `Lightricks/LTX-2.3` | Text-to-Video (with Audio), Video Retake (with Audio) |
| `MiniMaxAI/MiniMax-H3` | Text-to-Video (with Audio), First/Last-Frame-to-Video (with Audio) |
| `Qwen/Qwen-Image` | Text-to-Image |
| `Qwen/Qwen-Image-2512` | Text-to-Image |
Expand All @@ -238,6 +239,7 @@ For full documentation, see the [Visual Generation](./visual-generation.md) page
| **Wan 2.1** | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
| **Wan 2.2** | Yes | Yes | No | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
| **LTX-2** | Yes | Yes | No | Yes | Yes | No | No | Yes | Yes | Yes | Yes | No |
| **LTX-2.3** | Yes | Yes | No | No | Yes | Yes | Yes | Yes | Yes | No | No | No |
| **MiniMax-H3** | Yes | Yes | No | No | Yes | Yes | No | Yes | Yes | No | No | No |
| **Qwen-Image** | Yes | Yes | Yes | Yes | Yes | No | Yes | Yes | Yes | Yes | Yes | No |
| **Qwen-Image-Layered** | Yes | No | No | No | No | No | Yes | Yes | Yes | No | No | No |
Expand Down
4 changes: 3 additions & 1 deletion docs/source/models/visual-generation.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ TensorRT-LLM **VisualGen** provides a unified inference stack for diffusion mode
| `Wan-AI/Wan2.2-TI2V-5B-Diffusers` | Text-to-Video, Image-to-Video |
| `FastVideo/FastWan2.2-TI2V-5B-FullAttn-Diffusers` | Text-to-Video (3-step distilled) |
| `Lightricks/LTX-2` | Text-to-Video (with Audio), Image-to-Video (with Audio) |
| `Lightricks/LTX-2.3` | Text-to-Video (with Audio), Video Retake (with Audio) |
| `Qwen/Qwen-Image` | Text-to-Image |
| `Qwen/Qwen-Image-2512` | Text-to-Image |
| `Qwen/Qwen-Image-Layered` | Image-to-Image |
Expand Down Expand Up @@ -65,6 +66,7 @@ Models are auto-detected from the checkpoint directory. Diffusers-format models
| **Wan 2.2** | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
| **FastWan 2.2** | Yes | Yes | No | No | No | No | No | No | Yes | Yes | Yes | No | No | No | No |
| **LTX-2** | Yes | Yes | Yes | Yes | No | Yes | Yes | No | No | Yes | Yes | Yes | Yes | No | Yes |
| **LTX-2.3** | Yes | Yes | No | No | No | No | Yes | Yes | Yes | Yes | Yes | No | No | No | No |
| **MiniMax-H3** | Yes | Yes | No | No | No | No | Yes | Yes | No | Yes | Yes | No | No | No | No |
| **Qwen-Image** | Yes | Yes | Yes | Yes | No | Yes | Yes | No | Yes | Yes | Yes | Yes | Yes | No | No |
| **Qwen-Image-Layered** | No | No | No | No | No | No | No | No | Yes | Yes | Yes | No | No | No | No |
Expand Down Expand Up @@ -392,7 +394,7 @@ Configured under `VisualGenArgs.parallel_config`. Modes can be combined:
- **CFG Parallelism** (`cfg_size: 2`): Splits positive/negative guidance prompts across GPUs. FLUX uses embedded guidance without a separate negative prompt path; CFG parallelism is not applicable to FLUX or the distilled FastWan 2.2 model.
- **Ulysses Parallelism** (`ulysses_size: N`): Splits the sequence dimension across GPUs for longer sequences.
- **Async Ulysses A2A pipeline** (`async_ulysses: true` in `parallel_config`): Overlaps per-rank V/Q/K projection compute with the cross-rank all-to-all on a dedicated side stream. Requires `ulysses_size > 1` and an NVLink-connected GPU domain (uses PyTorch `_SymmetricMemory` with CUDA IPC for peer pushes; not currently supported across nodes without MNNVL). Currently wired for WAN and LTX-2 self-attention.
- **Parallel VAE** (`parallel_vae_size: N`): Parallelizes the final VAE decode (constraint: `parallel_vae_size ≤ world_size`). WAN/Cosmos3 shard along a spatial axis; LTX-2 and MiniMax-H3 distribute independent tiles.
- **Parallel VAE** (`parallel_vae_size: N`): Parallelizes the final VAE decode (constraint: `parallel_vae_size ≤ world_size`). WAN/Cosmos3 shard along a spatial axis; LTX-2, LTX-2.3, and MiniMax-H3 distribute independent tiles.
- **Context Parallel (CP)** — Partitions the sequence into shards so that each rank computes partial attention. Requires an LSE-capable attention backend (`FA4` or `CUTEDSL`). CP can be composed with Ulysses, giving a total sequence-parallel (SP) degree = `cp_size · ulysses_size`. The CP degree depends on the implementation below:
- **Attention2D** (`attn2d_size: [N, M]`): Shards the sequence axis across an `N × M` device mesh (CP degree = `N · M`; total SP degree = `N · M · ulysses_size`).
- **Ring Attention** (`ring_size: N`): Shards the sequence axis across a 1D ring of `N` ranks, streaming K/V blocks (CP degree = `N`; total SP degree = `N · ulysses_size`; mutually exclusive with Attention2D).
Expand Down
7 changes: 7 additions & 0 deletions examples/visual_gen/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,20 @@ for feature details.

```bash
python quickstart_example.py
python models/ltx23.py
python models/glm_image.py

# With engine config (quant, parallelism, etc.)
# Omit --visual_gen_args and its YAML path to use default settings.
python models/wan_t2v.py --visual_gen_args configs/wan2.2-t2v-fp4-1gpu.yaml
python models/wan_i2v.py --visual_gen_args configs/wan2.2-i2v-fp4-1gpu.yaml --image /path/to/image.png
python models/ltx2.py --visual_gen_args configs/ltx2-1gpu.yaml
python models/ltx23.py --visual_gen_args configs/ltx23-t2v-bf16-1gpu.yaml
python models/ltx23.py --visual_gen_args configs/ltx23-t2v-fp8-1gpu.yaml
python models/ltx23.py --visual_gen_args configs/ltx23-t2v-fp4-1gpu.yaml
python models/ltx23_retake.py --visual_gen_args configs/ltx23-retake-bf16-1gpu.yaml --source /path/to/retake_input.mp4
python models/ltx23_retake.py --visual_gen_args configs/ltx23-retake-fp8-1gpu.yaml --source /path/to/retake_input.mp4
python models/ltx23_retake.py --visual_gen_args configs/ltx23-retake-fp4-1gpu.yaml --source /path/to/retake_input.mp4
# FP8 blockwise config: configs/minimax-h3-fp8-blockwise-1gpu.yaml.
# 8-GPU Ulysses config: configs/minimax-h3-bf16-8gpu.yaml.
python models/minimax_h3.py --model <approved-checkpoint> --visual_gen_args configs/minimax-h3-bf16-1gpu.yaml
Expand Down
27 changes: 27 additions & 0 deletions examples/visual_gen/configs/ltx23-retake-bf16-1gpu.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# 1-GPU BF16 LTX-2.3 retake.
pipeline_config:
workflow: retake
attention_config:
backend: VANILLA
parallel_config:
cfg_size: 1
ulysses_size: 1
torch_compile_config:
enable: true
cuda_graph_config:
enable: true
28 changes: 28 additions & 0 deletions examples/visual_gen/configs/ltx23-retake-bf16-2gpu.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# 2-GPU BF16 LTX-2.3 retake.
pipeline_config:
workflow: retake
attention_config:
backend: VANILLA
parallel_config:
cfg_size: 1
ulysses_size: 2
parallel_vae_size: 2
torch_compile_config:
enable: true
cuda_graph_config:
enable: true
32 changes: 32 additions & 0 deletions examples/visual_gen/configs/ltx23-retake-fp4-1gpu.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# 1-GPU LTX-2.3 retake with dynamic NVFP4 transformer quantization at every step
# and FlashInfer NVFP4 Q/K + FP8 V video self-attention on SM100/SM103 GPUs.
pipeline_config:
workflow: retake
quant_config:
quant_algo: NVFP4
dynamic: true
attention_config:
backend: FLASHINFER
quant_attention_config:
qk_dtype: nvfp4
v_dtype: fp8
parallel_config:
cfg_size: 1
ulysses_size: 1
cuda_graph_config:
enable: true
32 changes: 32 additions & 0 deletions examples/visual_gen/configs/ltx23-retake-fp8-1gpu.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# 1-GPU LTX-2.3 retake with dynamic FP8 block-scale transformer quantization
# and FlashInfer MXFP8 Q/K + FP8 V video self-attention on SM100/SM103 GPUs.
pipeline_config:
workflow: retake
quant_config:
quant_algo: FP8_BLOCK_SCALES
dynamic: true
attention_config:
backend: FLASHINFER
quant_attention_config:
qk_dtype: mxfp8
v_dtype: fp8
parallel_config:
cfg_size: 1
ulysses_size: 1
cuda_graph_config:
enable: true
25 changes: 25 additions & 0 deletions examples/visual_gen/configs/ltx23-t2v-bf16-1gpu.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# SPDX-FileCopyrightText: Copyright (c) 2022-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# 1-GPU LTX-2.3 text-to-video with audio, BF16.
attention_config:
backend: VANILLA
parallel_config:
cfg_size: 1
ulysses_size: 1
torch_compile_config:
enable: true
cuda_graph_config:
enable: true
26 changes: 26 additions & 0 deletions examples/visual_gen/configs/ltx23-t2v-bf16-2gpu.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# SPDX-FileCopyrightText: Copyright (c) 2022-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# 2-GPU LTX-2.3 text-to-video with audio, BF16.
attention_config:
backend: VANILLA
parallel_config:
cfg_size: 1
ulysses_size: 2
parallel_vae_size: 2
torch_compile_config:
enable: true
cuda_graph_config:
enable: true
32 changes: 32 additions & 0 deletions examples/visual_gen/configs/ltx23-t2v-fp4-1gpu.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# 1-GPU LTX-2.3 text-to-video with audio, dynamic NVFP4 transformer weights
# and FlashInfer NVFP4 Q/K + FP8 V video self-attention on SM100/SM103 GPUs.
quant_config:
quant_algo: NVFP4
dynamic: true
attention_config:
backend: FLASHINFER
quant_attention_config:
qk_dtype: nvfp4
v_dtype: fp8
parallel_config:
cfg_size: 1
ulysses_size: 1
torch_compile_config:
enable: true
cuda_graph_config:
enable: true
32 changes: 32 additions & 0 deletions examples/visual_gen/configs/ltx23-t2v-fp8-1gpu.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# SPDX-FileCopyrightText: Copyright (c) 2022-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# 1-GPU LTX-2.3 text-to-video with audio, dynamic FP8 transformer weights
# and FlashInfer MXFP8 Q/K + FP8 V video self-attention on SM100/SM103 GPUs.
quant_config:
quant_algo: FP8_BLOCK_SCALES
dynamic: true
attention_config:
backend: FLASHINFER
quant_attention_config:
qk_dtype: mxfp8
v_dtype: fp8
parallel_config:
cfg_size: 1
ulysses_size: 1
torch_compile_config:
enable: true
cuda_graph_config:
enable: true
Loading
Loading