{"record":{"id":"54b1bd50bea9a79f","repo":"sgl-project/sglang","slug":"minimax-h3-requires-num-inference-steps-2-becau","errorCode":null,"errorMessage":"MiniMax H3 requires num_inference_steps >= 2 because its video/audio sigma schedules include both interval endpoints","messagePattern":"MiniMax H3 requires num_inference_steps >= 2 because its video/audio sigma schedules include both interval endpoints","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/sglang/multimodal_gen/runtime/pipelines_core/stages/model_specific_stages/minimax_h3/release_metadata.py","lineNumber":151,"sourceCode":"        if partition_for_task(canonical) != self.partition:\n            raise ValueError(\n                f\"task {task!r} resolves outside partition {self.partition!r}\"\n            )\n        return canonical\n\n\nclass MiniMaxH3PartitionAdmissionStage(PipelineStage):\n    def __init__(self, metadata: MiniMaxH3ReleaseMetadata) -> None:\n        super().__init__()\n        self.metadata = metadata\n\n    def forward(self, batch: Req, server_args: ServerArgs) -> Req:\n        task = None if batch.sampling_params is None else batch.sampling_params.task\n        if not isinstance(task, str) or not task.strip():\n            raise ValueError(\"MiniMax H3 request task must be a non-empty string\")\n        self.metadata.canonical_task(task)\n        if batch.num_inference_steps < 2:\n            raise ValueError(\n                \"MiniMax H3 requires num_inference_steps >= 2 because its \"\n                \"video/audio sigma schedules include both interval endpoints\"\n            )\n        quality = getattr(batch.sampling_params, \"quality\", \"lossless\")\n        if quality not in QUALITY_LEVELS:\n            raise ValueError(\n                f\"quality must be one of {list(QUALITY_LEVELS)}, got {quality!r}\"\n            )\n        high_quality = quality == \"high\"\n        if high_quality and not batch.is_warmup:\n            server_args.pipeline_config.validate_quality_deployment(server_args)\n            plan = minimax_h3_plan_from_batch(batch)\n            if plan is None:\n                raise ValueError(\n                    'MiniMax-H3 quality=\"high\" requires a resolved request plan'\n                )\n            shape = plan.shape\n            actual = {","sourceCodeStart":133,"sourceCodeEnd":169,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/multimodal_gen/runtime/pipelines_core/stages/model_specific_stages/minimax_h3/release_metadata.py#L133-L169","documentation":"MiniMax H3's video/audio sigma schedules include both interval endpoints, so at least two inference steps are required. The admission stage rejects requests with batch.num_inference_steps < 2.","triggerScenarios":"A Req with num_inference_steps set to 1 (or 0/None coerced low) reaching MiniMaxH3PartitionAdmissionStage.forward.","commonSituations":"Single-step preview/prototype clients, defaults from a generic sampler that assumes 1 step, or warmup requests not overriding the step count.","solutions":["Set num_inference_steps >= 2 on the request","If a default is being applied, configure the server/client default for this model to at least 2","Reject or clamp step counts at request-admission time upstream"],"exampleFix":"# before\nreq.num_inference_steps = 1\n# after\nreq.num_inference_steps = 8","handlingStrategy":"validation","validationCode":"if not isinstance(req.num_inference_steps, int) or req.num_inference_steps < 2:\n    reject(\"num_inference_steps must be >= 2\")","typeGuard":"def steps_ok(req) -> bool:\n    return isinstance(req.num_inference_steps, int) and req.num_inference_steps >= 2","tryCatchPattern":null,"preventionTips":["Default this model's step count to >= 2 in server config","Clamp client-side before submit"],"tags":["minimax-h3","num-inference-steps","request-validation","sigma-schedule"],"backgroundTag":"invalid-request-parameter","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}