{"record":{"id":"b6a2eac8a7ad22a4","repo":"Comfy-Org/ComfyUI","slug":"attention-type-attn-type-value-is-not-supported","errorCode":null,"errorMessage":"Attention type {attn_type.value} is not supported yet.","messagePattern":"Attention type (.+?) is not supported yet\\.","errorType":"validation","errorClass":"NotImplementedError","httpStatus":null,"severity":"error","filePath":"comfy/ldm/lightricks/vae/causal_audio_autoencoder.py","lineNumber":413,"sourceCode":"        return x + h_\n\n\ndef make_attn(in_channels, attn_type=\"vanilla\", norm_type=\"group\"):\n    # Convert string to enum if needed\n    attn_type = AttentionType.str_to_enum(attn_type)\n\n    if attn_type != AttentionType.NONE:\n        logging.info(f\"making attention of type '{attn_type.value}' with {in_channels} in_channels\")\n    else:\n        logging.info(f\"making identity attention with {in_channels} in_channels\")\n\n    match attn_type:\n        case AttentionType.VANILLA:\n            return AttnBlock(in_channels, norm_type=norm_type)\n        case AttentionType.NONE:\n            return nn.Identity(in_channels)\n        case AttentionType.LINEAR:\n            raise NotImplementedError(f\"Attention type {attn_type.value} is not supported yet.\")\n        case _:\n            raise ValueError(f\"Unknown attention type: {attn_type}\")\n\n\nclass Encoder(nn.Module):\n    def __init__(\n        self,\n        *,\n        ch,\n        out_ch,\n        ch_mult=(1, 2, 4, 8),\n        num_res_blocks,\n        attn_resolutions,\n        dropout=0.0,\n        resamp_with_conv=True,\n        in_channels,\n        resolution,\n        z_channels,","sourceCodeStart":395,"sourceCodeEnd":431,"githubUrl":"https://github.com/Comfy-Org/ComfyUI/blob/1c6d8d45b3693bfbb32385b410d813a7fd6be216/comfy/ldm/lightricks/vae/causal_audio_autoencoder.py#L395-L431","documentation":"Raised by make_attention when attn_type is AttentionType.LINEAR: the enum value is defined but the linear-attention implementation was never ported into this ComfyUI copy of the lightricks audio autoencoder. It is a NotImplementedError, not a config typo — the code path simply does not exist.","triggerScenarios":"Calling make_attention(in_channels, attn_type=AttentionType.LINEAR) or building an Encoder whose config sets attention_type='linear' at any attention resolution.","commonSituations":"Loading a checkpoint trained with linear attention from the upstream lightricks repo; configs copied from LTX video/audio model configs that use linear attention to save compute.","solutions":["Use AttentionType.VANILLA for standard attention blocks","Use AttentionType.NONE for identity attention if attention is not needed at that resolution","Remove 'linear' from the attention_type config entries before constructing the Encoder"],"exampleFix":"# before\nattn = make_attention(ch, attn_type=AttentionType.LINEAR)\n\n# after\nattn = make_attention(ch, attn_type=AttentionType.VANILLA)","handlingStrategy":"validation","validationCode":"if attn_type is AttentionType.LINEAR:\n    raise ValueError(\"linear attention is not implemented; use vanilla or none\")","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Filter 'linear' out of attention_type configs before constructing the audio VAE","Check the supported attention types for your ComfyUI version when using lightricks checkpoints"],"tags":["attention","not-implemented","audio-vae"],"backgroundTag":null,"analyzedSha":"1c6d8d45b3693bfbb32385b410d813a7fd6be216","analyzedAt":"2026-08-14T19:37:18.893Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}