Comfy-Org/ComfyUI · error · ValueError

moge_geometry has no points output.

Error message

moge_geometry has no points output.

What it means

Mesh extraction triangulates the 3D point cloud stored under moge_geometry['points']; without it there is no geometry to mesh. The node fails fast rather than attempting triangulation on a partial dict.

Source

Thrown at comfy_extras/nodes_moge.py:360

            inputs=[
                MoGeGeometry.Input("moge_geometry"),
                io.Int.Input("batch_index", default=0, min=0, max=4096,
                             tooltip="Which image of a batched MoGe geometry to mesh. Per-image vertex counts "
                                     "differ, so batches can't be stacked into a single MESH."),
                io.Int.Input("decimation", default=1, min=1, max=8,
                             tooltip="Vertex stride; 1 = full resolution."),
                io.Float.Input("discontinuity_threshold", default=0.04, min=0.0, max=1.0, step=0.01,
                               tooltip="Drop pixels whose 3x3 depth span exceeds this fraction. 0 = off."),
                io.Boolean.Input("texture", default=True,
                                 tooltip="Carry the source image through as the baseColor texture."),
            ],
            outputs=[io.Mesh.Output()],
        )

    @classmethod
    def execute(cls, moge_geometry, batch_index, decimation, discontinuity_threshold, texture) -> io.NodeOutput:
        if "points" not in moge_geometry:
            raise ValueError("moge_geometry has no points output.")
        points = moge_geometry["points"]
        B = points.shape[0]
        if batch_index >= B:
            raise ValueError(f"batch_index {batch_index} out of range; moge_geometry has batch size {B}.")

        # Pass depth so the rtol edge check sees radial depth -- for panoramas
        # points[..., 2] = cos(phi)*r goes negative below the equator and the rtol clamp would drop the bottom half.
        edge_depth = moge_geometry["depth"][batch_index] if "depth" in moge_geometry else None
        verts, faces, uvs = triangulate_grid_mesh(
            points[batch_index], decimation=decimation,
            discontinuity_threshold=discontinuity_threshold, depth=edge_depth,
        )
        if verts.shape[0] == 0 or faces.shape[0] == 0:
            raise ValueError("MoGe produced an empty mesh; try discontinuity_threshold=0 or apply_mask=False.")

        if "intrinsics" not in moge_geometry:
            # Panorama: rotate MoGe spherical (Z up) -> glTF (Y up, Z back), correct for inside-the-sphere viewing)
            verts = verts[:, [1, 2, 0]].contiguous()

View on GitHub (pinned to 1c6d8d45b3)

Solutions

  1. Run MoGe inference with points enabled so 'points' is in the geometry dict.
  2. Verify 'points' in moge_geometry before the mesh node in the graph.
  3. If only depth exists, re-run inference — depth alone cannot be triangulated by this node.
Defensive patterns

Strategy: validation

Validate before calling

if 'points' not in moge_geometry:
    raise UserFacingError('re-run inference with points enabled')

Type guard

def geometry_has_points(geo) -> bool:
    return 'points' in geo

Prevention

When it happens

Trigger: Feeding a geometry dict from a depth-only or normals-only MoGe run into the mesh-export node.

Common situations: Mesh workflows wired to inference nodes configured without point output; reusing saved geometry between node versions.

Related errors


AI-assisted analysis of Comfy-Org/ComfyUI@1c6d8d45b3 (2026-08-14). Data as JSON: /api/errors/f5b7df8cc3fdf38b. Report an issue: GitHub.