sgl-project/sglang · error · ValueError
Unsupported LTX-2.3 encoder block: {block_name}
Error message
Unsupported LTX-2.3 encoder block: {block_name} What it means
_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.
Source
Thrown at python/sglang/multimodal_gen/runtime/models/vaes/ltx_2_3_condition_encoder.py:103
if block_name == "res_x":
return (
LTX23VideoResBlockStack(
channels=in_channels,
num_layers=int(block_config["num_layers"]),
spatial_padding_mode=spatial_padding_mode,
),
in_channels,
)
multiplier = int(block_config.get("multiplier", 2))
stride_map = {
"compress_space_res": (1, 2, 2),
"compress_time_res": (2, 1, 1),
"compress_all_res": (2, 2, 2),
}
stride = stride_map.get(block_name)
if stride is None:
raise ValueError(f"Unsupported LTX-2.3 encoder block: {block_name}")
out_channels = in_channels * multiplier
return (
LTXVideoDownsampler3d(
in_channels=in_channels,
out_channels=out_channels,
stride=stride,
spatial_padding_mode=spatial_padding_mode,
),
out_channels,
)
class LTX23VideoConditionEncoder(nn.Module, LayerwiseOffloadableModuleMixin):
layerwise_offload_dit_group_enabled = False
layer_names = ["down_blocks"]
def __init__(self, config: dict[str, Any]) -> None:
super().__init__()View on GitHub (pinned to 0132848349)
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
Example fix
// before "block_list": ["compress_none", "compress_spatial_res"] // after "block_list": ["compress_none", "compress_space_res"]
Defensive patterns
Strategy: validation
Validate before calling
from sglang.multimodal_gen.runtime.models.vaes.ltx_2_3_condition_encoder import _make_ltx23_encoder_block # or replicate stride_map
# validate names against the module's stride_map keys
valid = {'compress_none', 'compress_space_res', 'compress_time_res', 'compress_all_res'} # inspect actual stride_map in your version
assert set(block_list) <= valid, f'unknown block names: {set(block_list) - valid}' Type guard
def is_valid_block_list(blocks: list, valid: set) -> bool:
return all(b in valid for b in blocks) Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- Unsupported latent_log_var: {latent_log_var}
- Unsupported down_block_type: {down_block_type}
- Unsupported time_compression_ratio: {temporal_compression_ra
- Unsupported up_block_type: {up_block_type}
- Unsupported time_compression_ratio: {time_compression_ratio}
AI-assisted analysis of sgl-project/sglang@0132848349 (2026-08-28).
Data as JSON: /api/errors/bf45a622f9181e27.
Report an issue: GitHub.