Nodes/ComfyUI-MoGe2/MoGe2 Process
ComfyUI Node

MoGe2 Process

MoGe2 Process

By zade23·Created about a year ago·Updated 6 months ago· 22
MoGe2 Process
  • image
  • depth
  • normal
  • glb_path
modelv2
max_size800
resolution_levelHigh
remove_edgetrue
apply_masktrue
output_glbtrue
filename_prefix3D/MoGe

MoGe2 Process is the single node in zade23's ComfyUI-MoGe2 pack, and it does the thing most depth nodes don't: it hands you an actual 3D model. Feed it any image and it runs Microsoft Research's MoGe2 geometry estimator, then returns a depth map, a normal map, and a fully textured .glb mesh you can drop into Blender, a viewer, or a game engine. No multi-view passes, no orbiting video of the subject, no API. One image in, a mesh out.

If you've followed depth-estimation talk at all, MoGe is the odd one out in the lineup. Where Depth Anything and Marigold give you a map you then condition on, MoGe predicts an affine-invariant point map - per-pixel 3D coordinates - plus a validity mask that excludes geometry-less regions like sky. From that it derives depth, camera focal length, and an actual mesh. It's the model you reach for when you need real geometry rather than a conditioning signal. Kijai's ComfyUI-MoGe wrapped the v1 model; this pack is the v2 update, and the headline difference is that v2 adds a normal head - so you get normals out of the box instead of a black placeholder.

How it works

Mechanically it's straightforward under the hood: the image goes into a DINOv2 encoder plus conv decoder, which predicts the point map, the mask, and (on v2) normals. The node runs utils3d's image-mesh routine over the point cloud, then trimesh writes a .glb with your input image baked in as the base-color texture. The depth output is normalized and inverted so closer = brighter (white is close, black is far); masked-out regions - sky, uncertain edges - stay black.

The weights aren't bundled with the pack. On first run the node auto-downloads model.pt from HuggingFace into the standard HF cache (Ruicheng/moge-vitl for v1, Ruicheng/moge-2-vitl-normal for v2). Your first queue is slow and then it's cached.

The inputs that matter

Eight inputs, but you'll actually touch four:

  • model - v1 or v2. Pick v2. v1 has no normal head, so its normal output is a black image; the README says so in plain terms.
  • max_size - caps the longer image side (default 800). Bigger means more detail and more VRAM. This is your memory dial.
  • resolution_level - Low / Medium / High / Ultra, default High. It maps to how many base ViT tokens the model uses, which is the real quality dial. Ultra is dramatically slower and heavier; reach for it only when geometric detail matters more than waiting.
  • filename_prefix - where the .glb lands inside your output folder, default 3D/MoGe.

The two booleans are worth knowing: apply_mask hands the model's predicted validity mask through (keeps sky out of the mesh), and remove_edge scrubs edge artifacts before meshing. Leave both on unless you're chasing a specific artifact.

Outputs and wiring

  • depth (IMAGE) - the inverted grayscale depth map. Wire it to a PreviewImage, or into depth ControlNet / a parallax pass.
  • normal (IMAGE) - colored surface normals. Only meaningful on v2.
  • glb_path (STRING) - the relative path of the exported .glb, saved under ComfyUI/output/3D/MoGe/. This is the one that makes the node special: feed it into ComfyUI's core Preview3D node's model_file input and you're orbiting your new mesh in the UI.

Installing

Via ComfyUI Manager: open Manager → Custom Nodes Manager, search Comfyui-MoGe2, install, restart. Or manually:

cd ComfyUI/custom_nodes
git clone https://github.com/zade23/Comfyui-MoGe2
cd Comfyui-MoGe2
pip install -r requirements.txt

Worth knowing before you do: the requirements are pinned (opencv-python==4.10.0.84, trimesh==4.5.1, huggingface_hub==0.25.2) and include a git dependency - utils3d cloned from the EasternJournalist repo at a specific commit. If you install manually, run the pip line in the same Python environment ComfyUI uses, and make sure git is on the machine to fetch it.

Where people get burned

  • It's CUDA-only. The node calls .cuda() and hardcodes fp16. No CPU, no Apple Silicon. If your ComfyUI runs on anything but an NVIDIA GPU, this node errors the moment it executes.
  • Black normal map means you're on v1. Switch model to v2.
  • First run looks hung - it's downloading the weights. Watch the terminal for HF progress.
  • Preview3D can't find your .glb - the path is relative to ComfyUI/output/, so the file lives at output/3D/MoGe/.

It's a small pack - one node, one job - but it's one of the few places in ComfyUI where "make me a 3D asset" is genuinely one click away. It won't match a dedicated multi-view reconstruction tool on complex geometry, but for a quick textured mesh from a single photo it's hard to beat.

CategoryMoGe2

Inputs (8)

NameTypeDefaultDescription
modelCOMBOv22 options: v1, v2
imageIMAGE
max_sizeINT800100–1000
resolution_levelCOMBOHigh4 options: Low, Medium, High, Ultra
remove_edgeBOOLEANtrue
apply_maskBOOLEANtrue
output_glbBOOLEANtrue
filename_prefixSTRING3D/MoGe

Outputs (3)

NameTypeDescription
depthIMAGE
normalIMAGE
glb_pathSTRING