sgl-project/sglang · error · ValueError

model_index.json._minimax_h3.sigma_shift_scales requires num

Error message

model_index.json._minimax_h3.sigma_shift_scales requires numeric video and audio values

What it means

After confirming sigma_shift_scales is an object, from_model_index coerces scales["video"] and scales["audio"] to float. If either key is missing (KeyError), is a non-numeric type (TypeError), or is an unparseable value (ValueError), this error is raised with the original exception chained.

Source

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

            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,
        )
        for task in metadata.tasks:
            if canonical_minimax_h3_task(task) != task:
                raise ValueError(
                    f"tasks must contain canonical task names, got {task!r}"
                )
            if partition_for_task(task) != partition:
                raise ValueError(

View on GitHub (pinned to 0132848349)

Solutions

  1. Ensure both video and audio keys exist and are numbers (int or float accepted via float())
  2. Check for typos or nulls in the scales object
  3. Validate the JSON with a schema/lint step before deploying the model directory

Example fix

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

Strategy: validation

Validate before calling

try:
    v, a = float(scales["video"]), float(scales["audio"])
except (KeyError, TypeError, ValueError):
    raise SystemExit("sigma_shift_scales needs numeric video and audio")

Prevention

When it happens

Trigger: _minimax_h3.sigma_shift_scales exists but lacks 'video' or 'audio', or one of them is a string like "high", null, or a nested object.

Common situations: Typos in key names (e.g. "videos"), partial hand-edits, or nulls written by a serializer that skipped None values.

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/c51cc6188de2a86d. Report an issue: GitHub.