sgl-project/sglang · error · ValueError
task {task!r} does not belong to partition {partition!r}
Error message
task {task!r} does not belong to partition {partition!r} What it means
Each declared task must belong to the partition this metadata describes: partition_for_task(task) must equal the metadata's partition. Mixing tasks from another weight partition into this metadata block raises this error at load time.
Source
Thrown at python/sglang/multimodal_gen/runtime/pipelines_core/stages/model_specific_stages/minimax_h3/release_metadata.py:107
raise ValueError(
"model_index.json._minimax_h3.sigma_shift_scales requires numeric "
"video and audio values"
) from exc
metadata = cls(
schema_version=1,
partition=partition,
tasks=tasks,
task_aliases=dict(aliases),
video_sigma_shift=video_sigma,
audio_sigma_shift=audio_sigma,
)
for task in metadata.tasks:
if canonical_minimax_h3_task(task) != task:
raise ValueError(
f"tasks must contain canonical task names, got {task!r}"
)
if partition_for_task(task) != partition:
raise ValueError(
f"task {task!r} does not belong to partition {partition!r}"
)
for alias, target in metadata.task_aliases.items():
if target not in metadata.tasks:
raise ValueError(
f"task alias {alias!r} targets undeclared task {target!r}"
)
if canonical_minimax_h3_task(alias) != target:
raise ValueError(
f"unsupported task alias mapping {alias!r} -> {target!r}"
)
return metadata
@property
def sigma_shift_scales(self) -> dict[str, float]:
return {"video": self.video_sigma_shift, "audio": self.audio_sigma_shift}
def canonical_task(self, task: str) -> str:View on GitHub (pinned to 0132848349)
Solutions
- Check partition_for_task for each listed task and remove tasks that resolve to a different partition
- Confirm the partition field of this metadata block matches the checkpoint actually being loaded
- Split the tasks into the correct per-partition model_index.json files
Example fix
// before
{"partition": "video", "tasks": ["text_to_video", "text_to_audio"]}
// after
{"partition": "video", "tasks": ["text_to_video"]} Defensive patterns
Strategy: validation
Validate before calling
assert all(partition_for_task(t) == partition for t in tasks), "task belongs to another partition"
Prevention
- Generate per-partition indexes from partition_for_task
- Never merge tasks lists across checkpoints
When it happens
Trigger: A model_index.json for partition "a" that lists a task whose partition_for_task resolves to "b", e.g. an audio task inside a video-partition metadata block.
Common situations: Merging metadata blocks when combining checkpoints, or copying the tasks list from a different partition's index during model packaging.
Understand the failure class
Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.
Related errors
- task {task!r} resolves outside partition {self.partition!r}
- model_index.json._minimax_h3.partition must be one of fl2va,
- task {task!r} is not served by MiniMax H3 partition {self.pa
- {path} must be a non-empty list
- {path} must contain non-empty strings
AI-assisted analysis of sgl-project/sglang@0132848349 (2026-08-28).
Data as JSON: /api/errors/ff5d061dc322af99.
Report an issue: GitHub.