Skip to content

[None][feat] FLUX.1-dev NVFP4 Static Quant with per-tensor FP8 quantized MHA (sm103 CUTEDSL) - #18396

Merged
chang-l merged 1 commit into
NVIDIA:mainfrom
jhaotingc:perf/flux-nvfp4-fusions
Oct 21, 2026
Merged

chang-l merged 1 commit into
NVIDIA:mainfrom
jhaotingc:perf/flux-nvfp4-fusions

Conversation

@jhaotingc

@jhaotingc jhaotingc commented Aug 29, 2026 •

Copy link
Copy Markdown
Collaborator

Description

This PR improves FLUX.1-dev static-NVFP4 execution in TensorRT-LLM VisualGen on Blackwell:

  • Adds CuTeDSL to the default NVFP4 GEMM candidate set, so autotuning considers it alongside CUTLASS, cuBLASLt, and CUDA Core.
  • Shares compatible static-NVFP4 activation quantization between the single-stream MLP and QKV projections after checkpoint loading.
  • Enables CUTEDSL NVFP4 GEMM+GELU fusion for FLUX dual- and single-stream MLPs on SM100/SM103 when the NVFP4 input scale is statically calibrated. Dynamically quantized FLUX NVFP4 keeps the unfused path, which still runs GELU eagerly (compiler-disabled).
  • Leaves GELU fusion eligibility unchanged for every other model: their MLPs still fuse with any NVFP4 activation quantization, including dynamic quantization (for example, Wan and QwenImage).
  • Adds CUTEDSL attention support for statically calibrated, per-tensor E4M3 Q/K/V (qk_dtype: fp8, v_dtype: fp8, and Q/K/V block sizes 0) using ModelOpt checkpoint amax values.
  • Extends the fused DiT Q/K RMSNorm+RoPE CUDA op to directly emit scaled E4M3 Q/K/V, removing the three standalone attention-quantization launches.

The changes are API-compatible. Expanding the default NVFP4 candidate set may increase first-launch compilation/autotuning time.

Performance

FLUX.1-dev on NVIDIA GB300, TP1/Ulysses1/CFG1 with CUDA graphs. Each plot reports AIPerf concurrency-1 end-to-end mean latency divided by 96 inference steps.

FLUX.1-dev GB300 step latency at 1024×1024

FLUX.1-dev GB300 step latency at 2048×2048

The full static-NVFP4 + CUTEDSL FP8-MHA + all-block GELU-fusion configuration reduces step latency from 54.82 ms to 31.26 ms at 1024×1024 (43.0% lower, 1.75×) and from 278.63 ms to 163.46 ms at 2048×2048 (41.3% lower, 1.70×) versus BF16.

Optimization details

1. CUTEDSL NVFP4 GEMM+GELU fusion

Before: separate NVFP4 GEMM and GELU kernels After: GELU fused into the CUTEDSL GEMM
Nsight Systems view before NVFP4 GEMM and GELU fusion Nsight Systems view after NVFP4 GEMM and GELU fusion

The selected MLP span drops from 115.096 µs to 80.662 µs: 34.434 µs removed, or 1.43× faster. With shared activation quantization and automatic GELU fusion at both sites, full 512×512 step latency drops from 35 ms to 32 ms (3 ms / 8.6% lower).

BF16 NVFP4, no fusion NVFP4, single-stream fusion NVFP4, all-block fusion NVFP4 + FP8 MHA, single-stream fusion NVFP4 + FP8 MHA, all-block fusion
BF16 2048×2048 output NVFP4 2048×2048 output without MLP GELU fusion NVFP4 2048×2048 output with single-stream MLP GELU fusion NVFP4 2048×2048 output with all-block MLP GELU fusion NVFP4 CUTEDSL FP8 MHA 2048×2048 output with single-stream MLP GELU fusion NVFP4 CUTEDSL FP8 MHA 2048×2048 output with all-block MLP GELU fusion

Introducing the fusion does not show a large change in image quality for this case.

2. Per-tensor FP8 Q/K/V preprocessing fusion

Before: Q/K RMSNorm + RoPE followed by separate Q/K/V quantization After: one fused Q/K RMSNorm + RoPE + per-tensor E4M3 kernel
Nsight Systems view before fused per-tensor FP8 QKV preprocessing Nsight Systems view after fused per-tensor FP8 QKV preprocessing

