{"record":{"id":"54a5bb3203cca800","repo":"Comfy-Org/ComfyUI","slug":"unsupported-nerf-final-head-type-params-nerf-fina","errorCode":null,"errorMessage":"Unsupported nerf_final_head_type {params.nerf_final_head_type}","messagePattern":"Unsupported nerf_final_head_type (.+?)","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"critical","filePath":"comfy/ldm/chroma_radiance/model.py","lineNumber":158,"sourceCode":"        if params.nerf_final_head_type == \"linear\":\n            self.nerf_final_layer = NerfFinalLayer(\n                params.nerf_hidden_size,\n                out_channels=params.in_channels,\n                dtype=dtype,\n                device=device,\n                operations=operations,\n            )\n        elif params.nerf_final_head_type == \"conv\":\n            self.nerf_final_layer_conv = NerfFinalLayerConv(\n                params.nerf_hidden_size,\n                out_channels=params.in_channels,\n                dtype=dtype,\n                device=device,\n                operations=operations,\n            )\n        else:\n            errstr = f\"Unsupported nerf_final_head_type {params.nerf_final_head_type}\"\n            raise ValueError(errstr)\n\n        self.skip_mmdit = []\n        self.skip_dit = []\n        self.lite = False\n\n        if params.use_x0:\n            self.register_buffer(\"__x0__\", torch.tensor([]))\n\n        if params.use_sequential_txt_ids:\n            self.register_buffer(\"__sequential__\", torch.tensor([]))\n\n    @property\n    def _nerf_final_layer(self) -> nn.Module:\n        if self.params.nerf_final_head_type == \"linear\":\n            return self.nerf_final_layer\n        if self.params.nerf_final_head_type == \"conv\":\n            return self.nerf_final_layer_conv\n        # Impossible to get here as we raise an error on unexpected types on initialization.","sourceCodeStart":140,"sourceCodeEnd":176,"githubUrl":"https://github.com/Comfy-Org/ComfyUI/blob/1c6d8d45b3693bfbb32385b410d813a7fd6be216/comfy/ldm/chroma_radiance/model.py#L140-L176","documentation":"ChromaRadiance builds its final NeRF head based on params.nerf_final_head_type: a linear-head variant ('linear'/default branch) or a convolutional head ('conv', NerfFinalLayerConv). Any other string reaches the else-branch and raises ValueError with the offending value. This is a construction-time config validation: the radiance final-layer architecture is a closed set.","triggerScenarios":"Constructing ChromaRadiance with nerf_final_head_type set to something other than the two supported values, e.g. 'conv3d', 'upsample', or an empty string, usually via kwargs from a custom config or a transformer_options override path that constructs new params.","commonSituations":"Community radiance checkpoints with experimental head types unsupported by this ComfyUI version; editing the radiance config to try different decoders; typo in a custom loader ('Conv' vs 'conv').","solutions":["Set nerf_final_head_type to 'linear' or 'conv' exactly (lowercase)","If the checkpoint requires another head type, update ComfyUI to a version that supports it","Check the checkpoint's stored params for the head type instead of guessing; do not override it in options"],"exampleFix":"# before\nChromaRadiance(nerf_final_head_type=\"Conv\", ...)  # capital C -> raises\n\n# after\nChromaRadiance(nerf_final_head_type=\"conv\", ...)","handlingStrategy":"validation","validationCode":"SUPPORTED_HEADS = {\"linear\", \"conv\"}\nif config.get(\"nerf_final_head_type\") not in SUPPORTED_HEADS:\n    config[\"nerf_final_head_type\"] = \"linear\"","typeGuard":"def is_supported_nerf_head(t: str) -> bool:\n    return t in {\"linear\", \"conv\"}","tryCatchPattern":null,"preventionTips":["Use the checkpoint's stored nerf_final_head_type unchanged","Keep the value lowercase and from the closed set"],"tags":["chroma-radiance","nerf","config","model-init"],"backgroundTag":null,"analyzedSha":"1c6d8d45b3693bfbb32385b410d813a7fd6be216","analyzedAt":"2026-08-14T19:37:18.893Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}