sgl-project/sglang · error · ValueError

MiniMax-H3 quality="high" is validated only for {_MINIMAX_H3

Error message

MiniMax-H3 quality="high" is validated only for {_MINIMAX_H3_QUALITY_WORKLOAD}; got {actual}

What it means

quality="high" is only validated for one exact workload (_MINIMAX_H3_QUALITY_WORKLOAD): the request plan's task, dimensions, and flow shifts must match that golden workload within abs_tol=1e-9. Any deviation — wrong dims, task, or shift values — is rejected with the actual workload printed.

Source

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

                "fps",
                "frame_count",
                "num_inference_steps",
            )
            exact = all(
                actual[name] == _MINIMAX_H3_QUALITY_WORKLOAD[name]
                for name in exact_fields
            )
            shifts = math.isclose(
                actual["flow_shift"],
                _MINIMAX_H3_QUALITY_WORKLOAD["flow_shift"],
                abs_tol=1e-9,
            ) and math.isclose(
                actual["audio_flow_shift"],
                _MINIMAX_H3_QUALITY_WORKLOAD["audio_flow_shift"],
                abs_tol=1e-9,
            )
            if not exact or not shifts:
                raise ValueError(
                    'MiniMax-H3 quality="high" is validated only for '
                    f"{_MINIMAX_H3_QUALITY_WORKLOAD}; got {actual}"
                )
        return batch


__all__ = ["MiniMaxH3PartitionAdmissionStage", "MiniMaxH3ReleaseMetadata"]

View on GitHub (pinned to 0132848349)

Solutions

  1. Match the exact golden workload in _MINIMAX_H3_QUALITY_WORKLOAD (task, width, height, shifts) when requesting quality="high"
  2. Use quality="lossless" for other shapes until more workloads are validated
  3. Read the actual dict in the error message and diff it against your request parameters

Example fix

# before
sampling_params.quality = "high"  # width=1024, unvalidated
# after
sampling_params.quality = "high"  # width/height/shifts == _MINIMAX_H3_QUALITY_WORKLOAD
# or:
sampling_params.quality = "lossless"
Defensive patterns

Strategy: validation

Validate before calling

plan = minimax_h3_plan_from_batch(req)
if quality == "high":
    assert plan is not None and matches_golden(plan, _MINIMAX_H3_QUALITY_WORKLOAD), \
        "high quality only supported for the golden workload"

Prevention

When it happens

Trigger: A non-warmup quality="high" request whose plan.shape/width/height/flow shifts differ from _MINIMAX_H3_QUALITY_WORKLOAD (e.g. 1024x1024 when only 768x768 was validated).

Common situations: Clients requesting high quality at arbitrary resolutions/aspect ratios when only one configuration has been validated; changing default flow-shift hyperparameters in config.

Related errors


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