sgl-project/sglang · error · ValueError
unsupported MiniMax H3 condition type {condition_type!r}
Error message
unsupported MiniMax H3 condition type {condition_type!r} What it means
The material's condition_type is not one of image, audio, video, video_audio. _validate_localized_media dispatches on condition_type and only supports these four.
Source
Thrown at python/sglang/multimodal_gen/runtime/pipelines_core/stages/model_specific_stages/minimax_h3/material_io.py:395
raise ValueError("MiniMax H3 image material is invalid") from exc
if image_format not in {"JPEG", "PNG", "WEBP"}:
raise ValueError("MiniMax H3 image material uses an unsupported format")
if width <= 0 or height <= 0:
raise ValueError(
"MiniMax H3 image material has no positive display geometry"
)
return {
"condition_type": "image",
"coded_width": int(coded_width),
"coded_height": int(coded_height),
"display_width": int(width),
"display_height": int(height),
"image_format": image_format,
"exif_transposed": (coded_width, coded_height) != (width, height),
}
if condition_type not in {"audio", "video", "video_audio"}:
raise ValueError(f"unsupported MiniMax H3 condition type {condition_type!r}")
try:
payload = _ffprobe_media(path)
except Exception as exc:
raise ValueError("MiniMax H3 media material is invalid") from exc
streams = payload.get("streams") or []
format_names = set(
str((payload.get("format") or {}).get("format_name") or "").split(",")
)
allowed_formats = {
"mov",
"mp4",
"m4a",
"3gp",
"3g2",
"mj2",
"matroska",
"webm",View on GitHub (pinned to 0132848349)
Solutions
- Set condition_type to exactly one of: image, audio, video, video_audio
- Check for trailing whitespace/casing in the field ('video ' vs 'video')
- Regenerate the request from the current schema/typed client
Example fix
# before
{"condition_type": "Video", "path": "clip.mp4"}
# after
{"condition_type": "video", "path": "clip.mp4"} Defensive patterns
Strategy: type-guard
Validate before calling
assert condition_type in {"image", "audio", "video", "video_audio"} Type guard
def is_valid_condition_type(t: str) -> bool:
return t in {"image", "audio", "video", "video_audio"} Prevention
- Use a Literal/Enum type for condition_type in request models
- Validate requests against the schema before dispatch
When it happens
Trigger: Passing a material dict/URI with condition_type such as 'text', 'Video', 'img', or None to the MiniMax H3 material validation path.
Common situations: Typos or casing differences in generated requests, schema drift between your request builder and the pipeline, or missing condition_type defaulting to an unexpected value.
Understand the failure class
Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.
Related errors
- unsupported ref2va condition type {cond_type!r}
- {path}.aspect_ratio for task {profile.task!r} must be 'auto'
- {cpath}.role must be keyframe or reference, got {role!r}
- fl2va requires first_frame, last_frame, or both
- ref2va requires at least one of reference_image, reference_v
AI-assisted analysis of sgl-project/sglang@0132848349 (2026-08-28).
Data as JSON: /api/errors/96fc0e639eaee71e.
Report an issue: GitHub.