Nodes/kubakub nodes/kubakub save trimesh glb
ComfyUI Node

kubakub save trimesh glb

Save the mesh before ComfyUI eats it — save trimesh glb

By kubakubkub·Created about a month ago·Updated 2 days ago· 10
kubakub save trimesh glb
  • trimesh
  • filepath
◄filenametrellis_output►

Image-to-3D nodes give you a mesh object that lives in memory and then evaporates when you clear the queue. Nothing writes it to disk unless you wire it to something that does, and the something is usually this: a two-input node that dumps a TRIMESH as a .glb in your output folder, increments a number so nothing is lost, and hands you back the path.

That's it. No preview, no decimation, no options. Which is exactly what you want from the last node in a graph - and it's the pragmatic end of a pipeline whose middle is still messy. The name is the giveaway: the default filename is trellis_output, because this node was written to get TRELLIS meshes out of ComfyUI. TRELLIS is the MIT-licensed image-to-3D model that sits second to Hunyuan3D in the community's attention and first in the "please stop making me install ComfyUI-3D-Pack" complaints - the KB's read on that corner of the stack is that a striking number of the high-scoring TRELLIS threads of 2026 aren't about the model at all, they're about people shrinking it to fit in 6–8 GB and escaping the install mess. A node that just writes the result to disk is the unglamorous half of that problem.

Inputs

trimesh is the mesh - the TRIMESH type, which is what image-to-3D nodes emit. That type comes from whichever 3D pack you have installed (Trellis wrappers, Hunyuan3D wrappers, 3D-Pack-style node sets); this node consumes it, it doesn't define it, so the two have to agree on what TRIMESH means. In practice they do, because they all pass a trimesh object around.

filename (default trellis_output) is the name inside the ComfyUI output folder. Put a / in it - mesh/chair - and you get a subfolder. A four-digit number is appended, starting at 1, so each save gets the next free slot and nothing is ever overwritten.

Worth knowing from the source, since it's a real safety check rather than a nuisance: the filename is resolved against the output directory, and if it tries to escape that folder the node raises rather than writing wherever you pointed it. So no ../../ tricks - and that's a sane default when workflows get shared around.

Output

filepath is the full path to the .glb. It's a STRING and it's the sort of thing worth wiring into a text or log node if you're batch-generating and want to know what landed where; after a few dozen runs, _0001 through _0047 in a folder is not a filing system.

Why GLB

.glb is the binary glTF container: one file, geometry plus materials plus textures, read by Blender, Windows' 3D viewer, most online viewers, and anything downstream that's not a 20-year-old CAM tool. For a generated mesh whose topology nobody is going to admire - the KB's summary of the community verdict is blunt about triangle soup and machine-made UVs - the practical question is only whether it imports cleanly, and GLB does. "Usable for a static prop or a 3D print, unusable for anything that has to deform" is the honest framing, and a static prop is exactly what a GLB is for.

You don't need Blender installed for this node, and you don't need trimesh installed either: the node calls the export method on the object it's handed, so the mesh's own library does the writing. That's a nice bit of laziness on the author's part.

Installing

The pack comes through ComfyUI Manager - search kubakub nodes, install, restart - or:

cd ComfyUI/custom_nodes
git clone https://github.com/kubakubkub/ComfyUI_KubaNodes
python -m pip install -r ComfyUI_KubaNodes/requirements.txt

That requirements file is opencv-python-headless and nothing else (skip it if you already run an OpenCV build). ComfyUI 0.37.0 or newer. The pack is new and barely discussed on Reddit - five threads total, all about the author's older architecture models - so expect the documentation and the source to be your references rather than a YouTube tutorial.

Traps

The one that catches people: this node is hidden by default in some installations if the menu group is off. It sits under kubakub/3d/fabricate, and a kubakub.ini with 3d = off stops that whole module loading. Missing node in a workflow you downloaded? Look there first.

Second: batches. If your image-to-3D node emits a batch of meshes, this is still one save per call, with the counter ticking up. Fine for a handful, tedious for fifty - check whether your generator node has a batch mode before blaming the saver.

Third, the least obvious: a TRIMESH that arrives as None or as a placeholder will fail on export rather than writing a broken file. If the node errors, look upstream at whether your generator actually returned geometry - that's usually the real story.

Categorykubakub/3d/fabricate

Inputs (2)

NameTypeDefaultDescription
trimeshTRIMESHThe 3D mesh to save (e.g. from an image to 3D node).
filenameSTRINGtrellis_outputName inside the output folder; 'sub/name' makes a subfolder. A number is added (_0001, _0002 ...) so nothing is overwritten.

Outputs (1)

NameTypeDescription
filepathSTRINGThe full path of the saved .glb file.