sgl-project/sglang · error · ValueError
MiniMax H3 image material has no positive display geometry
Error message
MiniMax H3 image material has no positive display geometry
What it means
The MiniMax H3 image material has no positive width/height. Regenerate or fix the image metadata.
Solutions
- Re-encode the image through a real tool (PIL/Pillow re-save or ImageMagick)
- Reject the material at ingest with your own dimension check
- If recurring, identify the producer creating degenerate images
Defensive patterns
Strategy: validation
Validate before calling
from PIL import Image, ImageOps
with Image.open(path) as im:
w, h = ImageOps.exif_transpose(im).size
assert w > 0 and h > 0 Prevention
- Re-encode untrusted images through PIL before submission
- Reject zero-dimension images at ingest
When it happens
Trigger: Pathological image files where ImageOps.exif_transpose(image).size returns a zero dimension — crafted/corrupt files or exotic encoder output.
Common situations: Fuzzed/adversarial inputs, images produced by broken encoders, or zero-pixel placeholder images.
Related errors
- adaln out_features mismatch
- adapt_shape_v1 ratio must be within the inclusive range 1:4…
- aligned video noise shape
- attention_head_dim must be positive.
- base64 URI header is too large
AI-assisted analysis of sgl-project/sglang@0132848349 (2026-08-28).
Data as JSON: /api/errors/1220a6db7ea4c80b.
Report an issue: GitHub.
Appendix: source
Thrown at python/sglang/multimodal_gen/runtime/pipelines_core/stages/model_specific_stages/minimax_h3/material_io.py:381
"""
if condition_type == "image":
try:
from PIL import Image, ImageOps
with Image.open(path) as image:
coded_width, coded_height = image.size
image_format = str(image.format or "").upper()
if coded_width <= 0 or coded_height <= 0:
raise ValueError("image has no positive dimensions")
display_image = ImageOps.exif_transpose(image)
width, height = display_image.size
except Exception as exc:
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 excView on GitHub (pinned to 0132848349)