ComfyUI Node

TripoSR Sampler

Turn one photo into a 3D mesh

By flowtyone·Created 2 years ago·Updated 2 years ago· 541
TripoSR Sampler
  • model
  • reference_image
  • reference_mask
  • MESH
geometry_resolution256
threshold25.00

This is the node doing the actual work in the TripoSR pack - the one that takes a single 2D image and hands you back a 3D mesh. Despite the name, don't picture a KSampler with 20 steps and a scheduler dropdown; TripoSR is feedforward, one pass through the network, and it's fast. Most of the "sampling" here is really the mesh-extraction step, which is where its three tunable parameters actually live.

Where it sits in the pipeline

TripoSR Sampler needs a TRIPOSR_MODEL from the TripoSR Model Loader and a reference image, and it hands its MESH output straight to the TripoSR Viewer to preview. Under the hood, TripoSR encodes your image into an implicit triplane representation of the object's geometry - think of it as a compact 3D "sketch" the network inferred from a single viewpoint - and then this node extracts an actual polygon mesh from that representation via marching cubes. That extraction step is the natural fit for a general-purpose 3D asset pipeline: use it to rough out a base shape, then refine or retopologize downstream in Blender or wherever, the way people already pair TripoSR with depth-refinement passes to add surface detail after the fact.

Inputs and outputs that matter

  • reference_image - the single photo you're reconstructing from. This matters more than any of the numeric sliders. TripoSR was trained on images with the subject isolated against a clean background, and it shows: a busy or cluttered background is the single most common reason people get a warped, thin-sliced mess instead of a usable mesh.
  • reference_mask (optional) - an alpha mask that tells the sampler exactly where the subject is and where it isn't. If you're getting bad results with a plain image, this is the fix before you touch anything else - run your image through a background-removal node first (BiRefNet or similar) and feed the resulting mask in here.
  • geometry_resolution - default 256, range 128–12288. This is the marching-cubes grid resolution used to extract the mesh surface. Higher means more vertices and finer surface detail, at the cost of VRAM and time. 256 is a sane default; cranking it into four digits mostly buys diminishing returns, since a single-view reconstruction can't invent detail it never saw in the photo.
  • threshold - default 25, minimum 0, step 0.01. This is the density cutoff marching cubes uses to decide what counts as "solid" versus "empty" when carving the mesh out of the learned representation. Most people never touch it; if your mesh comes out riddled with holes or oddly bloated, this is the knob to nudge.

The output is a single MESH, which wires directly into TripoSR Viewer for a look, or onward to anything else in the pack's format.

Installing it

Same pack as the Loader and Viewer nodes - install once, get all three. Through ComfyUI Manager: search ComfyUI-Flowty-TripoSR, install, restart. By hand:

cd ComfyUI/custom_nodes
git clone https://github.com/flowtyone/ComfyUI-Flowty-TripoSR.git
cd ComfyUI-Flowty-TripoSR
pip install -r requirements.txt

You'll also need model.ckpt from the official TripoSR HuggingFace repo in ComfyUI/models/checkpoints - that's what the Loader node feeds into this one.

Where people get burned

By far the most common complaint - "my TripoSR outputs are terrible" is a recurring thread title - traces back to the input image, not the node's settings. A subject with a plain or removed background reconstructs cleanly; the same subject on a busy background comes out as a thin, distorted slice. If that happens to you, don't start fiddling with threshold - plug in a reference_mask from a background-removal node first and re-run. Second, the original TripoSR demo reports around 6GB of VRAM for a single image at default settings, so if you're hitting out-of-memory errors, geometry_resolution is the one to lower before anything else. And temper expectations on quality generally: TripoSR reconstructs from one viewpoint, so occluded surfaces (the back of a head, the underside of an object) get guessed rather than reconstructed - it's genuinely strong for fast, roughed-out geometry and not a substitute for multi-view capture when you need the whole object right.

CategoryFlowty TripoSR

Inputs (5)

NameTypeDefaultDescription
modelTRIPOSR_MODEL
reference_imageIMAGE
geometry_resolutionINT256128–12288
thresholdFLOAT25.00
reference_maskoptMASK

Outputs (1)

NameTypeDescription
MESHMESH