---
id: pr-sglang-20137
repo: sgl-project/sglang
pr: 20137
title: '[diffusion] Support nvfp4 for Flux.2'
author: ykcai-daniel
date: '2026-03-25'
url: https://github.com/sgl-project/sglang/pull/20137
source_category: upstream-code
architectures:
- sm100
tags:
- fp4
- kernel-fusion
- nvfp4
- pipeline-stages
- quantization
techniques:
- kernel-fusion
- pipeline-stages
hardware_features:
- fp4
- nvfp4
kernel_types:
- quantization
languages:
- cuda-cpp
- python
captured_at: '2026-04-27'
status: merged
merge_sha: 281fe10b5e6d1f395598bb9e58fcac9784acb77f
inclusion_reason: kernel file changes
changed_paths:
- python/sglang/multimodal_gen/configs/models/dits/flux.py
- python/sglang/multimodal_gen/docs/quantization.md
- python/sglang/multimodal_gen/envs.py
- python/sglang/multimodal_gen/registry.py
- python/sglang/multimodal_gen/runtime/layers/linear.py
- python/sglang/multimodal_gen/runtime/layers/quantization/__init__.py
- python/sglang/multimodal_gen/runtime/layers/quantization/modelopt_quant.py
- python/sglang/multimodal_gen/runtime/loader/component_loaders/transformer_loader.py
- python/sglang/multimodal_gen/runtime/loader/fsdp_load.py
- python/sglang/multimodal_gen/runtime/loader/utils.py
- python/sglang/multimodal_gen/runtime/models/dits/base.py
- python/sglang/multimodal_gen/runtime/models/dits/flux.py
- python/sglang/multimodal_gen/runtime/models/dits/flux_2.py
- python/sglang/multimodal_gen/runtime/pipelines/flux_2_nvfp4.py
- python/sglang/multimodal_gen/runtime/platforms/cuda.py
- python/sglang/multimodal_gen/runtime/platforms/interface.py
- python/sglang/multimodal_gen/runtime/utils/quantization_utils.py
- python/sglang/multimodal_gen/test/manual/test_diffusion_srt_fp4_linear.py
- python/sglang/multimodal_gen/test/server/testcase_configs.py
- python/sglang/multimodal_gen/test/unit/test_server_args.py
head_ref_oid: 40e4bc1eeb34341f97c2b2d4efc1532736b12944
artifact_dir: evidence/pull-bundles/sglang/gh-20137
---
# [diffusion] Support nvfp4 for Flux.2

- Repository: `sgl-project/sglang`
- PR: [20137](https://github.com/sgl-project/sglang/pull/20137)
- Decision: `kernel file changes`
- Reason: kernel file changes

## Changed Paths

- `python/sglang/multimodal_gen/configs/models/dits/flux.py`
- `python/sglang/multimodal_gen/docs/quantization.md`
- `python/sglang/multimodal_gen/envs.py`
- `python/sglang/multimodal_gen/registry.py`
- `python/sglang/multimodal_gen/runtime/layers/linear.py`
- `python/sglang/multimodal_gen/runtime/layers/quantization/__init__.py`
- `python/sglang/multimodal_gen/runtime/layers/quantization/modelopt_quant.py`
- `python/sglang/multimodal_gen/runtime/loader/component_loaders/transformer_loader.py`
- `python/sglang/multimodal_gen/runtime/loader/fsdp_load.py`
- `python/sglang/multimodal_gen/runtime/loader/utils.py`
- `python/sglang/multimodal_gen/runtime/models/dits/base.py`
- `python/sglang/multimodal_gen/runtime/models/dits/flux.py`
- `python/sglang/multimodal_gen/runtime/models/dits/flux_2.py`
- `python/sglang/multimodal_gen/runtime/pipelines/flux_2_nvfp4.py`
- `python/sglang/multimodal_gen/runtime/platforms/cuda.py`
- `python/sglang/multimodal_gen/runtime/platforms/interface.py`
- `python/sglang/multimodal_gen/runtime/utils/quantization_utils.py`
- `python/sglang/multimodal_gen/test/manual/test_diffusion_srt_fp4_linear.py`
- `python/sglang/multimodal_gen/test/server/testcase_configs.py`
- `python/sglang/multimodal_gen/test/unit/test_server_args.py`

## Evidence Bundle

`evidence/pull-bundles/sglang/gh-20137`
