sgl-project/sglang · error · RuntimeError
generated MiniMax H3 outputs have inconsistent media metadat
Error message
generated MiniMax H3 outputs have inconsistent media metadata: output 0={final_media_fields}, output {output_index}={media_fields} What it means
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.
Source
Thrown at python/sglang/multimodal_gen/runtime/pipelines_core/stages/model_specific_stages/minimax_h3/video_adapter.py:349
expected_size = (int(shape["width"]), int(shape["height"]))
def probe_output(output_path: str) -> dict[str, str]:
return _probe_minimax_h3_output_fields(
output_path,
expected_frame_count=expected_frame_count,
expected_size=expected_size,
)
if len(output_paths) > 1:
with ThreadPoolExecutor(max_workers=min(4, len(output_paths))) as pool:
media_fields_by_output = list(pool.map(probe_output, output_paths))
else:
media_fields_by_output = [probe_output(output_paths[0])]
final_media_fields = media_fields_by_output[0]
for output_index, media_fields in enumerate(media_fields_by_output[1:], 1):
if media_fields != final_media_fields:
raise RuntimeError(
"generated MiniMax H3 outputs have inconsistent media metadata: "
f"output 0={final_media_fields}, output "
f"{output_index}={media_fields}"
)
return final_media_fields
def _probe_minimax_h3_output_fields(
path: str,
*,
expected_frame_count: int | None = None,
expected_size: tuple[int, int] | None = None,
) -> dict[str, str]:
"""Validate one final MiniMax H3 AV file and derive truthful metadata."""
try:
probe = subprocess.run(
[View on GitHub (pinned to 0132848349)
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
Defensive patterns
Strategy: retry
Try / catch
try:
fields = adapter.validate_final_outputs_sync(paths, batch)
except RuntimeError as e:
if "inconsistent media metadata" in str(e):
fields = None # fall back to per-file probing by the caller
else:
raise Prevention
- Prefer num_outputs_per_prompt=1 when strict consistency matters
- Probe outputs yourself with ffprobe to compare metadata before relying on the adapter
When it happens
Trigger: 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).
Common situations: Backend producing inconsistent resolutions or frame rates across samples of one request; corrupted/truncated files from disk pressure.
Related errors
- MiniMax-H3 adaln_t_table must have shape [N, D] with N >= 2,
- MiniMax H3 AdaLN cache has invalid timestep plans
- TP size must be positive.
- num_attention_heads must be positive.
- hidden_size must be positive.
AI-assisted analysis of sgl-project/sglang@0132848349 (2026-08-28).
Data as JSON: /api/errors/9fdde995bb4ba62a.
Report an issue: GitHub.