TripoSplat Preprocess Image
Cut your subject out and park it on a black canvas for TripoSplat
- image
- mask
- image
TripoSplat is the "one image → 3D Gaussian splat" model, and like every 3D-from-image model it is brutally picky about its input. It wants a clean subject, centered, on a square black canvas, with padding around it. TripoSplat Preprocess Image is the node that manufactures exactly that from a photo plus a mask - crop the subject out, center it, pad it. If you've been feeding TripoSplat raw screenshots and wondering why the splat looks like a puddle, this is the missing step.
How it works, from the source: it takes your image and a mask (your alpha matte - wire it from a background-removal or segmentation node, since the mask input is required), erodes the mask by erode_radius pixels, then center-crops each image to the subject and places it on a square canvas of size×size (default 1024) with black padding around it. It also snaps size to a multiple of 16 under the hood, because the DINOv3 image encoder and the Flux2 VAE that TripoSplat's conditioning uses both operate on a 16-pixel grid - a stray 1027 width would break the pipeline later. The output is the prepared image, ready for TripoSplatConditioning.
Inputs: image, mask, erode_radius (default 1; eroding the matte a pixel or two avoids the white fringe that border bleed leaves when you cut a subject out), and size (default 1024 - the model is trained at 1024, and the tooltip is honest that other sizes run but are off-distribution, so stay at 1024 unless you have a reason not to). One output: image.
It's core (comfy_extras/nodes_triposplat.py), a recent addition, ships with ComfyUI - no install. The rest of the pipeline (the conditioning node, the DINOv3 CLIP vision, the Flux2 VAE, the sampler that produces the fixed-size noise target) all come from the same TripoSplat node family.
The practical gotchas are the ones the node's own design hints at. A bad mask gives you a bad crop - if the subject's edges are ragged, fix the segmentation, not the erode_radius. And there's a reason the padding is black: TripoSplat learned that background, and a subject that fills the whole canvas edge-to-edge confuses it as much as a busy background does. If your splats come out with the object clipping the frame or the geometry melting at the edges, go back to this node and check the subject is actually centered with breathing room. Also note it processes each image in the batch independently - feed it a stack of frames and each one gets the same treatment, which is handy for a whole sequence at once.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| mask | MASK | — | |
| erode_radius | INT | 10–16 | Erode the alpha matte by this pixel radius before cropping (avoids border bleed). |
| size | INT | 1024256–4096 | Square image size. The model is trained at 1024; other sizes run but are off-distribution. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |