sgl-project/sglang · error · ValueError

model_index.json._minimax_h3.sigma_shift_scales must be an o

Error message

model_index.json._minimax_h3.sigma_shift_scales must be an object

What it means

from_model_index requires `_minimax_h3.sigma_shift_scales` in model_index.json to be a JSON object (a Mapping) holding the video/audio sigma shift values. If the key is missing, is a list, a number, or a string, this ValueError is raised during metadata parsing.

Source

Thrown at python/sglang/multimodal_gen/runtime/pipelines_core/stages/model_specific_stages/minimax_h3/release_metadata.py:82

        if partition not in {"fl2va", "ref2va"}:
            raise ValueError(
                "model_index.json._minimax_h3.partition must be one of " "fl2va, ref2va"
            )
        tasks = _string_list(raw.get("tasks"), "model_index.json._minimax_h3.tasks")
        aliases = raw.get("task_aliases", {})
        if not isinstance(aliases, Mapping) or any(
            not isinstance(key, str)
            or not key
            or not isinstance(value, str)
            or not value
            for key, value in aliases.items()
        ):
            raise ValueError(
                "model_index.json._minimax_h3.task_aliases must map strings to strings"
            )
        scales = raw.get("sigma_shift_scales")
        if not isinstance(scales, Mapping):
            raise ValueError(
                "model_index.json._minimax_h3.sigma_shift_scales must be an object"
            )
        try:
            video_sigma = float(scales["video"])
            audio_sigma = float(scales["audio"])
        except (KeyError, TypeError, ValueError) as exc:
            raise ValueError(
                "model_index.json._minimax_h3.sigma_shift_scales requires numeric "
                "video and audio values"
            ) from exc
        metadata = cls(
            schema_version=1,
            partition=partition,
            tasks=tasks,
            task_aliases=dict(aliases),
            video_sigma_shift=video_sigma,
            audio_sigma_shift=audio_sigma,
        )

View on GitHub (pinned to 0132848349)

Solutions

  1. Set _minimax_h3.sigma_shift_scales to an object with 'video' and 'audio' keys, e.g. {"video": 1.0, "audio": 1.0}
  2. Verify the file is valid JSON and the section sits inside _minimax_h3, not at top level

Example fix

// before
"sigma_shift_scales": [1.0, 1.0]
// after
"sigma_shift_scales": {"video": 1.0, "audio": 1.0}
Defensive patterns

Strategy: type-guard

Validate before calling

scales = raw.get("_minimax_h3", {}).get("sigma_shift_scales")
if not isinstance(scales, Mapping):
    raise SystemExit("model_index.json: sigma_shift_scales must be an object with video/audio")

Type guard

from collections.abc import Mapping
def valid_scales(s: Any) -> bool:
    return isinstance(s, Mapping) and {"video", "audio"} <= set(s)

Prevention

When it happens

Trigger: model_index.json where _minimax_h3.sigma_shift_scales is absent (raw.get returns None), an array, or a scalar; raised while loading MiniMax H3 release metadata via _load_config.

Common situations: Omitting the sigma_shift_scales block when authoring a custom model_index.json, or an export tool writing it as a JSON array of two numbers instead of an object.

Understand the failure class

Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.

Related errors


AI-assisted analysis of sgl-project/sglang@0132848349 (2026-08-28). Data as JSON: /api/errors/554d67c44d84c7dc. Report an issue: GitHub.