sgl-project/sglang · error · ValueError
MiniMax H3 --model-variant and --model-subfolder select diff
Error message
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} What it means
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.
Source
Thrown at python/sglang/multimodal_gen/runtime/pipelines/minimax_h3_pipeline.py:96
}
try:
return subfolders[normalized]
except KeyError as exc:
raise ValueError(
f"unsupported MiniMax H3 model variant {variant!r}; "
f"supported: {sorted(subfolders)!r}"
) from exc
def _load_config(self):
model_variant = self.server_args.model_variant
if model_variant is not None:
semantic_subfolder = self.model_subfolder_for_variant(model_variant)
explicit_subfolder = self.server_args.model_subfolder
if (
explicit_subfolder is not None
and explicit_subfolder.strip().lower() != semantic_subfolder.lower()
):
raise ValueError(
"MiniMax H3 --model-variant and --model-subfolder select "
f"different weight partitions: variant={model_variant!r} maps to "
f"{semantic_subfolder!r}, model_subfolder="
f"{explicit_subfolder!r}"
)
self.server_args.model_subfolder = semantic_subfolder
model_index = super()._load_config()
self.release_metadata = MiniMaxH3ReleaseMetadata.from_model_index(model_index)
if (
model_variant is not None
and self.release_metadata.partition != model_variant.strip().lower()
):
raise ValueError(
"MiniMax H3 loaded checkpoint partition does not match "
f"--model-variant {model_variant!r}"
)
return model_index
View on GitHub (pinned to 0132848349)
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
Example fix
# before --model-variant ref2va --model-subfolder FL2VA # after --model-variant ref2va # subfolder auto-set to Ref2VA # or --model-variant ref2va --model-subfolder Ref2VA
Defensive patterns
Strategy: validation
Validate before calling
if server_args.model_variant and server_args.model_subfolder:
mapped = MiniMaxH3Pipeline.model_subfolder_for_variant(server_args.model_variant)
assert server_args.model_subfolder.strip().lower() == mapped.lower(), 'flags disagree' Prevention
- Set only one of --model-variant / --model-subfolder unless certain
- Add a startup consistency check when both are present
When it happens
Trigger: 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).
Common situations: 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.
Related errors
- MiniMax H3 model variant must be a non-empty string
- unsupported MiniMax H3 model variant {variant!r}; supported:
- MiniMax H3 loaded checkpoint partition does not match --mode
- --model-variant {server_args.model_variant} requires '{cls._
- MiniMax H3 requires ffmpeg and ffprobe for media processing
AI-assisted analysis of sgl-project/sglang@0132848349 (2026-08-28).
Data as JSON: /api/errors/a847797e7a88af25.
Report an issue: GitHub.