{"record":{"id":"d12507668ba273f7","repo":"Comfy-Org/ComfyUI","slug":"da3-geometry-has-no-confidence-output-run-with-sm","errorCode":null,"errorMessage":"da3_geometry has no confidence output; run with Small/Base models.","messagePattern":"da3_geometry has no confidence output; run with Small/Base models\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"comfy_extras/nodes_depth_anything_3.py","lineNumber":446,"sourceCode":"                depth = torch.stack([\n                    da3_preprocess.apply_sky_aware_clip(depth[i], sky[i])\n                    for i in range(depth.shape[0])\n                ], dim=0)\n            grey = cls._depth_to_image(depth, sky, normalization)  # (B,H,W,3) greyscale\n            result = _turbo(grey[..., 0]) if output_val == \"depth_colored\" else grey\n\n        elif output_val == \"sky_mask\":\n            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([","sourceCodeStart":428,"sourceCodeEnd":464,"githubUrl":"https://github.com/Comfy-Org/ComfyUI/blob/1c6d8d45b3693bfbb32385b410d813a7fd6be216/comfy_extras/nodes_depth_anything_3.py#L428-L464","documentation":"DA3 geometry decode node raises this when output='confidence' is requested but the geometry dict lacks a 'confidence' key. Confidence maps are produced by Small/Base DA3 models; Mono/Metric geometry does not include one.","triggerScenarios":"Selecting 'confidence' output while the upstream model is Mono/Metric (no confidence key in the geometry dict).","commonSituations":"Checkpoint swap from Base to Mono without changing the output widget; mixing confidence-based workflows (designed for Small/Base) with a Mono model.","solutions":["Switch the output to 'depth'/'depth_colored'/'sky_mask' for Mono/Metric models.","Or load a Small/Base DA3 model to get confidence maps."],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":"if output_val == 'confidence' and 'confidence' not in da3_geometry:\n    raise ValueError('this model has no confidence output; use depth or sky_mask instead')","typeGuard":"def geometry_has_confidence(geo: dict) -> bool:\n    return 'confidence' in geo","tryCatchPattern":null,"preventionTips":["Confidence output exists only for Small/Base models; verify the key exists first.","Keep per-model output presets so the dropdown always matches the checkpoint."],"tags":["comfyui","depth-anything-3","optional-output","confidence"],"backgroundTag":null,"analyzedSha":"1c6d8d45b3693bfbb32385b410d813a7fd6be216","analyzedAt":"2026-08-14T19:37:18.893Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}