The highlighted preprocessing span drops from 457.424 µs to 305.162 µs, removing 152.262 µs (1.50× / 33.3% lower) while directly producing statically scaled E4M3 Q/K/V tensors for attention.

3. FP8 attention backend selection and CUTEDSL FMHA deep dive

Same B300 replay and static per-tensor E4M3 Q/K/V values for all backends:

Backend NCU duration Relative to CUTEDSL CUDA-event mean
CUTEDSL 1.295 ms baseline 1.316 ms
TRTLLM-gen 1.474 ms +13.8% 1.477 ms
Fixed FA4 1.515 ms +17.0% 1.518 ms

CUTEDSL is fastest for the tested FLUX 2048 workload. IKET places score-to-P production on the critical path: the softmax warps remain active while MMA repeatedly waits for P.

IKET per-warp detail for the steady-state FMHA dependency window

NCU confirms that MUFU.EX2 is not throughput-saturated: XU active is 63.70%, there are only 0.8667 eligible warps/scheduler, 46.63% of cycles have no eligible warp, and the 518 static EX2 PCs show 0% math-pipe throttle (sampled stalls: 63.74% wait, 34.25% MIO, 1.50% dispatch). Combined with IKET, this identifies a softmax/score-to-P bound at the current pipeline roofline: FP8 MMA completes too quickly to hide the softmax warp's dependency chain.

We tried FMA/CVT/EX2 regrouping, row-sum distance and parallel-chain changes, and one-Q/two-CTA plus split-P protocols; none produced better reproducible pipelining.

Test Coverage

  • Added byte-exact parity coverage for the fused Q/K RMSNorm + RoPE + per-tensor E4M3 Q/K/V kernel against the existing unfused operator sequence.
  • Added CUTEDSL static-FP8 attention coverage for strided BF16 inputs, prequantized E4M3 inputs, BF16 output, finiteness, and reference consistency.
  • Added NVFP4 GEMM+GELU eligibility coverage for compiler-disabled GELU, supported architectures, and static versus dynamic quantization.
  • Confirmed on B200 that the existing dynamic-NVFP4 LPIPS goldens are unchanged: wan21-nvfp4, wan22-nvfp4, qwenimage-nvfp4, and flux1-nvfp4 all scored 0.000000.
  • Updated configuration coverage to verify that CuTeDSL participates in the default Blackwell NVFP4 GEMM candidate set while model-specific Marlin overrides remain unchanged.
  • Added two B200 L0 LPIPS cases using FLUX.1-dev-modelopt-NVFP4, a pinned CUTLASS NVFP4 GEMM backend, and new golden media. Revalidation after rebasing onto main scored 0.000000 for both static NVFP4 and static NVFP4 + CUTEDSL FP8 MHA, below the 0.05 threshold.
  • Ran an end-to-end FLUX.1-dev static-NVFP4 VisualGen smoke test with FA4 and CUDA graphs at 1024×1024; confirmed 38 fused single-stream MLP blocks and 38 shared-quantization single-stream blocks.
  • pre-commit run --all-files passed, including the full mypy check.

PR Checklist

  • The description explains the change and motivation.
  • New code paths have unit coverage.
  • All commits include DCO signoff.
  • No new dependency is introduced.
  • The change is API-compatible.

@jhaotingc
jhaotingc force-pushed the perf/flux-nvfp4-fusions branch 3 times, most recently from 34fda79 to 9d93203 Compare September 3, 2026 23:26
@jhaotingc jhaotingc changed the title Perf/flux nvfp4 fusions [None][feat] FLUX.1-dev NVFP4 Static Quant with per-tensor FP8 quantized MHA (sm103 CUTEDSL) Sep 3, 2026
@jhaotingc
jhaotingc marked this pull request as ready for review September 3, 2026 23:28
@jhaotingc
jhaotingc requested review from a team as code owners September 3, 2026 23:28
@coderabbitai

coderabbitai Bot commented Sep 3, 2026 •

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: b566d2c0-30a7-47c2-baec-987a67a99c26

📥 Commits

Reviewing files that changed from the base of the PR and between 8259c3d and 3e708db.

📒 Files selected for processing (1)
  • tests/integration/defs/examples/visual_gen/visual_gen_test_utils.py

Included review availability: Your plan provides up to 12 included reviews per hour; 11 remain after this review.

Walkthrough

Changes

