{"record":{"id":"cd23399ec3260c76","repo":"Comfy-Org/ComfyUI","slug":"unsupported-dimensions-dims","errorCode":null,"errorMessage":"unsupported dimensions: {dims}","messagePattern":"unsupported dimensions: (.+?)","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"comfy/ldm/lightricks/vae/conv_nd_factory.py","lineNumber":72,"sourceCode":"            stride=stride,\n            padding=padding,\n            dilation=dilation,\n            groups=groups,\n            bias=bias,\n            padding_mode=spatial_padding_mode,\n        )\n    elif dims == (2, 1):\n        return DualConv3d(\n            in_channels=in_channels,\n            out_channels=out_channels,\n            kernel_size=kernel_size,\n            stride=stride,\n            padding=padding,\n            bias=bias,\n            padding_mode=spatial_padding_mode,\n        )\n    else:\n        raise ValueError(f\"unsupported dimensions: {dims}\")\n\n\ndef make_linear_nd(\n    dims: int,\n    in_channels: int,\n    out_channels: int,\n    bias=True,\n):\n    if dims == 2:\n        return ops.Conv2d(\n            in_channels=in_channels, out_channels=out_channels, kernel_size=1, bias=bias\n        )\n    elif dims == 3 or dims == (2, 1):\n        return ops.Conv3d(\n            in_channels=in_channels, out_channels=out_channels, kernel_size=1, bias=bias\n        )\n    else:\n        raise ValueError(f\"unsupported dimensions: {dims}\")","sourceCodeStart":54,"sourceCodeEnd":90,"githubUrl":"https://github.com/Comfy-Org/ComfyUI/blob/1c6d8d45b3693bfbb32385b410d813a7fd6be216/comfy/ldm/lightricks/vae/conv_nd_factory.py#L54-L90","documentation":"Raised by make_conv_nd when dims is not one of 2, 3, or the (2,1) tuple (2D spatial + 1D temporal factorization via DualConv3d). The factory dispatches on these three shapes only; any other dims value is unsupported.","triggerScenarios":"Calling make_conv_nd(dims=1) or dims=(3,1), or constructing a video VAE whose dims config field holds an unexpected value. Often dims comes from a config like \"dims\": 3 for 3D VAEs or \"dims\": [2,1] for factorized ones.","commonSituations":"Checkpoint config with a missing/renamed dims field so it resolves to None or a string; new model variants introducing other factorizations; passing a list where the code expects int or (2,1).","solutions":["Pass dims=2 (2D), dims=3 (full 3D), or dims=(2,1) (2D+time factorized)","Verify the checkpoint config's dims entry and its type before building the VAE","Update ComfyUI if a newer model requires a new dims shape"],"exampleFix":"# before\nconv = make_conv_nd(dims=1, ...)\n\n# after\nconv = make_conv_nd(dims=(2, 1), ...)","handlingStrategy":"validation","validationCode":"if dims not in (2, 3, (2, 1)):\n    raise ValueError(f\"dims must be 2, 3, or (2,1), got {dims!r}\")","typeGuard":"def is_supported_dims(d) -> bool:\n    return d in (2, 3) or tuple(d) == (2, 1)","tryCatchPattern":null,"preventionTips":["Validate the dims config field before constructing the video VAE","Remember (2,1) must be a tuple/list of two ints, not a bare int"],"tags":["convolution","factory","video-vae","ltx"],"backgroundTag":null,"analyzedSha":"1c6d8d45b3693bfbb32385b410d813a7fd6be216","analyzedAt":"2026-08-14T19:37:18.893Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}