Comfy-Org/ComfyUI · error · ValueError
Unknown output mode: {output_val}
Error message
Unknown output mode: {output_val} What it means
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.
Source
Thrown at comfy_extras/nodes_depth_anything_3.py:454
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([
da3_preprocess.normalize_depth_v2_style(
depth[i], sky_for_norm[i] if sky_for_norm is not None else None)
for i in range(N)
], dim=0)
elif normalization == "min_max":
norm = da3_preprocess.normalize_depth_min_max(depth)
else:
norm = depthView on GitHub (pinned to 1c6d8d45b3)
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.
Example fix
// before
"output": {"output": "depth_colour", ...}
// after
"output": {"output": "depth_colored", ...} Defensive patterns
Strategy: validation
Validate before calling
VALID_OUTPUTS = {'depth', 'depth_colored', 'sky_mask', 'confidence'}
assert output_val in VALID_OUTPUTS, f'output must be one of {sorted(VALID_OUTPUTS)}, got {output_val!r}' Type guard
def is_valid_da3_output(v: str) -> bool:
return v in {'depth', 'depth_colored', 'sky_mask', 'confidence'} Prevention
- 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.
When it happens
Trigger: 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).
Common situations: Hand-edited workflows; workflows from older/newer ComfyUI versions where the enum changed; automation scripts injecting raw output strings.
Related errors
- Unknown strategy: {strategy}
- multi-view mode requires Small or Base model. The loaded mod
- pose_method='cam_dec' requires a camera decoder, but the loa
- pose_method='ray_pose' requires a DualDPT head, but the load
- apply_sky_clip=True requires a sky tensor in the da3_geometr
AI-assisted analysis of Comfy-Org/ComfyUI@1c6d8d45b3 (2026-08-14).
Data as JSON: /api/errors/4199d23d361d0abd.
Report an issue: GitHub.