Skip to content

TeleFuser FP4 with LTX-Video-2B Support on Blackwell - #57

Merged
lzx1413 merged 11 commits into
Tele-AI:mainfrom
Uxito-Ada:pan2-nvfp4
Dec 2, 2026
Merged

lzx1413 merged 11 commits into
Tele-AI:mainfrom
Uxito-Ada:pan2-nvfp4

Conversation

@Uxito-Ada

@Uxito-Ada Uxito-Ada commented Nov 24, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Add LTXVideo2BPipeline(BasePipeline) and LTXVideo2BGenerationStage(BaseStage).
  • Implement TeleFuser FP4 in telefuser.ops with the repository tf-kernel Blackwell FP4 quantization and packed-weight ABI, plus a Blackwell-native scaled-MM fast path.
  • Quantize the 56 LTX DiT FFN projections with one supported quality profile; packed FP4 weights stay resident on GPU.
  • Reuse packed activation FP4 data when multiple projections consume the same hidden-state tensor, removing duplicate absmax and quantization work.
  • Add the SM100/SM120 C++20 build fix, example, English/Chinese docs, and unit tests.

Workload

Official Diffusers LTX prompt and negative prompt, 768x512, 161 frames, 24 FPS, 50 steps, seed 123, CFG 3.0, decode_timestep=0.03, decode_noise_scale=0.025. Hardware: RTX 5090 Laptop GPU, 24 GiB, SM120; PyTorch 2.14.0+cu132; CUDA 13.2. The repository tf-kernel wheel was built with ENABLE_NVFP4 and sm_120a.

RTX 5090 Results

LTX-Video 2B FP4 performance

TeleFuser FP4 is 19.3% faster than BF16 end to end (1.238x) and 2.1% faster than TorchAO FP4 on this run. The initial gap came from the older tf-kernel SM120 CUTLASS dispatch; the fixed path uses the Blackwell-native scaled-MM kernel with tf-kernel packed operands and retains tf-kernel as fallback. All paths remain far from realtime at 24 FPS.

FP4 Quality

LTX-Video 2B FP4 quality comparison

The comparison uses the aligned BF16 video as the full-reference baseline:

Both FP4 videos use exactly the same prompt, negative prompt, seed, sampler, geometry, frame count, and frame rate:

  • BF16:
ltx-native-tfkernel-bf16.mp4
  • Torchao FP4:
ltx_fp4_torchao.mp4
  • TeleFuser FP4:
ltx-nvfp4.2.mp4

Native FP4 Audit

TeleFuser FP4 does not dequantize weights to BF16 or FP32 before GEMM. Weights and activations are packed as NVFP4 plus E4M3 block scales by tf-kernel, then passed as native FP4 operands to Blackwell scaled-MM; the result is accumulated internally and written as BF16 for the remaining BF16 layers. The tf-kernel CUTLASS path remains the fallback for unsupported shapes or runtimes. TorchAO likewise dispatches native FP4 operands. There is no removable full-matrix FP4-to-BF16/FP32 dequant stage in either path.

Usage

from telefuser.pipelines.ltx_video_2b import LTXVideo2BPipeline

pipe = LTXVideo2BPipeline.from_pretrained(
    "/path/to/ltx-video-2b", quantization="nvfp4"
)
frames = pipe("A cinematic close-up of two women talking", seed=123)

Build tf-kernel with make build-sm100 PYTHON=/path/to/python; the build must report ENABLE FP4 OPERATORS. The complete CLI example is examples/ltx_video_2b/ltx_video_2b_t2v_nvfp4_5090.py.

Validation

  • TeleFuser FP4 GEMM smoke and the full official LTX workload completed on RTX 5090.
  • BF16, TorchAO FP4, and TeleFuser FP4 videos were compared with FFmpeg PSNR, SSIM, and VIF.
  • pytest: focused pipeline/operator/quality tests passed, including activation-quantization cache coverage.
  • Ruff and Markdown format checks passed.

@Uxito-Ada
Uxito-Ada marked this pull request as draft November 24, 2026 01:38
@Uxito-Ada Uxito-Ada changed the title [NVFP4] Benchmark LTX-Video 2B on Blackwell Optimize LTX-Video-2B with NVFP4 on Blackwell Nov 26, 2026
@Uxito-Ada
Uxito-Ada marked this pull request as ready for review November 26, 2026 02:19
@Uxito-Ada
Uxito-Ada requested a review from lzx1413 November 26, 2026 02:19
@Uxito-Ada Uxito-Ada changed the title Optimize LTX-Video-2B with NVFP4 on Blackwell Support LTX-Video-2B with NVFP4 on Blackwell Nov 26, 2026
@Uxito-Ada
Uxito-Ada marked this pull request as draft December 1, 2026 06:12
@Uxito-Ada Uxito-Ada changed the title Support LTX-Video-2B with NVFP4 on Blackwell TeleFuser FP4 with LTX-Video-2B Support on Blackwell Dec 2, 2026
@Uxito-Ada
Uxito-Ada marked this pull request as ready for review December 2, 2026 05:11
@lzx1413
lzx1413 merged commit 25993c7 into Tele-AI:main Dec 2, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants