sgl-project/sglang · error · ValueError
MiniMax H3 AdaLN cache is only compatible with unquantized…
Error message
MiniMax H3 AdaLN cache is only compatible with unquantized weights
What it means
The MiniMax H3 AdaLN cache (precomputed AdaLN conditioning tables loaded from adaln_cache_path or adaln_weight_files) is only valid for unquantized weights. Passing both a quantization config (quant_config) and an AdaLN cache is rejected because quantized kernels would consume the cached fp32 conditioning inconsistently.
Solutions
- Drop the AdaLN cache args and let AdaLN compute on the fly with the quantized checkpoint
- Or use the unquantized checkpoint (quant_config=None) if you need the AdaLN cache's startup/time savings
- Regenerate workflows: keep cache and quantization mutually exclusive in launch scripts
Example fix
# before model = MiniMaxH3DiT(..., adaln_cache_path=cache, quant_config=fp8_cfg) # after model = MiniMaxH3DiT(..., quant_config=fp8_cfg) # no adaln cache
Defensive patterns
Strategy: validation
Validate before calling
if quant_config is not None:
adaln_cache_path = None
adaln_weight_files = None Type guard
def cache_quant_compatible(cache: Optional[str], qc) -> bool:
return cache is None or qc is None Prevention
- Make launch scripts treat AdaLN cache and --quantization as mutually exclusive
- Regenerate caches per checkpoint variant
When it happens
Trigger: Constructing the model with adaln_cache_path (or adaln_weight_files) set while also passing a non-None quant_config (e.g. fp8/int8 quantized checkpoint).
Common situations: Reusing an AdaLN cache generated for the bf16 checkpoint after switching the server to a quantized model; enabling --quantization together with --adaln-cache flags.
Related errors
- Checkpoint quantization is encoded in per-layer metadata…
- MiniMax H3 pruned curve checkpoints cannot use a separate…
- A GGUF encoder checkpoint cannot be combined with a second…
- A quantized checkpoint requires an in-tree native encoder…
- AutoRound fused module
AI-assisted analysis of sgl-project/sglang@0132848349 (2026-08-28).
Data as JSON: /api/errors/e75a12d2a1e3224d.
Report an issue: GitHub.
Appendix: source
Thrown at python/sglang/multimodal_gen/runtime/models/dits/minimax_h3.py:1879
"the packed sequence alignment."
)
def __init__(
self,
config: MiniMaxH3DiTConfig,
hf_config: dict[str, Any],
quant_config: QuantizationConfig | None = None,
adaln_cache_path: str | None = None,
adaln_cache_model_variant: str | None = None,
adaln_weight_files: list[str] | None = None,
adaln_plan_width: int = MINIMAX_H3_ADALN_MAX_PLAN_WIDTH,
) -> None:
super().__init__(config=config, hf_config=hf_config)
arch = self.config
if (
adaln_cache_path is not None or adaln_weight_files is not None
) and quant_config is not None:
raise ValueError(
"MiniMax H3 AdaLN cache is only compatible with unquantized weights"
)
if arch.adaln_curve_grid is not None and (
adaln_cache_path is not None or adaln_weight_files is not None
):
raise ValueError(
"MiniMax H3 pruned curve checkpoints cannot use a separate "
"AdaLN cache"
)
self._adaln_precomputed = (
adaln_cache_path is not None or adaln_weight_files is not None
)
self.arch = arch
if arch.checkpoint_uses_diffusers_layout:
self.preprocess_loaded_state_dict = _diffusers_h3_checkpoint
self.hidden_size = arch.hidden_size
self.num_attention_heads = arch.num_attention_heads
self.num_channels_latents = arch.latents_dimView on GitHub (pinned to 0132848349)