Nodes/ComfyUI-Trellis2Apple/Export Trellis2 Apple Mesh
ComfyUI Node

Export Trellis2 Apple Mesh

Get a real .glb file out of TRELLIS on a Mac — this node is the finish line

By dmvvilela·Created 2 months ago·Updated 2 months ago· 1
Export Trellis2 Apple Mesh
  • mesh
  • glb_path
  • relative_path
filename_prefixTrellis2Apple/3D
decimation_target300000
texture_size
remeshfalse

Everything before this node produces an in-memory mesh - a TRELLIS2_APPLE_MESH object that only exists while the graph runs. This is the node that turns it into something real: a .glb file on disk you can open in Blender, drop into a viewer, or wire into ComfyUI's Preview3D. It's the last step of the four-node Trellis2Apple chain (LoadImage → Trellis2AppleLoader → Trellis2AppleGenerate → this → Preview3D), and it's marked as an output node because it writes a file, not just a value.

How it works

The generate node hands you a mesh that's still fundamentally a voxelized volume with attribute data - the O-Voxel representation under TRELLIS.2. The export node runs it through o_voxel.postprocess.to_glb (the postprocess step from the trellis2-apple backend), which decimates the mesh to a target triangle count, bakes a texture from the voxel attributes, and exports a GLB. It writes to ComfyUI's output folder using the same pathing as SaveImage, with a counter-suffixed filename like Trellis2Apple/3D_00001_.glb.

The inputs that matter

  • mesh - the mesh output of Trellis2AppleGenerate or its Advanced sibling.
  • filename_prefix - defaults to Trellis2Apple/3D; you'll find the file under ComfyUI/output/Trellis2Apple/. Set your own prefix to organize.
  • decimation_target - how many triangles the export should aim for, 100k–2M in 10k steps, default 300,000. Lower is lighter (and more aggressively simplified); the README's smoke-tested setting is 300k.
  • texture_size - 512 / 1024 / 2048 / 4096, default 1024. Bigger is sharper and more memory-hungry.
  • remesh - false by default; flip to true for a cleaner surface pass at the cost of time.

The two outputs, glb_path (absolute filesystem path) and relative_path, let you chain into display or downstream nodes - and the README's one hard rule is to use GLB with ComfyUI's Preview3D, because that's the format the previewer wants.

Installing it

Same shared pack install as the rest of the family - this node doesn't add its own dependencies, the pack does:

git clone https://github.com/pedronaugusto/trellis2-apple /path/to/trellis2-apple
ln -s /path/to/ComfyUI-Trellis2Apple /path/to/ComfyUI/custom_nodes/ComfyUI-Trellis2Apple
/path/to/ComfyUI/.venv/bin/python custom_nodes/ComfyUI-Trellis2Apple/install.py \
  --trellis2-apple /path/to/trellis2-apple --download-weights
/path/to/ComfyUI/.venv/bin/python custom_nodes/ComfyUI-Trellis2Apple/doctor.py

The heavy lifting (torch, mlx, o-voxel, the three Metal packages built from source) happens in install.py, so run it with the same Python that launches ComfyUI and restart before you blame the node.

Troubleshooting

  • Export is slow or the graph dies here. The node's own description owns this: higher decimation/texture settings "may need more memory and time." This is the step where the mesh gets baked, and it's the second most expensive thing in the chain after generation. If it's choking, drop texture_size to 512 and raise decimation_target.
  • I can't find the file. It's in the output folder, not next to the node - ComfyUI/output/Trellis2Apple/3D_XXXXX_.glb with your prefix swapped in.
  • Preview3D won't show it. Export as GLB. The README says it plainly, and it's the format the ComfyUI 3D preview nodes expect.
  • The geometry is rough. That's the state of image-to-3D in general - TRELLIS.2 output is genuinely impressive on the surface and genuinely triangle-soup underneath. For a 3D print or a static prop it's ready to go; for anything that must deform or rig, budget a cleanup pass.

One last thing worth knowing: you can chain the glb_path string output into other nodes, but the simplest honest workflow is export → Preview3D → look, then open the .glb in Blender. That's the whole job of this node, and it does it quietly.

CategoryTrellis2Apple

Inputs (5)

NameTypeDefaultDescription
meshTRELLIS2_APPLE_MESH
filename_prefixSTRINGTrellis2Apple/3D
decimation_targetINT300000100000–2000000
texture_sizeCOMBO4 options: 1024, 2048, 4096, 512
remeshBOOLEANfalse

Outputs (2)

NameTypeDescription
glb_pathSTRING
relative_pathSTRING