TripoSR Sampler
Turn a single photo into a 3D mesh
- model
- image
- mask
- MESH
TripoSR Sampler is the middle and most important node in Mixlab's TripoSR pipeline - the one that actually does the image-to-3D work. Load TripoSR Model loads the weights upstream, this node runs a single image through them to produce a mesh, and Save TripoSR Mesh writes that mesh to disk afterward. This is the step where a flat photo becomes an actual MESH object.
TripoSR itself is a real model from Stability AI and Tripo AI, not something Mixlab built - a fast, feed-forward single-image-to-3D network. "Fast" is the honest headline here: it takes a single photo and produces a rough base mesh in a couple of seconds, at around 6GB of VRAM, which is light by generative-AI standards. The trade-off is in the name of the game: community reaction split early between people getting clean, usable meshes and people getting distorted geometry with an ugly, guessed-at backside - since a single photo genuinely doesn't show what's behind the subject, TripoSR has to invent that part, and it invents it roughly. The settled take is that it's genuinely useful for a fast, low-poly base shape - something to pose, use as a background reference, or refine further - not something you hand straight to a 3D printer or game engine without cleanup.
The node's own controls are resolution (128 to 12288, default 256) - the marching-cubes grid resolution used to extract the mesh surface, where higher values pull out more geometric detail at the cost of a slower, heavier extraction pass, and threshold (a float, default 25, no upper cap) - the density cutoff marching cubes uses to decide where the surface actually is; push it up and the extracted surface pulls in tighter around denser regions, push it down and the mesh fills out looser and can pick up more noise. device is auto or cpu. The optional mask input is worth using deliberately rather than skipping: TripoSR (like most single-image reconstruction models) works best from a clean, well-isolated subject, so feeding a mask that isolates your subject from its background - from RembgNode_Mix, EditMask, or TransparentImage - before this node tends to produce a noticeably better mesh than handing it a busy, uncropped photo and hoping it figures out the subject itself. The output is MESH, which goes straight to Save TripoSR Mesh (or any other Mixlab 3D node downstream that consumes that type).
Install is the pack-wide standard:
cd ComfyUI/custom_nodes
git clone https://github.com/shadowcz007/comfyui-mixlab-nodes.git
cd comfyui-mixlab-nodes
install.bat
or via ComfyUI Manager (search "comfyui-mixlab-nodes"), or pip3 install -r requirements.txt in a venv. This node needs the model files Load TripoSR Model depends on: TripoSR's model.ckpt from Stability AI's Hugging Face repo, placed at models/triposr, and - the one people forget, since it's a separate download from the main checkpoint - facebook/dino-vitb16, TripoSR's image encoder, placed at models/triposr/facebook/dino-vitb16. Without both in place, the pipeline fails before this node ever gets to sample.
If the mesh comes out badly distorted or missing detail entirely, the two things to try first are the ones above: crop or mask the input to isolate the subject cleanly, and confirm resolution isn't set so low it can't capture the shape you need (256 is a light default; push it up if fine detail matters and you can afford the slower pass). If the node runs out of memory, resolution is the first thing to lower - it's the main VRAM lever here, separate from chunk_size on the upstream Load TripoSR Model node, which is the other memory knob in this pipeline. And going in, calibrate your expectations to what TripoSR actually is: even a well-isolated, well-lit subject typically won't produce a mesh with a convincingly detailed backside, because the model is inferring geometry it never actually saw.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| model | TRIPOSR_MODEL | — | |
| image | IMAGE | — | |
| resolution | INT | 256128–12288 | — |
| threshold | FLOAT | 25.00 | — |
| device | COMBO | 2 options: auto, cpu | |
| maskopt | MASK | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| MESH | MESH | — |