{"record":{"id":"4199d23d361d0abd","repo":"Comfy-Org/ComfyUI","slug":"unknown-output-mode-output-val","errorCode":null,"errorMessage":"Unknown output mode: {output_val}","messagePattern":"Unknown output mode: (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"comfy_extras/nodes_depth_anything_3.py","lineNumber":454,"sourceCode":"            if \"sky\" not in da3_geometry:\n                raise ValueError(\"geometry has no sky output; run with Mono/Metric models.\")\n            sky = da3_geometry[\"sky\"]\n            if output[\"colored\"]:\n                result = _turbo(sky)\n            else:\n                result = sky.unsqueeze(-1).expand(*sky.shape, 3).contiguous()\n\n        elif output_val == \"confidence\":\n            if \"confidence\" not in da3_geometry:\n                raise ValueError(\"da3_geometry has no confidence output; run with Small/Base models.\")\n            conf = _normalize_confidence(da3_geometry[\"confidence\"])\n            if output[\"colored\"]:\n                result = _turbo(conf)\n            else:\n                result = conf.unsqueeze(-1).expand(*conf.shape, 3).contiguous()\n\n        else:\n            raise ValueError(f\"Unknown output mode: {output_val}\")\n\n        return io.NodeOutput(result.float())\n\n    @staticmethod\n    def _depth_to_image(depth: torch.Tensor, sky_for_norm: torch.Tensor | None, normalization: str) -> torch.Tensor:\n        \"\"\"Normalise depth and pack as an (B,H,W,3) image tensor.\"\"\"\n\n        N = depth.shape[0]\n        if normalization == \"v2_style\":\n            norm = torch.stack([\n                da3_preprocess.normalize_depth_v2_style(\n                    depth[i], sky_for_norm[i] if sky_for_norm is not None else None)\n                for i in range(N)\n            ], dim=0)\n        elif normalization == \"min_max\":\n            norm = da3_preprocess.normalize_depth_min_max(depth)\n        else:\n            norm = depth","sourceCodeStart":436,"sourceCodeEnd":472,"githubUrl":"https://github.com/Comfy-Org/ComfyUI/blob/1c6d8d45b3693bfbb32385b410d813a7fd6be216/comfy_extras/nodes_depth_anything_3.py#L436-L472","documentation":"DA3 geometry decode node raises this when the output widget value is none of 'depth', 'depth_colored', 'sky_mask', 'confidence'. Like error 860 it guards the input enum: the if/elif chain falls through to the else branch.","triggerScenarios":"A workflow JSON or programmatic prompt carrying an output value outside the supported set (typos like 'depth_colour', stale values removed in a version bump, or freeform strings from scripts).","commonSituations":"Hand-edited workflows; workflows from older/newer ComfyUI versions where the enum changed; automation scripts injecting raw output strings.","solutions":["Set output to one of: 'depth', 'depth_colored', 'sky_mask', 'confidence'.","Re-pick the value from the node's dropdown in the UI and re-save the workflow.","If loading an old workflow, re-add the node fresh instead of editing JSON."],"exampleFix":"// before\n\"output\": {\"output\": \"depth_colour\", ...}\n// after\n\"output\": {\"output\": \"depth_colored\", ...}","handlingStrategy":"validation","validationCode":"VALID_OUTPUTS = {'depth', 'depth_colored', 'sky_mask', 'confidence'}\nassert output_val in VALID_OUTPUTS, f'output must be one of {sorted(VALID_OUTPUTS)}, got {output_val!r}'","typeGuard":"def is_valid_da3_output(v: str) -> bool:\n    return v in {'depth', 'depth_colored', 'sky_mask', 'confidence'}","tryCatchPattern":null,"preventionTips":["Select output values from the dropdown; avoid editing them in raw workflow JSON.","After version updates, re-add changed nodes instead of reusing old JSON enum values."],"tags":["comfyui","node-input","enum-validation","depth-anything-3"],"backgroundTag":null,"analyzedSha":"1c6d8d45b3693bfbb32385b410d813a7fd6be216","analyzedAt":"2026-08-14T19:37:18.893Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}