Simple Trellis2 Image to GLB + Mesh
TRELLIS.2 without the 3D-Pack install fight
- image
- glb_path
- preprocessed_image
- mesh
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. Default1024_cascadeis the sweet spot.512is your fast smoke test;1536_cascadeis 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 inoutput/. 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 ownSave 3D Model/SaveGLBnodes. Slight catch from the README: ComfyUI's saver stores geometry plus vertex colors/texture, which is not identical to the full PBR bake onglb_path. If PBR matters, save fromglb_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
FileNotFoundErrorlisting the paths it checked: files aren't where the node expects them, andallow_hf_downloadis off (default). Drop them intomodels/trellis2or tickallow_hf_downloadto pull from Hugging Face mid-run. - Won't import or missing CUDA extensions: rerun
install.py, thenpython custom_nodes/ComfyUI-SimpleTrellis2/install.py --checkto 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_loadedon 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.
Inputs (17)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| model_path | STRING | models/trellis2 | — |
| resolution | COMBO | 1024_cascade | 4 options: 512, 1024, 1024_cascade, 1536_cascade |
| low_vram | BOOLEAN | true | — |
| sampling_steps | INT | 121–50 | — |
| ss_guidance | FLOAT | 7.50–30 | — |
| shape_guidance | FLOAT | 7.50–30 | — |
| tex_guidance | FLOAT | 1.00–30 | — |
| max_num_tokens | INT | 491524096–196608 | — |
| texture_size | COMBO | 2048 | 3 options: 1024, 2048, 4096 |
| decimation_target | INT | 50000010000–2000000 | — |
| remesh | BOOLEAN | true | — |
| use_webp_texture | BOOLEAN | true | — |
| keep_model_loaded | BOOLEAN | true | — |
| allow_hf_download | BOOLEAN | false | — |
| filename_prefix | STRING | trellis2 | — |
| seed | INT | 420–18446744073709550000 | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| glb_path | STRING | — |
| preprocessed_image | IMAGE | — |
| mesh | MESH | — |