{"record":{"id":"02bf52355d576de4","repo":"sgl-project/sglang","slug":"minimax-h3-loaded-checkpoint-partition-does-not-ma","errorCode":null,"errorMessage":"MiniMax H3 loaded checkpoint partition does not match --model-variant {model_variant!r}","messagePattern":"MiniMax H3 loaded checkpoint partition does not match --model-variant (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/sglang/multimodal_gen/runtime/pipelines/minimax_h3_pipeline.py","lineNumber":109,"sourceCode":"            explicit_subfolder = self.server_args.model_subfolder\n            if (\n                explicit_subfolder is not None\n                and explicit_subfolder.strip().lower() != semantic_subfolder.lower()\n            ):\n                raise ValueError(\n                    \"MiniMax H3 --model-variant and --model-subfolder select \"\n                    f\"different weight partitions: variant={model_variant!r} maps to \"\n                    f\"{semantic_subfolder!r}, model_subfolder=\"\n                    f\"{explicit_subfolder!r}\"\n                )\n            self.server_args.model_subfolder = semantic_subfolder\n        model_index = super()._load_config()\n        self.release_metadata = MiniMaxH3ReleaseMetadata.from_model_index(model_index)\n        if (\n            model_variant is not None\n            and self.release_metadata.partition != model_variant.strip().lower()\n        ):\n            raise ValueError(\n                \"MiniMax H3 loaded checkpoint partition does not match \"\n                f\"--model-variant {model_variant!r}\"\n            )\n        return model_index\n\n    def validate_disagg_role(self, role: RoleType) -> None:\n        if role != RoleType.MONOLITHIC:\n            raise ValueError(\n                \"MiniMaxH3Pipeline only supports monolithic deployment; \"\n                f\"disaggregation role {role.value!r} is not supported\"\n            )\n\n    def create_pipeline_stages(self, server_args: ServerArgs) -> None:\n        # Per-model sigma override from model_index.json; contract tests\n        # construct the pipeline without model_path, hence the guard.\n        release_metadata = getattr(self, \"release_metadata\", None)\n        sigma_shift_scales = (\n            release_metadata.sigma_shift_scales","sourceCodeStart":91,"sourceCodeEnd":127,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/multimodal_gen/runtime/pipelines/minimax_h3_pipeline.py#L91-L127","documentation":"Raised by MiniMaxH3Pipeline._load_config when the partition recorded in the checkpoint's model_index metadata (MiniMaxH3ReleaseMetadata.from_model_index) disagrees with the requested --model-variant. This is a post-load integrity check: it catches checkpoints whose actual weights partition differs from what the user asked for.","triggerScenarios":"--model-variant fl2va pointing at a Ref2VA-only checkpoint (or vice versa); a local directory whose contents were swapped/re-uploaded under the wrong name; a fine-tuned copy that inherited another partition's model_index.json.","commonSituations":"Renamed or re-sharded local model dirs; mixed-artifact directories assembled from multiple downloads; checkpoint repos hosting both partitions in one tree.","solutions":["Point --model-path at the checkpoint matching your variant, or change --model-variant to the partition the checkpoint actually contains (see its model_index metadata)","If the directory was assembled manually, restore the correct model_index.json/weights for the intended partition or re-download the official snapshot","Log MiniMaxH3ReleaseMetadata.from_model_index(model_index).partition during debugging to see the ground truth"],"exampleFix":"# before\n--model-path /models/minimax-h3-ref2va --model-variant fl2va\n\n# after\n--model-path /models/minimax-h3-ref2va --model-variant ref2va","handlingStrategy":"validation","validationCode":"from sglang.multimodal_gen.runtime.pipelines.minimax_h3_pipeline import MiniMaxH3ReleaseMetadata\nimport json, pathlib\nmi = json.loads(pathlib.Path(model_path, 'model_index.json').read_text())\npart = MiniMaxH3ReleaseMetadata.from_model_index(mi).partition\nif server_args.model_variant and part != server_args.model_variant.strip().lower():\n    raise SystemExit(f'checkpoint is {part!r}; fix --model-variant or --model-path')","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep one checkpoint per directory; avoid mixing partitions","Verify checkpoint metadata matches requested variant before deploying"],"tags":["minimax-h3","checkpoint-mismatch","model-variant","integrity-check","sglang"],"backgroundTag":"checkpoint-metadata-mismatch","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}