{"record":{"id":"dad1d3dc21b43117","repo":"Comfy-Org/ComfyUI","slug":"unknown-block-block-name","errorCode":null,"errorMessage":"unknown block: {block_name}","messagePattern":"unknown block: (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"comfy/ldm/lightricks/vae/causal_video_autoencoder.py","lineNumber":198,"sourceCode":"                output_channel = block_params.get(\"multiplier\", 2) * output_channel\n                block = SpaceToDepthDownsample(\n                    dims=dims,\n                    in_channels=input_channel,\n                    out_channels=output_channel,\n                    stride=(1, 2, 2),\n                    spatial_padding_mode=spatial_padding_mode,\n                )\n            elif block_name == \"compress_time_res\":\n                output_channel = block_params.get(\"multiplier\", 2) * output_channel\n                block = SpaceToDepthDownsample(\n                    dims=dims,\n                    in_channels=input_channel,\n                    out_channels=output_channel,\n                    stride=(2, 1, 1),\n                    spatial_padding_mode=spatial_padding_mode,\n                )\n            else:\n                raise ValueError(f\"unknown block: {block_name}\")\n\n            self.down_blocks.append(block)\n\n        # out\n        if norm_layer == \"group_norm\":\n            self.conv_norm_out = nn.GroupNorm(\n                num_channels=output_channel, num_groups=norm_num_groups, eps=1e-6\n            )\n        elif norm_layer == \"pixel_norm\":\n            self.conv_norm_out = PixelNorm()\n        elif norm_layer == \"layer_norm\":\n            self.conv_norm_out = LayerNorm(output_channel, eps=1e-6)\n\n        self.conv_act = nn.SiLU()\n\n        conv_out_channels = out_channels\n        if latent_log_var == \"per_channel\":\n            conv_out_channels *= 2","sourceCodeStart":180,"sourceCodeEnd":216,"githubUrl":"https://github.com/Comfy-Org/ComfyUI/blob/1c6d8d45b3693bfbb32385b410d813a7fd6be216/comfy/ldm/lightricks/vae/causal_video_autoencoder.py#L180-L216","documentation":"Raised by the causal video autoencoder Encoder when a block name in the down_blocks config is not one of the recognized names (res_block, downsample, compress_time, compress_space, compress_time_res, etc. depending on the builder). The config-driven block registry is closed; unknown names cannot be instantiated.","triggerScenarios":"Constructing Encoder with a down_blocks list containing an unrecognized dict entry, e.g. {\"name\": \"attn\"} or {\"name\": \"downsample2d\"}, or a typo like \"resblock\".","commonSituations":"Loading a new LTX-family checkpoint whose config JSON introduces a block type this ComfyUI version does not know (version skew); hand-editing video VAE configs; typos in the name field.","solutions":["Compare the block name against the elif chain in the Encoder builder and fix typos (e.g. 'res_block', 'downsample', 'compress_time')","Update ComfyUI to a version that supports the new block type","Remove or replace the unsupported block entry in the config"],"exampleFix":"# before\ndown_blocks = [{\"block\": [{\"name\": \"resblock\"}]}]\n\n# after\ndown_blocks = [{\"block\": [{\"name\": \"res_block\"}]}]","handlingStrategy":"validation","validationCode":"KNOWN_DOWN = {\"res_block\", \"downsample\", \"compress_time\", \"compress_space\", \"compress_time_res\"}\nfor lvl in config[\"down_blocks\"]:\n    for blk in lvl[\"block\"]:\n        if blk[\"name\"] not in KNOWN_DOWN:\n            raise ValueError(f\"unsupported down block {blk['name']!r}; supported: {sorted(KNOWN_DOWN)}\")","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Validate block names against the builder's known set before constructing the Encoder","Keep ComfyUI updated when loading new LTX-family checkpoints","Treat unknown block names in configs as version-skew signals, not silent skips"],"tags":["config","encoder","video-vae","ltx"],"backgroundTag":null,"analyzedSha":"1c6d8d45b3693bfbb32385b410d813a7fd6be216","analyzedAt":"2026-08-14T19:37:18.893Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}