Nodes/ComfyUI-SimpleTrellis2/Simple Trellis2 Image to GLB + Mesh
ComfyUI Node

Simple Trellis2 Image to GLB + Mesh

TRELLIS.2 without the 3D-Pack install fight

By starsFriday·Created 4 months ago·Updated 4 months ago· 0
Simple Trellis2 Image to GLB + Mesh
  • image
  • glb_path
  • preprocessed_image
  • mesh
◄model_pathmodels/trellis2►
◄resolution1024_cascade►
◄low_vramtrue►
◄sampling_steps12►
◄ss_guidance7.5►
◄shape_guidance7.5►
◄tex_guidance1.0►
◄max_num_tokens49152►
◄texture_size2048►
◄decimation_target500000►
◄remeshtrue►
◄use_webp_texturetrue►
◄keep_model_loadedtrue►
◄allow_hf_downloadfalse►
◄filename_prefixtrellis2►
◄seed42►

Here's the honest pitch: you feed this node one picture and it hands back a textured, PBR-material GLB mesh and a ComfyUI-native MESH socket - one image in, three outputs out, nothing between you and a 3D asset. It's a clean wrapper around Microsoft's TRELLIS.2, the 4B-parameter image-to-3D model, MIT-licensed so this is the real thing rather than a sketchy fork.

Why it exists: the real story of 3D gen in ComfyUI in 2026 is "getting it installed" more than the model. ComfyUI-3D-Pack wraps a zoo of compiled CUDA extensions that have to be built against your exact torch/CUDA combo. This pack dodges that by vendoring the trellis2 package inside the custom node directory and shipping prebuilt wheels for one pinned target (Linux x86_64, Python 3.12, torch 2.8.0, CUDA 12.8). One install script and the heavy lifting is done.

Now the honesty, because the verdict on TRELLIS holds here: the output is impressive to look at and genuinely useful as a static prop, a render, or a print. The geometry underneath is triangle soup with machine-generated UVs - by a modeller's standards, an extremely low-quality asset. Don't plan on rigging it out of the box; treat the GLB as a starting block.

How it works

The node builds the TRELLIS.2 pipeline from local files: it reads pipeline.json, loads the flow transformers and decoders, drops in DINOv3 for image features and RMBG-2.0 for background removal. Then it runs three rectified-flow samplers (sparse structure → shape latent → texture latent), decodes the O-Voxel sparse-voxel latent into a mesh, bakes PBR, and exports the GLB via o_voxel. It sets up flash_attn / flex_gemm backends and a 6-step progress bar for you. With keep_model_loaded on, the whole pipeline stays resident, so later runs are fast.

The inputs that matter

There's a stack of required widgets, but you'll actually touch five:

  • resolution - 512, 1024, 1024_cascade, 1536_cascade. Default 1024_cascade is the sweet spot. 512 is your fast smoke test; 1536_cascade is clearly better and clearly slower, and wants more VRAM.
  • low_vram (True) - shuffles pipeline stages on and off the GPU. Keep it on unless you have a big card and want speed.
  • sampling_steps (12) - runs for all three samplers. 12 is plenty for most props; go higher only if detail matters, since each step is real time.
  • texture_size (2048) - the baked PBR texture resolution (1024/2048/4096).
  • decimation_target (500000) - roughly how many triangles survive mesh simplification.

Then the three guidance values (ss_guidance, shape_guidance, tex_guidance) are CFG strength per stage; texture defaults to 1.0 (essentially off), which is right - bump it only if the bake looks washed out. max_num_tokens (49152) is the token budget for the shape latent; raise it for complex objects. The rest - seed, filename_prefix, remesh, use_webp_texture, keep_model_loaded, allow_hf_download - are set-and-forget.

Outputs

  • glb_path (STRING) - absolute path to the exported GLB in output/. This is TRELLIS.2's own PBR export: base color, metallic, roughness, alpha all baked in. This is the one you want for Blender or a game engine.
  • preprocessed_image (IMAGE) - the background-removed, cropped image the model actually inferred from. Handy for checking what the node "saw."
  • mesh (MESH) - ComfyUI's typed MESH socket. Wire it to ComfyUI's own Save 3D Model / SaveGLB nodes. Slight catch from the README: ComfyUI's saver stores geometry plus vertex colors/texture, which is not identical to the full PBR bake on glb_path. If PBR matters, save from glb_path.

The node also pushes a 3D preview entry, so the GLB renders in the viewport when your frontend supports it.

Install

cd /path/to/ComfyUI/custom_nodes
git clone https://github.com/starsFriday/ComfyUI-SimpleTrellis2.git
cd /path/to/ComfyUI
python custom_nodes/ComfyUI-SimpleTrellis2/install.py

The installer won't touch your torch - you need a CUDA-enabled build of your own. It's CUDA-only, no CPU path. If your stack differs from that pinned wheel target, the script skips the prebuilts and you install matching builds manually.

Then the models, the real bulk of the download. The 4B weights go under models/trellis2 (pipeline.json + ckpts/), along with a shared sparse decoder, DINOv3, and RMBG-2.0:

cd /path/to/ComfyUI
mkdir -p models/trellis2
huggingface-cli download microsoft/TRELLIS.2-4B --local-dir models/trellis2
huggingface-cli download microsoft/TRELLIS-image-large \
  ckpts/ss_dec_conv3d_16l8_fp16.json \
  ckpts/ss_dec_conv3d_16l8_fp16.safetensors \
  --local-dir models/trellis2

DINOv3 and RMBG-2.0 are only needed if you don't already have them - the node searches shared folders like models/pixal3d/..., so if you run Pixal3D it reuses those and saves you the download.

Common issues

  • Missing-model FileNotFoundError listing the paths it checked: files aren't where the node expects them, and allow_hf_download is off (default). Drop them into models/trellis2 or tick allow_hf_download to pull from Hugging Face mid-run.
  • Won't import or missing CUDA extensions: rerun install.py, then python custom_nodes/ComfyUI-SimpleTrellis2/install.py --check to see what's actually absent.
  • Blank 3D preview but the saved GLB opens fine: disable use_webp_texture - some browser-side viewers choke on WebP texture extensions in GLB.
  • First run is slow. It's loading a 4B model plus DINOv3 and RMBG. Keep keep_model_loaded on and the second generation is a fraction of the time.

VRAM: upstream says 24GB; with low_vram on, community ports have TRELLIS.2 running in 6–8GB, just slower. Sanity-check with resolution=512 before committing to 1536_cascade.

CategoryTrellis2/Simple

Inputs (17)

NameTypeDefaultDescription
imageIMAGE—
model_pathSTRINGmodels/trellis2—
resolutionCOMBO1024_cascade4 options: 512, 1024, 1024_cascade, 1536_cascade
low_vramBOOLEANtrue—
sampling_stepsINT121–50—
ss_guidanceFLOAT7.50–30—
shape_guidanceFLOAT7.50–30—
tex_guidanceFLOAT1.00–30—
max_num_tokensINT491524096–196608—
texture_sizeCOMBO20483 options: 1024, 2048, 4096
decimation_targetINT50000010000–2000000—
remeshBOOLEANtrue—
use_webp_textureBOOLEANtrue—
keep_model_loadedBOOLEANtrue—
allow_hf_downloadBOOLEANfalse—
filename_prefixSTRINGtrellis2—
seedINT420–18446744073709550000—

Outputs (3)

NameTypeDescription
glb_pathSTRING—
preprocessed_imageIMAGE—
meshMESH—