{"record":{"id":"a847797e7a88af25","repo":"sgl-project/sglang","slug":"minimax-h3-model-variant-and-model-subfolder-s","errorCode":null,"errorMessage":"MiniMax H3 --model-variant and --model-subfolder select different weight partitions: variant={model_variant!r} maps to {semantic_subfolder!r}, model_subfolder={explicit_subfolder!r}","messagePattern":"MiniMax H3 --model-variant and --model-subfolder select different weight partitions: variant=(.+?) maps to (.+?), model_subfolder=(.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/sglang/multimodal_gen/runtime/pipelines/minimax_h3_pipeline.py","lineNumber":96,"sourceCode":"        }\n        try:\n            return subfolders[normalized]\n        except KeyError as exc:\n            raise ValueError(\n                f\"unsupported MiniMax H3 model variant {variant!r}; \"\n                f\"supported: {sorted(subfolders)!r}\"\n            ) from exc\n\n    def _load_config(self):\n        model_variant = self.server_args.model_variant\n        if model_variant is not None:\n            semantic_subfolder = self.model_subfolder_for_variant(model_variant)\n            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","sourceCodeStart":78,"sourceCodeEnd":114,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/multimodal_gen/runtime/pipelines/minimax_h3_pipeline.py#L78-L114","documentation":"Raised by MiniMaxH3Pipeline._load_config when --model-variant and --model-subfolder are both given but resolve to different weight partitions (variant normalized and mapped, then compared case-insensitively against the explicit subfolder). The pipeline refuses ambiguous partition selection instead of silently picking one.","triggerScenarios":"Launching with --model-variant ref2va --model-subfolder FL2VA; any combination where the semantic variant maps to a subfolder different from the explicitly provided one, including case/space variants (those are normalized, so only genuine mismatches raise).","commonSituations":"Config templates that set both flags with defaults from different examples; upgrading configs where an old subfolder name lingers next to a newly added variant flag.","solutions":["Make the two flags agree: either drop --model-subfolder (the variant fills it automatically) or set --model-subfolder to the subfolder the variant maps to (fl2va->FL2VA, ref2va->Ref2VA)","Audit your launch config for leftover default values of either flag"],"exampleFix":"# before\n--model-variant ref2va --model-subfolder FL2VA\n\n# after\n--model-variant ref2va            # subfolder auto-set to Ref2VA\n# or\n--model-variant ref2va --model-subfolder Ref2VA","handlingStrategy":"validation","validationCode":"if server_args.model_variant and server_args.model_subfolder:\n    mapped = MiniMaxH3Pipeline.model_subfolder_for_variant(server_args.model_variant)\n    assert server_args.model_subfolder.strip().lower() == mapped.lower(), 'flags disagree'","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Set only one of --model-variant / --model-subfolder unless certain","Add a startup consistency check when both are present"],"tags":["minimax-h3","model-variant","model-subfolder","conflicting-config","sglang"],"backgroundTag":"conflicting-config-values","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}