Comfy-Org/ComfyUI · error · ValueError

da3_geometry has no confidence output; run with Small/Base m

Error message

da3_geometry has no confidence output; run with Small/Base models.

What it means

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.

Source

Thrown at comfy_extras/nodes_depth_anything_3.py:446

                depth = torch.stack([
                    da3_preprocess.apply_sky_aware_clip(depth[i], sky[i])
                    for i in range(depth.shape[0])
                ], dim=0)
            grey = cls._depth_to_image(depth, sky, normalization)  # (B,H,W,3) greyscale
            result = _turbo(grey[..., 0]) if output_val == "depth_colored" else grey

        elif output_val == "sky_mask":
            if "sky" not in da3_geometry:
                raise ValueError("geometry has no sky output; run with Mono/Metric models.")
            sky = da3_geometry["sky"]
            if output["colored"]:
                result = _turbo(sky)
            else:
                result = sky.unsqueeze(-1).expand(*sky.shape, 3).contiguous()

        elif output_val == "confidence":
            if "confidence" not in da3_geometry:
                raise ValueError("da3_geometry has no confidence output; run with Small/Base models.")
            conf = _normalize_confidence(da3_geometry["confidence"])
            if output["colored"]:
                result = _turbo(conf)
            else:
                result = conf.unsqueeze(-1).expand(*conf.shape, 3).contiguous()

        else:
            raise ValueError(f"Unknown output mode: {output_val}")

        return io.NodeOutput(result.float())

    @staticmethod
    def _depth_to_image(depth: torch.Tensor, sky_for_norm: torch.Tensor | None, normalization: str) -> torch.Tensor:
        """Normalise depth and pack as an (B,H,W,3) image tensor."""

        N = depth.shape[0]
        if normalization == "v2_style":
            norm = torch.stack([

View on GitHub (pinned to 1c6d8d45b3)

Solutions

  1. Switch the output to 'depth'/'depth_colored'/'sky_mask' for Mono/Metric models.
  2. Or load a Small/Base DA3 model to get confidence maps.
Defensive patterns

Strategy: type-guard

Validate before calling

if output_val == 'confidence' and 'confidence' not in da3_geometry:
    raise ValueError('this model has no confidence output; use depth or sky_mask instead')

Type guard

def geometry_has_confidence(geo: dict) -> bool:
    return 'confidence' in geo

Prevention

When it happens

Trigger: Selecting 'confidence' output while the upstream model is Mono/Metric (no confidence key in the geometry dict).

Common situations: Checkpoint swap from Base to Mono without changing the output widget; mixing confidence-based workflows (designed for Small/Base) with a Mono model.

Related errors


AI-assisted analysis of Comfy-Org/ComfyUI@1c6d8d45b3 (2026-08-14). Data as JSON: /api/errors/d12507668ba273f7. Report an issue: GitHub.