{"record":{"id":"7ec20d463ac1da07","repo":"sgl-project/sglang","slug":"minimax-h3-pruned-curve-checkpoints-cannot-use-a-s-7ec20d","errorCode":null,"errorMessage":"MiniMax H3 pruned curve checkpoints cannot use a separate AdaLN cache","messagePattern":"MiniMax H3 pruned curve checkpoints cannot use a separate AdaLN cache","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/sglang/multimodal_gen/runtime/models/dits/minimax_h3.py","lineNumber":1885,"sourceCode":"        hf_config: dict[str, Any],\n        quant_config: QuantizationConfig | None = None,\n        adaln_cache_path: str | None = None,\n        adaln_cache_model_variant: str | None = None,\n        adaln_weight_files: list[str] | None = None,\n        adaln_plan_width: int = MINIMAX_H3_ADALN_MAX_PLAN_WIDTH,\n    ) -> None:\n        super().__init__(config=config, hf_config=hf_config)\n        arch = self.config\n        if (\n            adaln_cache_path is not None or adaln_weight_files is not None\n        ) and quant_config is not None:\n            raise ValueError(\n                \"MiniMax H3 AdaLN cache is only compatible with unquantized weights\"\n            )\n        if arch.adaln_curve_grid is not None and (\n            adaln_cache_path is not None or adaln_weight_files is not None\n        ):\n            raise ValueError(\n                \"MiniMax H3 pruned curve checkpoints cannot use a separate \"\n                \"AdaLN cache\"\n            )\n        self._adaln_precomputed = (\n            adaln_cache_path is not None or adaln_weight_files is not None\n        )\n        self.arch = arch\n        if arch.checkpoint_uses_diffusers_layout:\n            self.preprocess_loaded_state_dict = _diffusers_h3_checkpoint\n        self.hidden_size = arch.hidden_size\n        self.num_attention_heads = arch.num_attention_heads\n        self.num_channels_latents = arch.latents_dim\n        tp_size = get_tp_world_size()\n        ulysses_size, _ = get_ulysses_ctx()\n        self._validate_tp_config(arch=arch, tp_size=tp_size)\n        self._validate_sequence_parallel_config(\n            arch=arch,\n            tp_size=tp_size,","sourceCodeStart":1867,"sourceCodeEnd":1903,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/multimodal_gen/runtime/models/dits/minimax_h3.py#L1867-L1903","documentation":"Checkpoints with pruned AdaLN curves (arch.adaln_curve_grid is not None) already encode compact curve-based AdaLN parameters, so they cannot also use a separately precomputed AdaLN cache. Supplying both is contradictory and rejected at construction.","triggerScenarios":"Loading a pruned-curve checkpoint (adaln_curve_grid set in the arch config) while passing adaln_cache_path or adaln_weight_files.","commonSituations":"Copy-pasting the adaln-cache launch flags from a dense-checkpoint deployment onto a new pruned-curve checkpoint; mixing cached AdaLN artifacts from a different model variant.","solutions":["Remove adaln_cache_path/adaln_weight_files from the launch for pruned-curve checkpoints","If you actually want the cache path, use the non-pruned (dense AdaLN) checkpoint with adaln_curve_grid=None","Check arch.adaln_curve_grid in the loaded config to confirm which checkpoint variant you have"],"exampleFix":"# before\nMiniMaxH3DiT(arch_with_curve_grid, adaln_cache_path=\"...\")\n# after\nMiniMaxH3DiT(arch_with_curve_grid)  # curves only, no cache","handlingStrategy":"validation","validationCode":"if arch.adaln_curve_grid is not None:\n    adaln_cache_path = None\n    adaln_weight_files = None","typeGuard":"def curve_cache_ok(arch, cache) -> bool:\n    return cache is None or arch.adaln_curve_grid is None","tryCatchPattern":null,"preventionTips":["Check arch.adaln_curve_grid to identify pruned checkpoints","Keep per-checkpoint launch flag profiles, don't copy-paste"],"tags":["adaln","checkpoint","config-conflict","minimax-h3"],"backgroundTag":"incompatible-checkpoint-config","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}