The PR adds static FP8 Q/K/V attention quantization with fused CUDA normalization and RoPE, NVFP4 GEMM/GELU execution and configuration, CUDA graph warmup recapture, timing updates, and related unit and integration coverage.

Static FP8 attention

Layer / File(s) Summary
FP8 fused kernel and operator
cpp/tensorrt_llm/kernels/fusedDiTQKNormRopeKernel.*, cpp/tensorrt_llm/thop/fusedDiTQKNormRopeOp.cpp
Adds the E4M3 CUDA kernel, public launcher, PyTorch operator, validation, Meta implementation, and head-dimension dispatch.
Static FP8 attention integration
tensorrt_llm/_torch/visual_gen/models/flux/attention.py, tensorrt_llm/_torch/visual_gen/attention_backend/cute_dsl/fmha.py, tensorrt_llm/_torch/visual_gen/models/flux/transformer_flux.py, tensorrt_llm/visual_gen/args.py
Loads calibrated scales, invokes fused QK normalization and RoPE, preserves prequantized tensors, and passes static FP8 metadata to CuTeDSL attention.
FP8 validation and parity coverage
tests/unittest/_torch/visual_gen/kernels/parallel_hw_agnostic/test_fused_dit_qk_norm_rope_quant_fp8.py, tests/unittest/_torch/visual_gen/test_attention_cute_dsl.py
Checks fused-kernel parity, E4M3 outputs, prequantized inputs, and BF16 attention results.

NVFP4 VisualGen execution

