Comfy-Org/ComfyUI · error · ValueError
moge_geometry has no depth output.
Error message
moge_geometry has no depth output.
What it means
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.
Source
Thrown at comfy_extras/nodes_moge.py:291
description="Render a depth map or normal map from geometry data",
category="image/geometry estimation",
inputs=[
MoGeGeometry.Input("moge_geometry"),
io.Combo.Input("output", options=["depth", "depth_colored", "normal_opengl", "normal_directx", "mask"], default="depth",
tooltip="DirectX vs OpenGL controls the normal-map green-channel convention. DirectX: green = -Y down (Unreal). OpenGL: green = +Y up (Blender, Substance, Unity, glTF)."),
],
outputs=[io.Image.Output()],
)
@classmethod
def execute(cls, moge_geometry, output) -> io.NodeOutput:
is_normal = output in ("normal_directx", "normal_opengl")
opengl = output.endswith("_opengl")
# Pick the input tensor for the chosen mode and validate availability.
if output in ("depth", "depth_colored"):
if "depth" not in moge_geometry:
raise ValueError("moge_geometry has no depth output.")
src = moge_geometry["depth"]
elif is_normal:
if "normal" in moge_geometry:
src = moge_geometry["normal"]
elif "points" in moge_geometry:
src = moge_geometry["points"]
else:
raise ValueError("moge_geometry has neither normals nor points to derive normals from.")
elif output == "mask":
if "mask" not in moge_geometry:
raise ValueError("moge_geometry has no mask output.")
src = moge_geometry["mask"]
else:
raise ValueError(f"Unknown output mode: {output}")
B = src.shape[0]
pbar = comfy.utils.ProgressBar(B)
out: list[torch.Tensor] = []View on GitHub (pinned to 1c6d8d45b3)
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.
Example fix
// before out = MoGeRender.execute(geo, output="depth") # geo lacks 'depth' // after out = MoGeRender.execute(geo, output="normal") # or re-run inference with depth enabled
Defensive patterns
Strategy: validation
Validate before calling
if output in ('depth', 'depth_colored') and 'depth' not in moge_geometry:
raise UserFacingError('re-run inference with depth enabled') Type guard
def geometry_has(geo, key: str) -> bool:
return key in geo Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- moge_geometry has neither normals nor points to derive norma
- moge_geometry has no mask output.
- Unknown output mode: {output}
- moge_geometry has no points output.
- MoGePanoramaInference takes a single image (got batch of {im
AI-assisted analysis of Comfy-Org/ComfyUI@1c6d8d45b3 (2026-08-14).
Data as JSON: /api/errors/c1066444bc7b5672.
Report an issue: GitHub.