Nodes/ComfyUI/Run MoGe Inference
ComfyUI Node Runs on cloud

Run MoGe Inference

The point map node that turns one photo into actual 3D geometry

By Comfy-Org·Created 4 years ago·Updated about 16 hours ago· 130,663
Run MoGe Inference
  • moge_model
  • image
  • moge_geometry
resolution_level9
fov_x_degrees0.0
batch_size4
force_projectiontrue
apply_masktrue

Most "depth" models hand you a grayscale map and call it a day. MoGe doesn't: it predicts a point map - an actual per-pixel 3D coordinate - plus depth, a mask, and camera intrinsics, all in a single forward pass. That's the difference between "I can see what's close" and "I have enough to build a mesh." This node is the workhorse of ComfyUI's native MoGe integration, and it's what you reach for when the depth map is a means to an end and the end is geometry.

How it works

MoGe (Microsoft Research + Tsinghua, CVPR 2025) runs a ViT encoder plus convolutional decoder that directly predicts an affine-invariant point map and a mask that excludes regions with undefined geometry - sky, mostly. Camera shift, focal length, and depth can all be recovered from that point map. Two checkpoints exist: moge_1_vitl_fp16 (314M params) and moge_2_vitl_normal_fp16 (331M), and v2 is the one to use - it adds metric scale (real-world units, not just "nearer than") and high-quality normal maps in the same pass.

Feed it through a Load MoGe Model node, and out comes a moge_geometry packet you can render to depth/normals or triangulate into a mesh.

The inputs that matter

  • image - one or many. It's fully batched, so a video's frames or a pile of photos all go through in one call.
  • resolution_level (0–9, default 9) - the quality dial. 9 is the default and the sensible one; drop it when you're in a hurry or short on VRAM.
  • fov_x_degrees (0–170, default 0) - the horizontal FOV of the source camera, used to unproject depth into 3D. 0 means auto-recover from the predicted points, which is usually right. Set it manually when you know the lens and auto-recovery drifts.
  • batch_size (default 4) - images per inference call. The tooltip says it plainly: lower it if you OOM on a long video or image set.
  • apply_mask (default on) - sets masked-out (sky/invalid) pixels to infinite depth so meshing culls them. Leave it on unless you specifically want raw predicted geometry everywhere.

What comes out and where it goes

moge_geometry holds points, depth, intrinsics, mask, and - with the v2 checkpoint - normal. From there: MoGeRender gives you depth/normal previews (with a DirectX vs OpenGL normal-convention toggle), and MoGePointMapToMesh triangulates it into a textured MESH for the Save 3D Model node.

Common issues

The failure you'll actually hit is garbage at the top of the frame: sky has no defined geometry, and if you disable apply_mask the mesh sprouts artifacts there. Keep the mask on. And set expectations - like every monocular method, occluded surfaces and object backsides simply don't exist in the output. It's one viewpoint, so the geometry is reference-quality, not scan-quality. If you need consistent multi-view reconstruction instead of single-image guessing, that's what the Depth Anything 3 family in this same category is for.

Categoryimage/geometry estimation

Inputs (7)

NameTypeDefaultDescription
moge_modelMOGE_MODEL
imageIMAGE
resolution_levelINT90–90 = fastest, 9 = most detail.
fov_x_degreesFLOAT0.00–170Horizontal field of view of the source camera. Sets the focal length used to unproject the depth map into 3D. 0 = auto-recover from the predicted points.
batch_sizeINT41–64Images per inference call. Lower if you OOM on a long video / image set.
force_projectionBOOLEANtrue
apply_maskBOOLEANtrueSet masked-out (sky / invalid) pixels to inf in points and depth so meshing culls them. Disable to keep the raw predicted geometry everywhere; the mask is still returned separately.

Outputs (1)

NameTypeDescription
moge_geometryMOGE_GEOMETRY