Skip to main content

TripoSplat Preprocess Image

This node crops each input image to a centered square on a black background, then adds padding to reach the specified output size. It is designed to prepare images for the TripoSplat 3D model by ensuring consistent square framing and optional alpha matte erosion to prevent border artifacts.

Inputs

ParameterDescriptionData TypeRequiredRange
imageThe input image(s) to preprocessIMAGEYes-
maskAlpha mask for the image, used to determine the crop regionMASKYes-
erode_radiusErode the alpha matte by this pixel radius before cropping (avoids border bleed). Default: 1INTYes0 to 16
sizeSquare image size. The model is trained at 1024; other sizes run but are off-distribution. Default: 1024INTYes256 to 4096 (step of 16)
Note: The mask input is required and must be provided. If the mask has a different batch size than the image, it is automatically repeated to match. If the mask dimensions differ from the image dimensions, the mask is resized to match the image using bilinear interpolation. The output size is automatically rounded down to the nearest multiple of 16 to ensure compatibility with DINOv3 patch and Flux2 VAE stride requirements.

Outputs

Output NameDescriptionData Type
imageThe preprocessed image(s) cropped to a centered square on a black background with paddingIMAGE
This documentation was AI-generated. If you find any errors or have suggestions for improvement, please feel free to contribute! Edit on GitHub

Source fingerprint (SHA-256): 3f33dbc3a99ccb23ede767915a28fabdfa388edb8d5782edea3f8d03e5965b2a