TrellisMac Image to 3D
Image In, Mesh Out — the Node Doing the Actual Work
- pipeline
- image
- mesh
TrellisMacGenerate is the heart of this pack. You feed it a single image and a loaded pipeline, and it runs the entire TRELLIS.2 image-to-3D generation on your Mac's MPS - inventing the geometry of the sides the photo never shows, plus PBR material data, in a few minutes. Everything else in the pack exists to feed this node or drain it.
The context matters. TRELLIS.2 is Microsoft's MIT-licensed image-to-3D, the technically cleaner alternative to Hunyuan3D: it generates one structured latent (SLAT) with a rectified-flow transformer, then decodes that latent into a mesh. On NVIDIA the community has squeezed it down to run in ~6-8GB. On a Mac it was effectively dead - the standard wrapper is hardcoded for CUDA - until trellis-mac ported the Metal backends. This node is where that port does its thing.
How it works. The Generate node converts the ComfyUI image tensor to a PIL image and calls pipeline.run() - the exact code path trellis-mac's own generate.py uses, no forked inference. That runs three samplers (sparse structure, shape, texture) and decodes into a MeshWithVoxel: vertices, faces, a voxel attribute grid, and UVs. It also watches for the macOS GPU watchdog's corruption signatures and surfaces a readable error instead of a confusing stack trace.
The inputs that matter. Wire pipeline from the Loader and image from any ComfyUI image node (LoadImage is fine). Then you'll mostly touch four things:
pipeline_type-512 - fast,1024 - higher quality, or1024_cascade - best quality. Start with512 - fast; the 1024 paths are slower and memory-hungrier.seed- default 42. Change it to get a different take on the same image.steps-0means "use the pipeline's defaults, usually 12." Leave it at 0 until you know why you're changing it. The node hard-rejects anything over 200, because a garbage value can request tens of GB of MPS memory.num_samples- generate up to 8 meshes at once if you want variety in one go.
Output: mesh, a MESHWITHVOXEL socket that plugs into the Export node.
Installing. Same pack-wide setup as the Loader: a working trellis-mac checkout, install.py run with the Python that launches ComfyUI, the two gated HuggingFace licenses accepted, and PYTORCH_ENABLE_MPS_FALLBACK=1 set before ComfyUI starts. None of it is specific to this node, but this is the node that makes it all obvious when it's broken.
Where people get burned. Memory, mostly. TRELLIS.2 is a big model, and on a 48GB M4 Max a trellis-mac user reported memory usage climbing past 73GB before crashing. You want 24GB+ of unified memory, and 1024_cascade is the hungry path. And if you get "ERROR: The decoder produced an empty mesh" - that's the macOS GPU watchdog killing a long-running Metal kernel in the SLat decoder, not an install problem. Cheapest fixes first: run headless (close the lid, work over SSH), launch with MTL_CAPTURE_ENABLED=1, or SPARSE_CONV_BACKEND=none.
One more thing worth knowing before you queue: the input image does a lot of the work. Single clear subject, decent light, background removed if you can - the pipeline runs RMBG-2.0 background removal as part of preprocessing, but it's not magic. And hold the standard field caveat: the mesh will be triangle soup. It's great for a static prop, a 3D print, or a one-off render. If it has to animate, budget for retopology afterward.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| pipeline | TRELLIS_PIPELINE | — | |
| image | IMAGE | — | |
| seed | INT | 420–4294967295 | — |
| pipeline_type | COMBO | 3 options: 512 - fast, 1024 - higher quality, 1024_cascade - best quality | |
| steps | INT | 00–200 | 0 = use pipeline.json defaults (usually 12) |
| num_samplesopt | INT | 11–8 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| mesh | MESHWITHVOXEL | — |