sgl-project/sglang · critical · ValueError
{rope_type=} not supported. Choose between 'interleaved' and
Error message
{rope_type=} not supported. Choose between 'interleaved' and 'split'. What it means
The LTX-2 rotary module supports exactly two layouts: 'interleaved' (pairs at stride 2) and 'split' (first-half/second-half). Any other rope_type string is rejected at init because the positional-encoding math differs per layout.
Source
Thrown at python/sglang/multimodal_gen/runtime/models/dits/ltx_2.py:401
base_height: int = 2048,
base_width: int = 2048,
sampling_rate: int = 16000,
hop_length: int = 160,
scale_factors: Tuple[int, ...] = (8, 32, 32),
theta: float = 10000.0,
causal_offset: int = 1,
modality: str = "video",
double_precision: bool = True,
rope_type: str = "interleaved",
num_attention_heads: int = 32,
) -> None:
super().__init__()
self.dim = int(dim)
self.patch_size = int(patch_size)
self.patch_size_t = int(patch_size_t)
if rope_type not in ["interleaved", "split"]:
raise ValueError(
f"{rope_type=} not supported. Choose between 'interleaved' and 'split'."
)
self.rope_type = rope_type
self.base_num_frames = int(base_num_frames)
self.num_attention_heads = int(num_attention_heads)
self.base_height = int(base_height)
self.base_width = int(base_width)
self.sampling_rate = int(sampling_rate)
self.hop_length = int(hop_length)
self.audio_latents_per_second = (
float(self.sampling_rate) / float(self.hop_length) / float(scale_factors[0])
)
self.scale_factors = tuple(int(x) for x in scale_factors)
self.theta = float(theta)View on GitHub (pinned to 0132848349)
Solutions
- Set rope_type to 'interleaved' or 'split' exactly
- Match the value used during checkpoint training (wrong layout silently degrades quality even when it loads)
- Add a config alias mapping if you control the loader
Example fix
// before rope = LTX2RotaryPosEmbed(..., rope_type="default") // after rope = LTX2RotaryPosEmbed(..., rope_type="split")
Defensive patterns
Strategy: validation
Validate before calling
assert rope_type in ('interleaved', 'split'), f'{rope_type=} unsupported' Type guard
def is_supported_rope_type(v: str) -> bool:\n return v in ('interleaved', 'split') Prevention
- Validate rope_type against checkpoint training config
- Use exact lowercase strings
- Add config linting for string enums
When it happens
Trigger: Constructing LTX2RotaryPosEmbed with rope_type='concat', 'default', None, or a typo like 'splitt'.
Common situations: Porting config from another DiT whose rope naming differs; hand-written config JSON; case differences ('Split' vs 'split').
Related errors
- Modality {modality} is not supported. Supported modalities a
- Unknown activation function: {act_fn}
- Invalid fused KV rotary/head dim pair: rotary_dim={rotary_di
- Invalid fused KV rotary/head dim pair: rotary_dim={self.rota
- RoPE config mismatch across layers for fused KV path: expect
AI-assisted analysis of sgl-project/sglang@0132848349 (2026-08-28).
Data as JSON: /api/errors/5907f767bdfeff4e.
Report an issue: GitHub.