sgl-project/sglang · critical · ValueError

{path} must be a non-empty list

Error message

{path} must be a non-empty list

What it means

from_model_index uses _string_list to validate list-of-string fields in model_index.json (e.g. _minimax_h3.tasks). The value must be a non-empty Python list; None, a missing field coerced to None, a string, an empty list, or a tuple all fail.

Source

Thrown at python/sglang/multimodal_gen/runtime/pipelines_core/stages/model_specific_stages/minimax_h3/release_metadata.py:36

    partition_for_task,
)
from sglang.multimodal_gen.runtime.server_args import ServerArgs

_MINIMAX_H3_QUALITY_WORKLOAD = {
    "task": "t2va",
    "width": 1344,
    "height": 768,
    "fps": 24,
    "frame_count": 124,
    "num_inference_steps": 50,
    "flow_shift": 12.0,
    "audio_flow_shift": 3.0,
}


def _string_list(value: Any, path: str) -> tuple[str, ...]:
    if not isinstance(value, list) or not value:
        raise ValueError(f"{path} must be a non-empty list")
    values = tuple(value)
    if any(not isinstance(item, str) or not item for item in values):
        raise ValueError(f"{path} must contain non-empty strings")
    if len(set(values)) != len(values):
        raise ValueError(f"{path} must not contain duplicates")
    return values


@dataclass(frozen=True)
class MiniMaxH3ReleaseMetadata:
    schema_version: int
    partition: str
    tasks: tuple[str, ...]
    task_aliases: Mapping[str, str]
    video_sigma_shift: float
    audio_sigma_shift: float

    @classmethod

View on GitHub (pinned to 0132848349)

Solutions

  1. Add the required non-empty list, e.g. "tasks": ["ref2v"], under _minimax_h3
  2. Copy the model_index.json from the official release and edit only what you must
  3. Validate your model_index.json against the release schema before deploying

Example fix

// before
"_minimax_h3": {"schema_version": 1, "partition": "ref2va"}

// after
"_minimax_h3": {"schema_version": 1, "partition": "ref2va", "tasks": ["ref2v"]}
Defensive patterns

Strategy: validation

Validate before calling

def valid_string_list(v) -> bool:
    return isinstance(v, list) and len(v) > 0 and all(isinstance(s, str) and s for s in v)

Prevention

When it happens

Trigger: _minimax_h3.tasks missing from model_index.json, set to null, "", or an empty array during config load.

Common situations: Minimal hand-written model_index.json for a local fine-tune, or a schema migration that dropped the field.

Related errors


AI-assisted analysis of sgl-project/sglang@0132848349 (2026-08-28). Data as JSON: /api/errors/2194940ce3017546. Report an issue: GitHub.