{"record":{"id":"bf45a622f9181e27","repo":"sgl-project/sglang","slug":"unsupported-ltx-2-3-encoder-block-block-name","errorCode":null,"errorMessage":"Unsupported LTX-2.3 encoder block: {block_name}","messagePattern":"Unsupported LTX-2\\.3 encoder block: (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/sglang/multimodal_gen/runtime/models/vaes/ltx_2_3_condition_encoder.py","lineNumber":103,"sourceCode":"    if block_name == \"res_x\":\n        return (\n            LTX23VideoResBlockStack(\n                channels=in_channels,\n                num_layers=int(block_config[\"num_layers\"]),\n                spatial_padding_mode=spatial_padding_mode,\n            ),\n            in_channels,\n        )\n\n    multiplier = int(block_config.get(\"multiplier\", 2))\n    stride_map = {\n        \"compress_space_res\": (1, 2, 2),\n        \"compress_time_res\": (2, 1, 1),\n        \"compress_all_res\": (2, 2, 2),\n    }\n    stride = stride_map.get(block_name)\n    if stride is None:\n        raise ValueError(f\"Unsupported LTX-2.3 encoder block: {block_name}\")\n    out_channels = in_channels * multiplier\n    return (\n        LTXVideoDownsampler3d(\n            in_channels=in_channels,\n            out_channels=out_channels,\n            stride=stride,\n            spatial_padding_mode=spatial_padding_mode,\n        ),\n        out_channels,\n    )\n\n\nclass LTX23VideoConditionEncoder(nn.Module, LayerwiseOffloadableModuleMixin):\n    layerwise_offload_dit_group_enabled = False\n    layer_names = [\"down_blocks\"]\n\n    def __init__(self, config: dict[str, Any]) -> None:\n        super().__init__()","sourceCodeStart":85,"sourceCodeEnd":121,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/multimodal_gen/runtime/models/vaes/ltx_2_3_condition_encoder.py#L85-L121","documentation":"_make_ltx23_encoder_block maps known LTX-2.3 encoder block names (stride_map keys such as compress_none, compress_space_res, compress_time_res, compress_all_res variants) to downsampler strides. An unknown block_name in the config yields None from the dict lookup and raises this ValueError.","triggerScenarios":"Building the LTX-2.3 condition encoder with a block_list containing a block name not present in stride_map — e.g. typos like 'compress_spatial_res', names from a different LTX version, or blocks introduced by a newer config schema than this code supports.","commonSituations":"Loading an LTX-2.3 checkpoint from a newer/older release with renamed block identifiers; hand-writing the encoder block list; configs generated by external conversion scripts that emit diffusers-style names.","solutions":["Print/inspect stride_map in ltx_2_3_condition_encoder.py and use exactly those block names in block_list","Use the config shipped with the official LTX-2.3 checkpoint you are loading","If your sglang version is older than the checkpoint format, upgrade sglang so stride_map includes the new block names"],"exampleFix":"// before\n\"block_list\": [\"compress_none\", \"compress_spatial_res\"]\n\n// after\n\"block_list\": [\"compress_none\", \"compress_space_res\"]","handlingStrategy":"validation","validationCode":"from sglang.multimodal_gen.runtime.models.vaes.ltx_2_3_condition_encoder import _make_ltx23_encoder_block  # or replicate stride_map\n# validate names against the module's stride_map keys\nvalid = {'compress_none', 'compress_space_res', 'compress_time_res', 'compress_all_res'}  # inspect actual stride_map in your version\nassert set(block_list) <= valid, f'unknown block names: {set(block_list) - valid}'","typeGuard":"def is_valid_block_list(blocks: list, valid: set) -> bool:\n    return all(b in valid for b in blocks)","tryCatchPattern":null,"preventionTips":["Copy block_list verbatim from the official LTX-2.3 checkpoint config","After upgrading checkpoints, upgrade sglang in step so stride_map covers new names","Add a config lint step that diffs block names against stride_map keys"],"tags":["python","value-error","model-config","ltx-2-3","encoder-block"],"backgroundTag":"unsupported-config-option","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}