sgl-project/sglang · error · ValueError
task {task!r} resolves outside partition {self.partition!r}
Error message
task {task!r} resolves outside partition {self.partition!r} What it means
canonical_task resolves a requested task through aliases and then verifies the canonical name both is declared and maps back to the loaded partition. This error fires in forward when the task name is declared but partition_for_task places it in the other partition (fl2va vs ref2va).
Source
Thrown at python/sglang/multimodal_gen/runtime/pipelines_core/stages/model_specific_stages/minimax_h3/release_metadata.py:129
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:
normalized = task.strip().lower()
canonical = self.task_aliases.get(normalized, normalized)
if canonical not in self.tasks:
raise ValueError(
f"task {task!r} is not served by MiniMax H3 partition {self.partition!r}; "
f"supported tasks: {list(self.tasks)!r}"
)
if partition_for_task(canonical) != self.partition:
raise ValueError(
f"task {task!r} resolves outside partition {self.partition!r}"
)
return canonical
class MiniMaxH3PartitionAdmissionStage(PipelineStage):
def __init__(self, metadata: MiniMaxH3ReleaseMetadata) -> None:
super().__init__()
self.metadata = metadata
def forward(self, batch: Req, server_args: ServerArgs) -> Req:
task = None if batch.sampling_params is None else batch.sampling_params.task
if not isinstance(task, str) or not task.strip():View on GitHub (pinned to 0132848349)
Solutions
- Deploy the checkpoint whose partition matches the requested task (check _minimax_h3.partition in model_index.json)
- Fix the task string or alias in the request to one this partition serves
- Serve both partitions if you need both task families
Example fix
// before
response = partition.forward(task="t2v", ...) # on ref2va weights
// after
response = ref2va_partition.forward(task=partition.canonical_task("ref2v"), ...) Defensive patterns
Strategy: try-catch
Try / catch
try:
task = meta.canonical_task(requested)
except ValueError as e:
return unsupported_task(str(e)) Prevention
- Advertise the partition's supported tasks in the API surface
- Route requests by partition_for_task before forward
When it happens
Trigger: Sending a request whose task string (after alias resolution) belongs to the other partition, e.g. asking a ref2va checkpoint to serve a fl2va task at forward time.
Common situations: Single checkpoint deployed for the wrong workload, client reusing task names across model versions, or alias table drift between releases.
Related errors
- task {task!r} does not belong to partition {partition!r}
- model_index.json._minimax_h3.partition must be one of fl2va,
- fl2va requires first_frame, last_frame, or both
- ref2va requires at least one of reference_image, reference_v
- t2va takes no conditioning inputs; pick another task
AI-assisted analysis of sgl-project/sglang@0132848349 (2026-08-28).
Data as JSON: /api/errors/adb54a05fc65a57f.
Report an issue: GitHub.