{"record":{"id":"777acb7d1502ab84","repo":"Comfy-Org/ComfyUI","slug":"moge-geometry-has-neither-normals-nor-points-to-de","errorCode":null,"errorMessage":"moge_geometry has neither normals nor points to derive normals from.","messagePattern":"moge_geometry has neither normals nor points to derive normals from\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"comfy_extras/nodes_moge.py","lineNumber":299,"sourceCode":"        )\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] = []\n        with tqdm(total=B, desc=f\"MoGe render: {output}\") as tq:\n            for i in range(B):\n                slc = src[i:i + 1].float()\n                if output in (\"depth\", \"depth_colored\"):\n                    d = _normalize_disparity(slc)\n                    out.append(_turbo(d) if output == \"depth_colored\"\n                               else d.unsqueeze(-1).expand(*d.shape, 3).contiguous())\n                elif is_normal:","sourceCodeStart":281,"sourceCodeEnd":317,"githubUrl":"https://github.com/Comfy-Org/ComfyUI/blob/1c6d8d45b3693bfbb32385b410d813a7fd6be216/comfy_extras/nodes_moge.py#L281-L317","documentation":"For normal rendering, the node needs either a precomputed 'normal' tensor or a 'points' cloud to derive normals from. If moge_geometry contains neither key, normal generation is impossible and the node reports which inputs are missing.","triggerScenarios":"output='normal_directx' or 'normal_opengl' on a geometry dict produced by an inference mode that stored only depth/mask.","commonSituations":"Depth-only MoGe runs feeding a normals renderer; downstream nodes assuming normals are always available.","solutions":["Re-run inference with points or normals enabled in the geometry output.","Render a mode the geometry supports (depth, mask) instead of normals.","Pre-check: any(k in moge_geometry for k in ('normal', 'points')) before choosing a normal mode."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"if output.startswith('normal') and not ({'normal', 'points'} & set(moge_geometry)):\n    raise UserFacingError('geometry lacks normals and points')","typeGuard":"def can_render_normals(geo) -> bool:\n    return 'normal' in geo or 'points' in geo","tryCatchPattern":null,"preventionTips":["Run inference with points or normals enabled.","Check for 'normal'/'points' keys before selecting normal modes.","Keep inference and render mode configuration in sync."],"tags":["moge","normals","dict-keys","render"],"backgroundTag":null,"analyzedSha":"1c6d8d45b3693bfbb32385b410d813a7fd6be216","analyzedAt":"2026-08-14T19:37:18.893Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}