{"record":{"id":"9fdde995bb4ba62a","repo":"sgl-project/sglang","slug":"generated-minimax-h3-outputs-have-inconsistent-med","errorCode":null,"errorMessage":"generated MiniMax H3 outputs have inconsistent media metadata: output 0={final_media_fields}, output {output_index}={media_fields}","messagePattern":"generated MiniMax H3 outputs have inconsistent media metadata: output 0=(.+?), output (.+?)=(.+?)","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"python/sglang/multimodal_gen/runtime/pipelines_core/stages/model_specific_stages/minimax_h3/video_adapter.py","lineNumber":349,"sourceCode":"                expected_size = (int(shape[\"width\"]), int(shape[\"height\"]))\n\n        def probe_output(output_path: str) -> dict[str, str]:\n            return _probe_minimax_h3_output_fields(\n                output_path,\n                expected_frame_count=expected_frame_count,\n                expected_size=expected_size,\n            )\n\n        if len(output_paths) > 1:\n            with ThreadPoolExecutor(max_workers=min(4, len(output_paths))) as pool:\n                media_fields_by_output = list(pool.map(probe_output, output_paths))\n        else:\n            media_fields_by_output = [probe_output(output_paths[0])]\n\n        final_media_fields = media_fields_by_output[0]\n        for output_index, media_fields in enumerate(media_fields_by_output[1:], 1):\n            if media_fields != final_media_fields:\n                raise RuntimeError(\n                    \"generated MiniMax H3 outputs have inconsistent media metadata: \"\n                    f\"output 0={final_media_fields}, output \"\n                    f\"{output_index}={media_fields}\"\n                )\n        return final_media_fields\n\n\ndef _probe_minimax_h3_output_fields(\n    path: str,\n    *,\n    expected_frame_count: int | None = None,\n    expected_size: tuple[int, int] | None = None,\n) -> dict[str, str]:\n    \"\"\"Validate one final MiniMax H3 AV file and derive truthful metadata.\"\"\"\n\n    try:\n        probe = subprocess.run(\n            [","sourceCodeStart":331,"sourceCodeEnd":367,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/multimodal_gen/runtime/pipelines_core/stages/model_specific_stages/minimax_h3/video_adapter.py#L331-L367","documentation":"When multiple outputs are generated per prompt, the adapter probes each output's media metadata (size, fps, frame count, duration) and requires them all to be identical. Divergent metadata across outputs of the same request indicates inconsistent generation and is reported as a RuntimeError.","triggerScenarios":"validate_final_outputs_sync with num_outputs_per_prompt>1 where probe_output returns different media fields for different output files (e.g. one file at 768p, another at 1080p).","commonSituations":"Backend producing inconsistent resolutions or frame rates across samples of one request; corrupted/truncated files from disk pressure.","solutions":["Retry generation; transient inconsistencies can occur under resource pressure","Check server logs for per-sample errors during generation","Reduce num_outputs_per_prompt to 1 and generate sequentially if consistency cannot be guaranteed","Report as a bug with the full media metadata of each output"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"try:\n    fields = adapter.validate_final_outputs_sync(paths, batch)\nexcept RuntimeError as e:\n    if \"inconsistent media metadata\" in str(e):\n        fields = None  # fall back to per-file probing by the caller\n    else:\n        raise","preventionTips":["Prefer num_outputs_per_prompt=1 when strict consistency matters","Probe outputs yourself with ffprobe to compare metadata before relying on the adapter"],"tags":["minimax-h3","metadata-consistency","multi-output","validation"],"backgroundTag":"output-metadata-mismatch","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}