Layer / File(s) Summary
NVFP4 fused MLP execution
tensorrt_llm/_torch/modules/mlp.py, tensorrt_llm/_torch/visual_gen/models/flux/transformer_flux.py
Adds shared NVFP4 GEMM/GELU execution, activation-aware eligibility, shared activation quantization, and fused block configuration.
NVFP4 configuration and pipeline wiring
tensorrt_llm/visual_gen/args.py, tensorrt_llm/_torch/visual_gen/config.py, tensorrt_llm/_torch/visual_gen/pipeline_registry.py
Propagates Nvfp4GemmConfig through VisualGen arguments, pipeline configuration, model configuration, and pipeline construction context.
Static NVFP4 accuracy coverage
tests/integration/defs/examples/visual_gen/test_visual_gen_flux.py, tests/integration/defs/examples/visual_gen/visual_gen_test_utils.py, tests/integration/defs/examples/visual_gen/golden/*, tests/integration/test_lists/test-db/l0_b200.yml, tests/unittest/_torch/thop/parallel/test_dense_gemm_act_fusion.py
Adds static NVFP4 accuracy cases, golden metadata, resolved-configuration checks, post-merge registrations, and compiler-disabled GELU eligibility tests.

Warmup and timing

Layer / File(s) Summary
Tune, merge, and recapture flow
tensorrt_llm/_torch/visual_gen/pipeline.py, tests/unittest/_torch/visual_gen/test_warmup.py
Makes autotuning run without graph capture and adds the second warmup pass when CUDA graphs are enabled.
Image operation timing
tensorrt_llm/serve/openai_server.py
Uses the global steady clock for image generation and image editing elapsed-time calculations.

Priority: ➖ Normal

Estimated code review effort: 5 (Critical) | ~120 minutes

Sequence Diagram(s)

sequenceDiagram
  participant FluxJointAttention
  participant fused_dit_qk_norm_rope_quant_fp8
  participant fusedDiTQKNormRopeQuantFp8Kernel
  participant CuTeDSLAttention
  FluxJointAttention->>fused_dit_qk_norm_rope_quant_fp8: submit packed QKV and static scales
  fused_dit_qk_norm_rope_quant_fp8->>fusedDiTQKNormRopeQuantFp8Kernel: apply Q/K norm, RoPE, and E4M3 conversion
  fusedDiTQKNormRopeQuantFp8Kernel-->>FluxJointAttention: return FP8 Q, K, and V
  FluxJointAttention->>CuTeDSLAttention: pass FP8 Q/K/V and scale metadata
  CuTeDSLAttention-->>FluxJointAttention: return BF16 attention output
Loading
Merge Risk: 🔵 Low · up to 3e708

This change adds optimized static FP8 attention and NVFP4 execution paths. The remaining risk is bounded to untested kernel/configuration combinations and fused activation-output behavior, which could affect output correctness for those paths.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 55.71% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 70 functions across 19 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Title check Passed The title clearly identifies the FLUX.1-dev static NVFP4 feature and per-tensor FP8 MHA optimization. It follows the required ticket and type format.
Description check Passed The description is comprehensive. It explains the motivation, implementation, performance impact, test coverage, API compatibility, and checklist status. Some template checklist items are not explicit…
Full details: Description check

Explanation

The description is comprehensive. It explains the motivation, implementation, performance impact, test coverage, API compatibility, and checklist status. Some template checklist items are not explicitly addressed, but the required information is mostly complete.

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
⚔️ Resolve merge conflicts 💡
  • Resolve merge conflict in branch perf/flux-nvfp4-fusions
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown

Automatically added "ci: full pre-merge approved" because this PR has satisfied the required GitHub review approvals. Unresolved review conversations and other required checks remain independent merge requirements.

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #78612 [ run ] completed with state SUCCESS. Commit: 0461c7c
/LLM/main/L0_MergeRequest_PR pipeline #64765 completed with status: 'UNSTABLE'

CI Report

⚠️ Multi-GPU Label Required:
Multi-GPU tests require the ci: full pre-merge approved label on this PR. Either:

  • Wait for the PR to be fully approved — the label is added automatically once approval is complete. Having unresolved open comments is fine, or
  • If needed, ask a member of NVIDIA/trt-llm-ci-approvers to add the label manually.
    Then re-trigger CI with the same bot command (no rebase needed).

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

Link to invocation

@yunruis yunruis left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jhaotingc

Copy link
Copy Markdown
Collaborator Author

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #78988 [ run ] triggered by Bot. Commit: 0461c7c Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #78988 [ run ] completed with state SUCCESS. Commit: 0461c7c
/LLM/main/L0_MergeRequest_PR pipeline #65073 completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

@jhaotingc

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #79029 [ run ] triggered by Bot. Commit: 0461c7c Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #79029 [ run ] completed with state SUCCESS. Commit: 0461c7c
/LLM/main/L0_MergeRequest_PR pipeline #65103 completed with status: 'SUCCESS'

CI Report

Link to invocation

@jhaotingc

Copy link
Copy Markdown
Collaborator Author

/bot run --stage-list "DGX_B200-PyTorch-Post-Merge-1,DGX_B200-PyTorch-Post-Merge-2"

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #79044 [ run ] triggered by Bot. Commit: 0461c7c Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #79044 [ run ] completed with state FAILURE. Commit: 0461c7c
/LLM/main/L0_MergeRequest_PR pipeline #65114 (Partly Tested) completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

@jhaotingc
jhaotingc force-pushed the perf/flux-nvfp4-fusions branch 3 times, most recently from 44cc5cc to 4eb207a Compare October 20, 2026 05:59
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Jhao-Ting Chen <[email protected]>
@jhaotingc
jhaotingc force-pushed the perf/flux-nvfp4-fusions branch from 4eb207a to 724397d Compare October 20, 2026 06:02
@jhaotingc

Copy link
Copy Markdown
Collaborator Author

/bot run --stage-list "DGX_B200-PyTorch-Post-Merge-1,DGX_B200-PyTorch-Post-Merge-2"

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #79169 [ run ] triggered by Bot. Commit: 724397d Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #79169 [ run ] completed with state FAILURE. Commit: 724397d
/LLM/main/L0_MergeRequest_PR pipeline #65213 (Partly Tested) completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

@jhaotingc

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #79249 [ run ] triggered by Bot. Commit: 724397d Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #79249 [ run ] completed with state SUCCESS. Commit: 724397d
/LLM/main/L0_MergeRequest_PR pipeline #65277 completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

@jhaotingc

Copy link
Copy Markdown
Collaborator Author

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #79444 [ run ] triggered by Bot. Commit: 724397d Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #79444 [ run ] completed with state SUCCESS. Commit: 724397d
/LLM/main/L0_MergeRequest_PR pipeline #65430 completed with status: 'SUCCESS'

CI Report

Link to invocation

@chang-l
chang-l merged commit 5d6fbb2 into NVIDIA:main Oct 21, 2026
@github-actions

Copy link
Copy Markdown

✅ LFS objects already in storage (1 file) — no sync needed.

These LFS-tracked files are already present in this repository's LFS storage:

  • tests/integration/defs/examples/visual_gen/golden/visual_gen_lpips/visual_gen_lpips_golden_media_flux.zip

Zhehao-Hu added a commit to NVIDIA/Model-Optimizer that referenced this pull request Oct 22, 2026
### What does this PR do?

Type of change: ? Bug fix

Exporting Qwen-Image FP8 with --quantize-mha leaves internal
{q,k,v}_bmm_quantizer._amax buffers in the HF checkpoint, including
buffers from disabled quantizers. TRT-LLM rejects these unexpected keys.

Hide attention quantizers during HF export by default, except for
FLUX.1, which retains enabled Q/K/V quantizers for compatibility with
the static FP8 attention path in
[NVIDIA/TensorRT-LLM#18396](NVIDIA/TensorRT-LLM#18396).
An explicit option overrides this default. Disabled attention quantizers
are always omitted, and quantizers are restored on the live model after
saving.

Infer KV-cache metadata only for Transformers components. Diffusion
components, including the native LTX-2 transformer, no longer emit
KV-cache quantization metadata.

### Usage

Default exports omit attention quantizer state for Qwen-Image and other
diffusion components, while FLUX.1 retains enabled Q/K/V quantizers
without an additional flag:

```python
export_hf_checkpoint(pipe, export_dir="./hf_ckpt")
```

Explicitly retain enabled Q/K/V quantizers for a compatible runtime:

```python
export_hf_checkpoint(
    pipe,
    export_dir="./hf_ckpt",
    export_attention_quantizers=True,
)
```
Set export_attention_quantizers=False to omit attention quantizers,
including for FLUX.1.

Equivalent diffusers CLI option:

```sh
--extra-param export_attention_quantizers=true
# Or explicitly omit them:
--extra-param export_attention_quantizers=false
```

### Testing

- 93 focused export and quantization-config tests passed.
- Regression cases run real FP8 calibration and sharded safetensors
export with tiny Qwen-Image and FLUX models. They verify clean Qwen
exports, FLUX’s default retention of enabled Q/K/V scales, explicit
overrides, omission of disabled buffers, and restoration of live
quantizers.
- Additional coverage verifies that the native diffusion save path used
by LTX-2 omits KV-cache metadata while a real Transformers model retains
it. This exercises the native export interface, not a full LTX-2 model.
- Regression tests reproduce the original buffer leak. The FLUX-default
and native-diffusion metadata checks also fail against the
implementation before the review fixes.
- Pre-commit checks passed.
- One optional ONNX example suite was skipped during earlier validation
because onnx_graphsurgeon was absent.
- Full B100/TRT-LLM generation and full LTX-2 deployment were not run;
the test host has no usable GPU.

### Before your PR is "*Ready for review*"

Make sure you read and follow [Contributor
guidelines](https://github.com/NVIDIA/Model-Optimizer/blob/main/CONTRIBUTING.md)
and your commits are signed (`git commit -s -S`).

Make sure you read and follow the [Security Best
Practices](https://github.com/NVIDIA/Model-Optimizer/blob/main/SECURITY.md#security-coding-practices-for-contributors)
(e.g. avoiding hardcoded `trust_remote_code=True`, `torch.load(...,
weights_only=False)`, `pickle`, etc.).

- Is this change backward compatible?: ❌ - Consumers of legacy attention
`_amax`
  keys must enable `export_attention_quantizers=True`.
- If you copied code from any other sources or added a new PIP
dependency, did you follow guidance in `CONTRIBUTING.md`: N/A
- Did you write any new necessary tests?: ✅
- Did you update
[Changelog](https://github.com/NVIDIA/Model-Optimizer/blob/main/CHANGELOG.rst)?:
✅
- Did you get Claude approval on this PR?: N/A  - Not yet run

### Additional Information
Fixes NVBug 6927340.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->

## Summary by CodeRabbit

- **Breaking Changes**
- Hugging Face diffusion exports omit attention quantizer data by
default.
- FLUX.1 exports retain enabled Q/K/V quantizer values for runtime
compatibility.
  - KV-cache metadata is excluded from native diffusion exports.

- **New Features**
- Added the `export_attention_quantizers` option to retain or omit
attention quantizers.
  - Disabled quantizers remain excluded regardless of this option.
  - Transformers exports continue to include KV-cache metadata.

- **Documentation**
  - Added guidance on attention quantizer and KV-cache export behavior.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Signed-off-by: Zhehao Hu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api-compatible Accepted LLM API contract change that is backwards-compatible ci: full pre-merge approved VisualGen

Projects

None yet

Development

Successfully merging this pull request may close these issues.