Save Meshes to Folder
Get your meshes out of ComfyUI and onto disk, numbered
- trimesh
- output_folder
- saved_count
Every geometry workflow ends the same way: you have a mesh you need to get out of ComfyUI and into a slicer, a game engine, or Blender. Save Meshes to Folder is the export node for that - it takes a batch of TRIMESH objects, writes them all into one output folder with sensible names, and hands you back the folder path and a count so you know it happened.
How it works
You feed in a trimesh (or a list - that's the batch part), give it a folder_name (created under ComfyUI's output directory, default mesh_output) and a base_name (default mesh), and pick a format. Each mesh becomes mesh_001.obj, mesh_002.obj, and so on. There's an optional names input for custom filenames - a list that, when provided, overrides base_name entirely. Filenames are scrubbed of characters that don't belong in filenames, so you won't get a crash because a name had a colon in it.
Format options are the useful set: obj, ply, stl, off, glb, gltf, vtp. A quick guide: OBJ for general interchange, STL for 3D printing, GLB/GLTF for web and engines (and the one that preserves textures), VTP if you're heading into ParaView-land (this pack has ParaView in its DNA).
Inputs and outputs
The ones you actually set:
- trimesh - your mesh, or a batch of them.
- folder_name - subfolder under the ComfyUI output directory.
- base_name - file prefix, unless names overrides it.
- format - one of the seven above.
Outputs are output_folder (the full path, as a STRING - useful if a later node needs to know where things landed) and saved_count (INT). No info string, but the count is usually enough.
Installing it
Boring, in the good way - it's a main-env IO node in the pack:
cd ComfyUI/custom_nodes
git clone https://github.com/PozzettiAndrea/ComfyUI-GeometryPack.git
cd ComfyUI-GeometryPack
pip install -r requirements.txt --upgrade
python install.py
Or ComfyUI Manager → GeometryPack → Install, then restart. No heavy backends needed for saving.
Where people get burned
The "where did my file go" moment: it goes to ComfyUI/output/<folder_name>, not next to your workflow. The output_folder output is there precisely so you can check. Second gotcha: the trimesh input accepts a list, so if your upstream node outputs a list of meshes (a batch workflow), wire the list straight in rather than one at a time - the numbering handles the rest. And for anything you plan to print, remember STL ignores vertex colors and UVs; if the mesh has texture, export GLB instead or you'll wonder why the texture vanished. This is the "save your work" node, and like the rest of the pack it's young enough that the author genuinely wants bug reports - the README links straight to Issues.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| trimesh | TRIMESH | — | |
| folder_name | STRING | mesh_output | Name of the folder to create in the output directory |
| base_name | STRING | mesh | Base name for files (e.g., 'mesh' becomes 'mesh_001.obj'). Ignored if names provided. |
| format | COMBO | 7 options: obj, ply, stl, off, glb, gltf, +1 | |
| namesopt | STRING | Optional list of custom filenames (without extension). If provided, overrides base_name. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| output_folder | STRING | — |
| saved_count | INT | — |