Skip to content

[diffusion] Compose third-party component bundles safely - #37816

Merged
mickqian merged 7 commits into
sgl-project:mainfrom
mickqian:codex/diffusion-day0-variants
Sep 4, 2026
Merged

mickqian merged 7 commits into
sgl-project:mainfrom
mickqian:codex/diffusion-day0-variants

Conversation

@mickqian

@mickqian mickqian commented Sep 3, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • complete exact requested files when a Hugging Face snapshot is only partially cached
  • keep LoRA dynamic when a runtime quantization method owns the base weight, including floating-point FP8 storage
  • accept explicitly selected MiniMax-H3 hybrid FL2VA/Ref2VA filenames
  • load native VAE weight overrides with folded weight norm and checkpoint-carried latent statistics in both regular and direct-GPU paths

These are the interoperability gaps found by exercising real third-party component bundles that combine a quantized DiT, replacement text encoder, nested LoRA, replacement VAEs, and hybrid H3 checkpoints. The adaptations stay at the generic cache, LoRA, and VAE boundaries; only the filename admission rule is H3-specific.

Validation

  • remote pre-commit: all hooks passed
  • focused unit tests: 11 passed, plus 2 subtests
  • 4x B200 standard sglang serve E2E: INT8 DiT + NVFP4-AWQ text encoder + auto-downloaded nested 4-step LoRA
  • 4x B200 compound E2E: the same stack plus third-party video/audio VAE overrides
  • 4x B200 Ref2VA E2E: hybrid FL2VA/Ref2VA INT8 checkpoint with video and audio conditioning
  • third-party folded audio-VAE state numerically checked against the official weight-normalized checkpoint (max abs error 2.38e-7)

CI States

Latest PR Test (Base): ✅ Run #33782169554
Latest PR Test (Extra): ✅ Run #33782169223
Latest PR Test (AMD ROCm 7.2): ⏳ Run #33782169476

@github-actions github-actions Bot added quant LLM Quantization lora diffusion SGLang Diffusion labels Sep 3, 2026
@mickqian mickqian added run-ci CI: run the baseline test suite on this PR run-ci-extra CI: also run the extra suite (requires run-ci) labels Sep 3, 2026
@mickqian
mickqian merged commit 795dd7a into sgl-project:main Sep 4, 2026
133 of 146 checks passed
StevenChenSE pushed a commit to StevenChenSE/sglang that referenced this pull request Sep 6, 2026
alex0dd added a commit to alex0dd/sglang that referenced this pull request Sep 28, 2026
Upstream sgl-project#37816 added BaseLayerWithLoRA.can_merge_base_weight, which
already routes quantized bases (non-float weights or any quantized
LinearBase method) to dynamic LoRA and refuses an explicit merge with
"use merge mode 'dynamic'". Drop the earlier dtype-based check in
LoRAPipeline._should_merge_lora_for_layers that pre-empted it with a
different message, and assert the upstream property in the INT8 LoRA
test instead.

The MiniMax-H3 Comfy INT8 inspection test builds a 2-wide serialized
layer; on a CI runner that has sgl-kernel but no comfy_kitchen the
backend selection refuses that width (the sgl-kernel epilogue needs a
multiple of 8), so patch the comfy_kitchen availability probe next to
the loader patch, as test_convrot_int8_backends.py already does.
BBuf added a commit to BBuf/sglang that referenced this pull request Oct 16, 2026
…e model first

AutoencoderDC builds its diffusers model lazily and treats
load_state_dict as "build with these weights". Since sgl-project#37816 the VAE
loader calls vae.state_dict() (weight-norm adoption, arch-metadata
checks) before loading, which builds the inner model from config with
random initialization; the following load_state_dict then returned
early and dropped every checkpoint tensor. SANA text-to-image decoded
with a randomly initialized DC-AE (noise images that also changed from
process to process). Load into the existing inner model instead.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

diffusion SGLang Diffusion lora quant LLM Quantization run-ci CI: run the baseline test suite on this PR run-ci-extra CI: also run the extra suite (requires run-ci)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant