Nodes/ComfyUI_TRELLIS/Trellis_Sampler
ComfyUI Node

Trellis_Sampler

Your Image In, a .glb Out — Read the Output Path, Not a Preview

By smthemex·Created 2 years ago·Updated about a year ago· 181
Trellis_Sampler
  • image
  • model
  • model_path
seed0
cfg7.5
steps12
slat_cfg3.0
slat_steps12
preprocess_imagefalse
texture_size512
mesh_simplify0.95
mode
multi_imagefalse
multiimage_algo
gaussians2plyfalse
covert2videofalse
glb2objfalse
glb2fbxfalse

This is the payoff node. Trellis_LoadModel gets the pipeline into memory, Trellis_multiimage_loader optionally feeds it extra views, and here is where an image becomes a 3D asset you can actually drag into Blender. The first thing that catches people is that it doesn't show you a 3D preview at all - its only output is a string, the file path where the .glb landed in ComfyUI/output. Wire that into any text-display node, or just go dig the file out of the output folder.

How it works

TRELLIS runs a two-stage diffusion. First a sparse-structure sampler decides where geometry exists (an occupancy-style pass), then a structured-latent (slat) sampler fills in gaussian primitives and a mesh. That's why you get two cfg/steps pairs - they're two separate diffusion passes, not two spellings of the same setting. After sampling, the node bakes a texture onto the mesh, simplifies it, and exports the GLB.

The inputs that matter

  • image - your source photo. Wire it from LoadImage, or from Trellis_multiimage_loader for multi-view input.
  • cfg + steps and slat_cfg + slat_steps - the two sampler pairs. The first shapes the overall form, the second fills in detail. Defaults (7.5/12 and 3/12) are a sane starting point; the slat pair is where detail lives.
  • preprocess_image - runs background removal (via rembg, one of the pack's dependencies) before reconstruction. Leave it on for single product-style shots.
  • texture_size - baked texture resolution, 512 up to 2048. 2048 looks better and costs noticeably more time and VRAM.
  • mesh_simplify - triangle-removal ratio, 0–0.98. The 0.95 default is aggressive; fine for game-asset prototyping, lower it if the geometry feels gutted.
  • mode - fast vs opt, the texture-bake mode. fast is quick, opt is cleaner.
  • multi_image + multiimage_algo - requires a batch of three coming from the multiimage loader; toggles true multi-view reconstruction with multidiffusion or stochastic.

The pack also does text-to-3D and mesh-to-3D: load the text repo in Trellis_LoadModel and the sampler swaps to a prompt box (there's a mesh_path field too if you want to start from an existing .ply mesh). The README calls this out, and the default prompt text is a dead giveaway the text path is real.

The toggle cluster at the bottom is conversion, not generation: gaussians2ply saves the splat field as a .ply, covert2video renders orbiting mp4s of the gaussians, radiance field and mesh, and glb2obj / glb2fbx hand you interchange formats. glb2fbx needs Blender and bpy installed - the README tells you to pip install bpy and have Blender around. The model_path output then lists every file it wrote, one per line.

Install

Same pack as everything else - cd ComfyUI/custom_nodes && git clone https://github.com/smthemex/ComfyUI_TRELLIS.git, then the compiled-extension gauntlet described on the Trellis_LoadModel page. No extra dependencies for this node specifically. A good rule: if the sampler runs at all, your install worked.

Common issues

  • It's the slow node. A minute or more per image on a 4070-class card, and texture_size 2048 stretches that further. That's the diffusion doing its thing, not a hang.
  • OOM on tight VRAM. Stock wants ~16GB; fp16 setups run on ~8GB. If you crash, drop texture_size and check preprocess_image.
  • "Where's my model?" It's not in the graph - check ComfyUI/output and read the path string. That trips up more people than any setting.
  • Nothing where you expect after multi_image. Multi-image mode only triggers when the batch is a multiple of three, so feed it from the loader, not a plain LoadImage.
CategoryTrellis

Inputs (17)

NameTypeDefaultDescription
imageIMAGE
modelMODEL_TRELLIS
seedINT00–2147483647
cfgFLOAT7.50–10
stepsINT121–50
slat_cfgFLOAT3.00–10
slat_stepsINT121–50
preprocess_imageBOOLEANfalse
texture_sizeINT512512–2048
mesh_simplifyFLOAT0.950–0.98
modeCOMBO2 options: fast, opt
multi_imageBOOLEANfalse
multiimage_algoCOMBO2 options: multidiffusion, stochastic
gaussians2plyBOOLEANfalse
covert2videoBOOLEANfalse
glb2objBOOLEANfalse
glb2fbxBOOLEANfalse

Outputs (1)

NameTypeDescription
model_pathSTRING