Skip to content

[diffusion] feat: support loading mixed w4a8 text encoders - #36037

Merged
mickqian merged 6 commits into
mainfrom
codex/diffusion-kitchen-w4a8-encoder
Aug 24, 2026
Merged

mickqian merged 6 commits into
mainfrom
codex/diffusion-kitchen-w4a8-encoder

Conversation

@mickqian

@mickqian mickqian commented Aug 23, 2026

Copy link
Copy Markdown
Collaborator

Summary

Stacked on #36036.

  • support component checkpoints that combine W4A8 linears with a tensorwise INT8 embedding
  • let native Qwen3-VL opt into a checkpoint-owned quantized embedding without model-specific loader branching
  • shard the embedding with the encoder TP group and use Comfy Kitchen's selected-row dequantization op, avoiding full-table materialization
  • preserve marker-consumption checks so unsupported mixed layouts fail closed
  • document the flagless --component-paths.text_encoder flow

The concrete public checkpoint contract is Winnougan/MiniMax-H3-INT4_Convrot_ComfyUI/qwen3vl_32b_minimax_h3-w4a8_convrot.safetensors: 350 W4A8 linears plus one scalar-scale INT8 embedding. The unmarked vision tower remains BF16.

Validation

  • pre-commit run --all-files
  • added focused coverage for generic Qwen checkpoint-owned embedding construction and H3 marker mapping
  • inspected all 351 remote safetensors metadata entries and tensor shapes/dtypes; no contract mismatch

Local unit tests were not run; they are left to CI per the diffusion development workflow.

Size against #36036

  • existing production files: +151 / -29
  • new production files: 0
  • tests and docs: +106 / -3

CI States

Latest PR Test (Base): ✅ Run #32687180655
Latest PR Test (Extra): ❌ Run #32687180582
Latest PR Test (AMD ROCm 7.2): ⏳ Run #32687180615

@mickqian

Copy link
Copy Markdown
Collaborator Author

/tag-and-rerun-ci

@mickqian
mickqian force-pushed the codex/diffusion-kitchen-w4a8 branch from 230a2ed to b90c160 Compare August 24, 2026 01:40
Base automatically changed from codex/diffusion-kitchen-w4a8 to main August 24, 2026 02:32
@mickqian mickqian changed the title [Diffusion] Load mixed W4A8 text encoders [diffusion] feat: support loading mixed w4a8 text encoders Aug 24, 2026
# Conflicts:
#	docs/cookbook/diffusion/MiniMax/MiniMax-H3.mdx
#	docs/docs/sglang-diffusion/quantization.mdx
#	python/sglang/multimodal_gen/runtime/layers/quantization/configs/kitchen_w4a8_config.py
#	python/sglang/multimodal_gen/runtime/layers/quantization/kitchen_w4a8.py
#	python/sglang/multimodal_gen/runtime/loader/transformer_load_utils.py
#	python/sglang/multimodal_gen/runtime/utils/quantization_utils.py
@mintlify

mintlify Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
lmsysorg 🟢 Ready View Preview Aug 24, 2026, 2:42 AM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@mickqian
mickqian merged commit 8df3b9e into main Aug 24, 2026
127 of 141 checks passed
@mickqian
mickqian deleted the codex/diffusion-kitchen-w4a8-encoder branch August 24, 2026 05:31
longxin9715 added a commit to longxin9715/sglang that referenced this pull request Aug 24, 2026
…n-transport1

* 'main' of https://github.com/sgl-project/sglang: (326 commits)
  [diffusion] feat: cache LoRA-merged weights in files the page cache can hold (sgl-project#36062)
  [diffusion] Speed up LingBot high-quality VAE decode (sgl-project#36024)
  [diffusion] Honor XDG cache for model overlays (sgl-project#36019)
  Support streaming session on NPU (sgl-project#32597)
  fix(xpu): read enable_deterministic_inference from the config bag (sgl-project#36149)
  xeon ci fail fast strategy change (sgl-project#36146)
  [diffusion] Fix Hunyuan QKV pack indexing at production video shapes (sgl-project#36009)
  [diffusion] Refresh quality and BCG benchmark skills (sgl-project#36016)
  [MoE] Gather the cutlass MoE activation and its scales in one launch (sgl-project#34915)
  [diffusion] feat: add plain component weight overrides (sgl-project#36086)
  [diffusion] feat: support loading mixed w4a8 text encoders (sgl-project#36037)
  [diffusion] Default Hunyuan VAE to tiled decode (sgl-project#36012)
  fix(xpu): enable compressed-tensors FP8 W8A8 on XPU (RedHatAI FP8-dynamic models) (sgl-project#33057)
  chore: move cuda_vmm_utils.py under srt/utils/ (sgl-project#36053)
  [Intel XPU] Add xpu pass for biased_topk and hash_topk (sgl-project#33323)
  [CPU] Fix NUMA/core binding for DP ranks (sgl-project#32856)
  [Fix] Harden FlashAttention CUDA graph metadata bounds (sgl-project#35454)
  [XPU] Use a fused GDN kernel from sgl-kernel for Qwen3.5 (sgl-project#33354)
  [diffusion] Fuse LongCat-Image QKNorm and interleaved RoPE (sgl-project#35995)
  [diffusion] Keep LongLive2 components resident on large GPUs (sgl-project#35993)
  ...

# Conflicts:
#	python/sglang/srt/multimodal/processors/base_processor.py
#	python/sglang/srt/server_args.py
saturn-acc pushed a commit to saturn-acc/sglang that referenced this pull request Aug 31, 2026
jakki-amd pushed a commit to jakki-amd/sglang that referenced this pull request Sep 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

diffusion SGLang Diffusion documentation Improvements or additions to documentation quant LLM Quantization run-ci

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant