{"record":{"id":"c1066444bc7b5672","repo":"Comfy-Org/ComfyUI","slug":"moge-geometry-has-no-depth-output","errorCode":null,"errorMessage":"moge_geometry has no depth output.","messagePattern":"moge_geometry has no depth output\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"comfy_extras/nodes_moge.py","lineNumber":291,"sourceCode":"            description=\"Render a depth map or normal map from geometry data\",\n            category=\"image/geometry estimation\",\n            inputs=[\n                MoGeGeometry.Input(\"moge_geometry\"),\n                io.Combo.Input(\"output\", options=[\"depth\", \"depth_colored\", \"normal_opengl\", \"normal_directx\", \"mask\"], default=\"depth\",\n                    tooltip=\"DirectX vs OpenGL controls the normal-map green-channel convention. DirectX: green = -Y down (Unreal). OpenGL: green = +Y up (Blender, Substance, Unity, glTF).\"),\n            ],\n            outputs=[io.Image.Output()],\n        )\n\n    @classmethod\n    def execute(cls, moge_geometry, output) -> io.NodeOutput:\n        is_normal = output in (\"normal_directx\", \"normal_opengl\")\n        opengl = output.endswith(\"_opengl\")\n\n        # Pick the input tensor for the chosen mode and validate availability.\n        if output in (\"depth\", \"depth_colored\"):\n            if \"depth\" not in moge_geometry:\n                raise ValueError(\"moge_geometry has no depth output.\")\n            src = moge_geometry[\"depth\"]\n        elif is_normal:\n            if \"normal\" in moge_geometry:\n                src = moge_geometry[\"normal\"]\n            elif \"points\" in moge_geometry:\n                src = moge_geometry[\"points\"]\n            else:\n                raise ValueError(\"moge_geometry has neither normals nor points to derive normals from.\")\n        elif output == \"mask\":\n            if \"mask\" not in moge_geometry:\n                raise ValueError(\"moge_geometry has no mask output.\")\n            src = moge_geometry[\"mask\"]\n        else:\n            raise ValueError(f\"Unknown output mode: {output}\")\n\n        B = src.shape[0]\n        pbar = comfy.utils.ProgressBar(B)\n        out: list[torch.Tensor] = []","sourceCodeStart":273,"sourceCodeEnd":309,"githubUrl":"https://github.com/Comfy-Org/ComfyUI/blob/1c6d8d45b3693bfbb32385b410d813a7fd6be216/comfy_extras/nodes_moge.py#L273-L309","documentation":"The MoGe render node treats moge_geometry as a dict of available outputs; requesting 'depth' or 'depth_colored' requires the 'depth' key to exist. An inference run configured to not produce depth (or a geometry dict from a source that only emits points/normals) triggers this check.","triggerScenarios":"Calling the render node with output='depth' on a moge_geometry dict produced by an inference node run without depth output, or a hand-assembled dict missing the 'depth' key.","commonSituations":"Switching the render node's output combo after the inference node was configured for normals-only; chaining two render nodes off a geometry that lacks depth.","solutions":["Re-run MoGe inference with depth output enabled so 'depth' is present in moge_geometry.","Switch the render node's output to a mode the geometry actually contains (points, normal, mask).","Inspect the dict keys ('depth', 'points', 'normal', 'mask') before selecting the render mode."],"exampleFix":"// before\nout = MoGeRender.execute(geo, output=\"depth\")     # geo lacks 'depth'\n\n// after\nout = MoGeRender.execute(geo, output=\"normal\")    # or re-run inference with depth enabled","handlingStrategy":"validation","validationCode":"if output in ('depth', 'depth_colored') and 'depth' not in moge_geometry:\n    raise UserFacingError('re-run inference with depth enabled')","typeGuard":"def geometry_has(geo, key: str) -> bool:\n    return key in geo","tryCatchPattern":null,"preventionTips":["Match the render mode to the keys present in moge_geometry.","Enable depth at inference time when depth rendering is needed.","Inspect dict keys before choosing output."],"tags":["moge","depth","dict-keys","render"],"backgroundTag":null,"analyzedSha":"1c6d8d45b3693bfbb32385b410d813a7fd6be216","analyzedAt":"2026-08-14T19:37:18.893Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}