TRELLIS2 Predict (Image to 3D Mesh)
One image in, a PBR mesh out — meet the heart of this pack
- image
- mesh
TRELLIS2 Predict is the node that makes this pack worth installing. Feed it a single image and you get back a full 3D mesh - geometry, normals, UVs, and PBR materials (albedo, roughness, metallic) - courtesy of Microsoft's TRELLIS2 model running locally. No API, no key, no cloud. Your GPU does the work, and the first run downloads the weights (~8GB, per the README) automatically from Hugging Face.
It's the "image to 3D mesh" step in every workflow this pack ships. Wire its output into MeshRenderer to turn the mesh into an image from any camera angle, or skip ahead to VideoToMeshes if you're doing frames instead of a single still.
How it works
Under the hood the node lazy-loads a TrellisImageTo3DPipeline (from the trellis package, model microsoft/TRELLIS-image-large) the first time it runs, then caches it as a singleton so later runs skip the load. It's a hard CUDA requirement - the node raises a clear error if it can't see a GPU, so CPU-only boxes are out.
The pipeline is genuinely simple from your side:
- The image tensor gets converted to a PIL image.
- If
remove_backgroundis on (it is by default), the node runs rembg to cut the subject out, compositing it onto white so TRELLIS2 doesn't waste capacity reconstructing a background it doesn't need. - TRELLIS2 generates the mesh.
- The output is converted into the pack's own
TRELLIS_MESHformat: vertices, faces, normals, UVs, and any PBR texture maps TRELLIS produced.
The inputs that matter
- image - the only required input. Feed it whatever your image generation chain produces.
- resolution -
512/1024/1536. Higher means better quality and slower; at 1024 the README's own benchmark figures sit around 10s per image on an A100. If you're on a 12GB card, don't be proud, try 512. - seed -
0means "random every run" (the node rolls a random seed for you). Set a fixed value to make the output reproducible. - remove_background - default
true. Leave it on unless your image already has a clean flat background, because rembg's cutout quality gates everything downstream. - simplify_mesh / target_faces - off by default. If you're going to render wireframes or push the mesh elsewhere (Blender, a game engine), turning this on with a target around 50k faces keeps the polygon count sane. It uses trimesh quadric decimation, and only kicks in when the mesh actually exceeds your target.
The output is a single mesh (TRELLIS_MESH), which is exactly what MeshRenderer's mesh input expects. There's nothing else to wire - the node doesn't return an image, so don't stare at the graph waiting for a preview. Render it or save the mesh elsewhere.
Installing the pack
Everything in this pack needs the same setup, so here's the reliable path from the README (the one that actually works):
cd ComfyUI/custom_nodes
git clone https://github.com/styletransfer/ComfyUI-TRELLIS2_Motion
cd ComfyUI-TRELLIS2_Motion
python install.py --full # or --colab on Google Colab
pip install git+https://github.com/microsoft/TRELLIS.git
pip install git+https://github.com/NVlabs/nvdiffrast.git
Then restart ComfyUI and look for the TRELLIS2 category. The model downloads itself on first execution.
Common issues
Where people get burned with this pack:
python install.pywithout--fullskips TRELLIS entirely. The script prints a cheerful "installation complete" and then tells you it did not install the thing you actually need. Run it with--full, or install TRELLIS manually as above.- "TRELLIS2 not available" at execution time means the
trellispackage isn't importable. Install it withpip install git+https://github.com/microsoft/TRELLIS.git- and note the pack's own code warns TRELLIS must not live insidecustom_nodes/, or ComfyUI will try to load it as a node pack and things get weird. Sibling tocustom_nodes/is the safe spot. - CUDA out of memory. The README recommends 24GB+ VRAM (A100/4090 class). Drop to
512, keep background removal on (it shrinks what TRELLIS has to reconstruct), and lower your source image size. - Don't confuse this pack with
PozzettiAndrea/ComfyUI-TRELLIS2. Same underlying model, and that other wrapper is the famous one (it owns the reddit mindshare). When you search ComfyUI Manager, look for ComfyUI-TRELLIS2_Motion specifically - grabbing the wrong pack in a shared 3D workflow is a classic failure.
First run is the slow one. After the model is cached and the pipeline is warm, single-image predictions are a few seconds at 512 - fast enough that you'll stop flinching at "run".
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | Input image to convert to 3D mesh | |
| resolutionopt | COMBO | 1024 | Processing resolution (higher = better quality, slower) |
| seedopt | INT | 00–2147483647 | Random seed for reproducible results (0 = random) |
| remove_backgroundopt | BOOLEAN | true | Automatically remove background before processing |
| simplify_meshopt | BOOLEAN | false | Simplify mesh to reduce polygon count |
| target_facesopt | INT | 500001000–500000 | Target face count when simplifying (only if simplify_mesh is True) |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| mesh | TRELLIS_MESH | — |