{"record":{"id":"e9bff10edbc50ab8","repo":"Comfy-Org/ComfyUI","slug":"apply-sky-clip-true-requires-a-sky-tensor-in-the-d","errorCode":null,"errorMessage":"apply_sky_clip=True requires a sky tensor in the da3_geometry input, but none is present. Run with Mono/Metric models or set apply_sky_clip=False.","messagePattern":"apply_sky_clip=True requires a sky tensor in the da3_geometry input, but none is present\\. Run with Mono/Metric models or set apply_sky_clip=False\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"comfy_extras/nodes_depth_anything_3.py","lineNumber":421,"sourceCode":"                        io.Boolean.Input(\"colored\", default=False, tooltip=\"Apply the Turbo colormap to the sky mask.\"),\n                    ]),\n                    io.DynamicCombo.Option(\"confidence\", [\n                        io.Boolean.Input(\"colored\", default=False, tooltip=\"Apply the Turbo colormap to the confidence map.\"),\n                    ]),\n                ]),\n            ],\n            outputs=[io.Image.Output()],\n        )\n\n    @classmethod\n    def execute(cls, da3_geometry, output) -> io.NodeOutput:\n        output_val = output[\"output\"]\n\n        if output_val in (\"depth\", \"depth_colored\"):\n            normalization = output[\"normalization\"]\n            apply_sky_clip = output[\"apply_sky_clip\"]\n            if apply_sky_clip and \"sky\" not in da3_geometry:\n                raise ValueError(\n                    \"apply_sky_clip=True requires a sky tensor in the da3_geometry input, but none is present. \"\n                    \"Run with Mono/Metric models or set apply_sky_clip=False.\"\n                )\n            depth = da3_geometry[\"depth\"]\n            sky = da3_geometry.get(\"sky\")\n            if apply_sky_clip and sky is not None:\n                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\"]:","sourceCodeStart":403,"sourceCodeEnd":439,"githubUrl":"https://github.com/Comfy-Org/ComfyUI/blob/1c6d8d45b3693bfbb32385b410d813a7fd6be216/comfy_extras/nodes_depth_anything_3.py#L403-L439","documentation":"DA3 geometry decode node raises this when output is 'depth'/'depth_colored' with apply_sky_clip enabled, but the da3_geometry dict contains no 'sky' key. Sky-aware clipping needs a sky-probability map, which is only produced by Mono/Metric models; geometry from other models lacks it.","triggerScenarios":"Running a Small/Base (non-sky) DA3 model upstream, then requesting depth output with apply_sky_clip=True in the output widget. The check is a simple 'sky' not in da3_geometry membership test.","commonSituations":"Reusing an output configuration tuned for a Mono model after switching to Small/Base; enabling sky clip by default in shared workflows; deep-reciprocal-driving variants that skip sky output.","solutions":["Set apply_sky_clip=False in the output input of the decode node.","Or switch the upstream DA3 model to a Mono/Metric checkpoint, whose geometry includes 'sky'."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"apply_sky_clip = output['apply_sky_clip'] and ('sky' in da3_geometry)\nif output['apply_sky_clip'] and 'sky' not in da3_geometry:\n    logging.warning('sky missing in geometry; disabling apply_sky_clip')","typeGuard":"def geometry_has_sky(geo: dict) -> bool:\n    return 'sky' in geo","tryCatchPattern":null,"preventionTips":["Treat apply_sky_clip as meaningful only when the upstream model is Mono/Metric.","Reset the output widget (including apply_sky_clip) when swapping DA3 checkpoints."],"tags":["comfyui","depth-anything-3","optional-output","validation"],"backgroundTag":null,"analyzedSha":"1c6d8d45b3693bfbb32385b410d813a7fd6be216","analyzedAt":"2026-08-14T19:37:18.893Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}