Nodes/ComfyUI-Sapiens2/Sapiens2 Pointmap → GLB
ComfyUI Node

Sapiens2 Pointmap → GLB

A photo becomes a textured GLB mesh in one node

By kijai·Created 4 months ago·Updated 4 months ago· 65
Sapiens2 Pointmap → GLB
  • image
  • sapiens2_model
  • mask
  • model
frames_per_batch1
rtol0.040
min_depth0.05
max_depth25.0
filename_prefixsapiens2_pointmap

Pointmap is Sapiens2's image-to-3D trick, and it's the showstopper of the pack. Feed it a photo of a person and it walks out with an actual textured 3D mesh - a .glb file written to your output folder and previewable right in ComfyUI. No multi-view generation, no Gaussian splatting, no waiting on a cloud. One image, one node, one mesh.

Be clear-eyed about what you're getting, though. The pointmap head predicts a per-pixel 3D position for the visible surface, so what comes out is a textured "relief" of the person - think a highly detailed bas-relief, or a depth map with real color baked on. It's a single-view reconstruction, not a fully rounded character. The 3D community's verdict on this whole category applies here too: great for static props, background fillers, or a starting point; don't expect clean topology you can rig and animate as-is. For a head-and-shoulders portrait that's often exactly the base asset you wanted; for a full body you get the front, not the back. Kijai's wrapped MoGe with the same philosophy, so if you've used that, you know the drill.

How it works

The pointmap checkpoint runs your image at 1024×768 and emits per-pixel 3D coordinates plus a per-frame scale. The node divides by that scale to get metric values in meters, then decides which pixels actually become mesh:

  • mask (optional, strongly recommended) - the tooltip is unusually blunt. Without it, background pixels become a wall of garbage geometry; with it, only the person gets meshed.
  • rtol (default 0.04) - the silhouette-edge detector. Any pixel whose depth jumps more than this over a 3×3 neighborhood is treated as an edge and dropped. Lower = cleaner silhouette, but too strict eats thin features like fingers.
  • min_depth / max_depth (default 0.05 / 25 meters) - discards pixels closer or farther than these, handy for chopping floor remnants.
  • frames_per_batch - frames per forward pass for video.
  • filename_prefix (default sapiens2_pointmap) - GLBs land in ComfyUI/output/ as prefix_00000.glb, auto-incrementing so nothing gets overwritten.

It flips the axes into the right 3D handedness, builds a triangle mesh over the valid pixels, bakes your source image as the texture, and writes the file. The output, model (type FILE_3D_GLB), appears in ComfyUI's 3D viewer - from there it's drag-and-drop into Blender, or a starting mesh for a 3D-upscaling/refinement pipeline.

Installing and troubleshooting

Manager search "ComfyUI-Sapiens2", or git clone https://github.com/kijai/ComfyUI-Sapiens2 into custom_nodes and restart. Then a pointmap checkpoint into ComfyUI/models/sapiens2 - facebook/sapiens2-pointmap-1b to start; the 5B is meaningfully better on fine surface detail if you have the VRAM.

The one failure mode is baked into the node: if every pixel gets filtered, it raises "No mesh produced - every pixel was filtered out. Try a wider rtol or relax min/max depth, and connect a foreground mask." That message is the whole troubleshooting guide. Connect a good foreground mask first, widen rtol only if the silhouette looks ragged, and don't skip the mask and then wonder why your mesh has a carpet attached.

CategorySapiens2

Inputs (8)

NameTypeDefaultDescription
imageIMAGESource image — also baked as the mesh texture.
sapiens2_modelSAPIENS2_MODEL
frames_per_batchINT11–256Frames per forward pass. Lower if you OOM.
rtolFLOAT0.0400.001–1Per-pixel depth-jump tolerance ((max-min)/center over a 3×3 neighbourhood). Pixels above this are treated as silhouette edges and dropped. Lower = stricter.
min_depthFLOAT0.050–10Discard pixels whose Z is below this (metres).
max_depthFLOAT25.00.5–200Discard pixels whose Z is above this (metres).
filename_prefixSTRINGsapiens2_pointmap
maskoptMASKOptional foreground mask — strongly recommended.

Outputs (1)

NameTypeDescription
modelFILE_3D_GLB