Repository navigation
perf(diffusion): decode Wan VAE in BF16 - #32697
Merged
Merged
Conversation
BBuf
requested review from
AgainstEntropy,
HaiShaw,
mickqian,
ping1jing2 and
yichiche
as code owners
July 28, 2026 23:58
Contributor
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
saturn-acc
pushed a commit
to saturn-acc/sglang
that referenced
this pull request
Aug 16, 2026
Atituiset
pushed a commit
to Atituiset/sglang
that referenced
this pull request
Sep 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
/modelsUsers can explicitly select
--vae-decode-precision {fp32,fp16,bf16}for any supported pipeline.Why
Wan's VAE decoder is substantially faster in BF16 on H100, but lowering the global VAE precision also changes encode behavior. A decode-only override captures the optimization boundary used by FastVideo without changing image-to-video input encoding.
Wan2.2 keeps its existing FP32 default because B200 ModelOpt NVFP4 consistency is sensitive to the decode policy. LongLive2 explicitly retains BF16 because its existing VAE policy is BF16.
Upstream reference: hao-ai-lab/FastVideo#1472
Precision Defaults
H100 Benchmark
Native SGLang with Torch SDPA,
Wan-AI/Wan2.1-T2V-1.3B-Diffusers,832x480, 17 frames, one denoise step, seed 42. Decode latency is the median of five runs.Quality
Additional H100 tests cover the Wan2.1, Wan2.2, and LongLive2 precision defaults.
NVIDIA Diffusion CI
CI States
Latest PR Test (Base): ✅ Run #30414407575
Latest PR Test (Extra): ✅ Run #30414407480