sgl-project/sglang · error · ValueError
auto_duration was requested but this checkpoint has no durat
Error message
auto_duration was requested but this checkpoint has no duration head. It ships from LTX-2.5 onward.
What it means
The LTX-2 duration stage short-circuits unless batch.auto_duration is set; when it is set but the loaded checkpoint has no duration head (self.duration_head is None), automatic duration prediction is impossible and it raises, noting duration heads ship from LTX-2.5 onward.
Source
Thrown at python/sglang/multimodal_gen/runtime/pipelines_core/stages/model_specific_stages/ltx_2/duration.py:55
if self.duration_head is None:
return []
dtype = resolve_precision(
server_args, "duration_head", precision_attr="dit_precision"
)
return [
ComponentUse(
self._component_stage_name(stage_name),
"duration_head",
target_dtype=dtype,
)
]
def forward(self, batch: Req, server_args: ServerArgs) -> Req:
if not batch.auto_duration:
return batch
if self.duration_head is None:
raise ValueError(
"auto_duration was requested but this checkpoint has no duration "
"head. It ships from LTX-2.5 onward."
)
video_tokens = batch.prompt_embeds
audio_tokens = batch.audio_prompt_embeds
if isinstance(video_tokens, list):
video_tokens = video_tokens[0]
if isinstance(audio_tokens, list):
audio_tokens = audio_tokens[0]
# A CFG batch carries [negative, positive] with duplicated rows, so
# predict from the first positive row only.
with (
self.use_declared_component(
component_name="duration_head", module=self.duration_head
) as duration_head,
torch.no_grad(),View on GitHub (pinned to 0132848349)
Solutions
- Disable auto_duration for this checkpoint (unset the flag / set False)
- Upgrade to an LTX-2.5+ checkpoint that includes the duration head
- Verify the checkpoint actually loaded the duration head module (self.duration_head is not None) if you believe it should have one
Example fix
# before req.auto_duration = True # LTX-2.0 checkpoint -> raises # after req.auto_duration = False # or serve an LTX-2.5+ checkpoint that has a duration head
Defensive patterns
Strategy: type-guard
Validate before calling
if batch.auto_duration and stage.duration_head is None:
batch.auto_duration = False # or raise with a clear message Type guard
def supports_auto_duration(stage) -> bool:
return getattr(stage, "duration_head", None) is not None Prevention
- Gate auto_duration on checkpoint capability at request admission
- Document which checkpoints carry the duration head
When it happens
Trigger: Setting auto_duration=True on a request while running a pre-LTX-2.5 checkpoint that lacks the duration head weights.
Common situations: Using a newer client/flag against an older LTX-2 checkpoint; enabling auto_duration globally while serving multiple checkpoints; checkpoint download missing the duration head module.
Related errors
- Serve backend {name!r} uses API version {backend.api_version
- scalar_type_id {scalar_type_id} doesn't exists.
- padding_side must be 'left' or 'right', got {padding_side}
- Unsupported text encoder output: expected `hidden_states`.
- num_inference_steps must be positive, got {steps}
AI-assisted analysis of sgl-project/sglang@0132848349 (2026-08-28).
Data as JSON: /api/errors/1bf354ef6713a8ba.
Report an issue: GitHub.