{"record":{"id":"8e1557cca2bfa011","repo":"sgl-project/sglang","slug":"rope-type-not-supported-choose-between-interl","errorCode":null,"errorMessage":"{rope_type=} not supported. Choose between 'interleaved' and 'split'.","messagePattern":"(.+?) not supported\\. Choose between 'interleaved' and 'split'\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/sglang/multimodal_gen/runtime/models/adapter/ltx_2_connector.py","lineNumber":237,"sourceCode":"\n\nclass LTX2RotaryPosEmbed1d(nn.Module):\n    \"\"\"\n    1D rotary positional embeddings (RoPE) for the LTX 2.0 text encoder connectors.\n    \"\"\"\n\n    def __init__(\n        self,\n        dim: int,\n        base_seq_len: int = 4096,\n        theta: float = 10000.0,\n        double_precision: bool = True,\n        rope_type: str = \"interleaved\",\n        num_attention_heads: int = 32,\n    ):\n        super().__init__()\n        if rope_type not in [\"interleaved\", \"split\"]:\n            raise ValueError(\n                f\"{rope_type=} not supported. Choose between 'interleaved' and 'split'.\"\n            )\n\n        self.dim = dim\n        self.base_seq_len = base_seq_len\n        self.theta = theta\n        self.double_precision = double_precision\n        self.rope_type = rope_type\n        self.num_attention_heads = num_attention_heads\n\n    def forward(\n        self,\n        batch_size: int,\n        pos: int,\n        device: Union[str, torch.device],\n        dtype: Optional[torch.dtype] = None,\n    ) -> Tuple[torch.Tensor, torch.Tensor]:\n        # 1. Get 1D position ids","sourceCodeStart":219,"sourceCodeEnd":255,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/multimodal_gen/runtime/models/adapter/ltx_2_connector.py#L219-L255","documentation":"ValueError from the LTX-2 rotary embedding __init__: rope_type must be exactly 'interleaved' or 'split'. Any other string (typos, 'default', 'linear') is rejected at construction time.","triggerScenarios":"Constructing the rotary module with rope_type='half'/'rope'/'interleaved ' (typo/case/whitespace) or a value ported from another codebase's naming scheme.","commonSituations":"Converting configs from other video-model repos that use different rope naming; case sensitivity ('Interleaved'); trailing whitespace from config parsing.","solutions":["Use exactly 'interleaved' or 'split'","Normalize incoming config: rope_type.strip().lower() and map known aliases before passing","Validate config values at load time with a clear error"],"exampleFix":"// before\nrope_type=\"Interleaved\"\n// after\nrope_type=\"interleaved\"","handlingStrategy":"validation","validationCode":"rope_type = rope_type.strip().lower()\nassert rope_type in {\"interleaved\", \"split\"}, rope_type","typeGuard":"def is_valid_rope_type(v: str) -> TypeGuard[str]:\n    return isinstance(v, str) and v in {\"interleaved\", \"split\"}","tryCatchPattern":null,"preventionTips":["Whitelist-validate rope_type at config load","Map aliases from other repos to these two values"],"tags":["rope","enum-validation","ltx-2"],"backgroundTag":"invalid-argument-value","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}