Repository navigation
[Diffusion][HunyuanVideo] Fuse eager QKV packing and high-quality QKNorm - #34617
Merged
Merged
Conversation
BBuf
requested review from
AgainstEntropy,
HaiShaw,
mickqian,
ping1jing2,
yichiche and
yingluosanqian
as code owners
August 12, 2026 18:38
BBuf
force-pushed
the
bbuf/b300-hunyuan-eager-fusions
branch
from
August 12, 2026 18:59
8a127e2 to
204e74a
Compare
BBuf
force-pushed
the
bbuf/b300-hunyuan-eager-fusions
branch
from
August 13, 2026 09:39
204e74a to
7870ddb
Compare
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 was referenced Sep 20, 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
Reduce HunyuanVideo eager overhead with three scoped paths:
quality=highstrided QK RMSNorm path that avoids input contiguous copiesThe QKV/RoPE pack uses per-signature first-use bit-exact verification. The numerically relaxed RMSNorm and GELU paths are mounted only for
quality=high. The cleanup keeps mounting all-or-nothing when the public FlashInfer CuTe QK RMSNorm entry point is unavailable, so no partial quality configuration leaks into the model.B300 performance
HunyuanVideo, 848x480x65 frames, seed 42, 30 steps, native backend:
quality=higheagertorch.compilequality=highis 2.38% faster in denoise than the PR's lossless path. It remains 3.16% behind compile in denoise and 6.35% behind end to end; the table intentionally reports that remaining gap rather than implying parity.The first compile attempt hit the benchmark driver's 180-second warmup limit while compiling the VAE. A retry with the same generated cache and a 900-second limit completed successfully; compilation itself took about 11 minutes, while the displayed measurements exclude warmup.
Measured against main
dbebc1deb42b00befa3d0de67265d7003994c1ad. The B300 validation tree is identical to this PR's final Git tree.Output comparison
All videos use the same prompt, seed, resolution, frame count and step count.
Lossless path
The latest-main and PR lossless MP4 files are byte-identical (
0345e7c0ace3ed8adeebbf967a068c58a2e757f6be9b58a1672f77056164a67a).quality=highpathThe high-quality output versus the latest-main eager video measures PSNR 43.35 dB and SSIM 0.9851 over all 65 frames.
quality=higheagerClick either frame sheet to open the corresponding MP4.
Validation
4 passedCI States
Latest PR Test (Base): ❌ Run #31687604964
Latest PR Test (Extra): ✅ Run #31693045443