[Diffusion] Add Wan2.2 ModelOpt NVFP4 support#22681
Merged
mickqian merged 2 commits intocodex/flux1-modelopt-nvfp4-resubmitfrom Apr 13, 2026
Merged
[Diffusion] Add Wan2.2 ModelOpt NVFP4 support#22681mickqian merged 2 commits intocodex/flux1-modelopt-nvfp4-resubmitfrom
mickqian merged 2 commits intocodex/flux1-modelopt-nvfp4-resubmitfrom
Conversation
Collaborator
Author
|
/tag-and-rerun-ci |
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces support for Wan2.2-T2V-A14B-Diffusers quantization and improves the robustness of component loading. Key changes include documentation for dual-transformer FP4 exports, a new utility to filter unsupported scheduler initialization arguments, and logic to mask global quantization overrides for secondary transformer components. Additionally, the CUDA platform now supports an environment variable to prefer FlashInfer for FP4 GEMM operations. Unit tests were added to verify the new filtering and masking behaviors. I have no feedback to provide.
85863f4
into
codex/flux1-modelopt-nvfp4-resubmit
2 checks passed
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
#22672--transformer-weights-pathoverride scoped to the primarytransformersotransformer_2stays on the base BF16 checkpoint unless explicitly overriddenshift_terminalwhen the resolved SGLang scheduler class does not accept themSGLANG_DIFFUSION_FLASHINFER_FP4_GEMM_BACKENDin diffusion ModelOpt FP4 GEMM selection so Blackwell bring-up can force the validated FlashInfer pathValidation
Wan-AI/Wan2.2-T2V-A14B-Diffusers, with only the primarytransformerquantized andtransformer_2kept BF16--transformer-weights-pathoverride succeeded after forcingSGLANG_DIFFUSION_FLASHINFER_FP4_GEMM_BACKEND=cudnn55.89s, DenoisingStage53.51s25.72s, DenoisingStage23.46s-54.0%, DenoisingStage-56.2%17.87s, DenoisingStage16.20s22.64s, DenoisingStage20.96s+26.7%E2E,+29.4%denoise)Notes
#22672SGLANG_DIFFUSION_FLASHINFER_FP4_GEMM_BACKEND=cudnn