Nodes/ComfyUI-Batch-Process/3D Model Batch Saver
ComfyUI Node

3D Model Batch Saver

Batch-Save Every 3D Model in Your Graph, Captions Included

By Zar4X·Created about a year ago·Updated 10 days ago· 16
3D Model Batch Saver
  • models
    contents
    output_path
    filename_prefixM3D
    filename_delimiter_
    filename_suffix
    filename_number_padding4
    filename_numberend
    default_extensionglb

    ComfyUI's native 3D layer treats generated models as real socket types - a MESH (a batch of meshes, the sort of thing Hunyuan3D or TRELLIS hands you) or a File3D (a reference to a file on disk). The stock SaveGLB writes one of them at a time. If you're churning out a dozen props in a batch, that's a dozen save nodes or a python script. Model3DBatchSaver is the pack's answer: one node at the end of the graph that writes the whole batch to disk with clean sequential filenames - and, like the pack's ImageBatchSaver, an optional .txt caption next to every model.

    This is the natural endpoint of a 3D-generation workflow, and it's the one you'd actually reach for once the novelty of watching meshes appear wears off. The KB's honest verdict on generated 3D applies here too: these models are great for static props and 3D printing, not for animation-ready geometry - so batch-exporting a shelf of props is exactly the job. If you were going to rig them, no saver will save you.

    How it works

    The node takes whatever you hand it and flattens it into a list of individual models. MESH batches get split per-model, File3D items pass through, and plain path strings (with a 3D extension) get copied. Then for each model it builds a filename, checks what's already in the output folder, and continues the counter from the highest existing number - so re-running never overwrites anything, it just keeps numbering up.

    The naming logic is the part you'll actually touch:

    • filename_prefix (default M3D) - the base name; filename_suffix and filename_delimiter (default _) wrap around it.
    • filename_number - off, start, or end. Default is end, so you get M3D_0001 rather than 0001_M3D.
    • filename_number_padding (default 4, 1–9) - how many digits the counter uses.
    • output_path - blank saves to ComfyUI's default output/; give it an absolute path or a subfolder under output.
    • default_extension - glb, gltf, obj, fbx, stl, ply, or usdz.

    And the one that trips everyone: the default_extension picker only affects naming and the collision check. The author's tooltip says it straight: "MESH always writes as .glb. File3D items keep their own extension." Generated meshes can't be re-exported as obj from this node - you get GLB, full stop. If you need a different format you convert afterward.

    The captions

    contents is an optional STRING input (forced to a socket, so you wire it in) that gets written as a .txt file next to each model - M3D_0001.glb plus M3D_0001.txt. Pass a list and it's applied per-model, one caption each. That's the same image-caption pairing the pack does for training data, extended to 3D, and it's a nice touch if you're building a small asset library or a dataset and don't want to hand-write sidecar files.

    Installing it

    Part of the ComfyUI-Batch-Process pack - ComfyUI Manager (search "ComfyUI-Batch-Process") or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Zar4X/ComfyUI-Batch-Process
    

    Restart after. Dependencies are just Pillow and torch, nothing heavy. But there's a real catch here: this node leans on ComfyUI's own 3D helpers (comfy_extras.nodes_save_3d), which only exist in reasonably recent ComfyUI builds. On an older install it imports them as None and the node fails with a "GLB writer unavailable" or "requires comfy_extras.nodes_save_3d" error. If you see that, update ComfyUI - it's not the pack's fault.

    Common issues

    • You asked for .obj and got .glb. Expected behavior, not a bug - MESH always writes GLB. File3D items (loaded files) keep their original extension.
    • "string does not look like a 3D model path." Path strings must end in a recognized 3D extension; the node rejects random text.
    • One bad model kills the batch? No. Errors are caught per-item, logged, and the rest still save. An empty or unconnected models input just logs a warning and does nothing.
    • Files keep numbering up, not overwriting. That's the counter scanning existing files - embrace it.

    If you batch-generate 3D assets at all, this is the loop-in-a-box that turns a pile of output into an actual folder of numbered, captioned models.

    CategoryBatch Process

    Inputs (9)

    NameTypeDefaultDescription
    modelsopt*MESH batch, File3D, or list of either / paths (e.g. AnyBatchGroup output)
    contentsoptSTRINGOptional caption written next to each model as .txt
    output_pathoptSTRING
    filename_prefixoptSTRINGM3D
    filename_delimiteroptSTRING_
    filename_suffixoptSTRING
    filename_number_paddingoptINT41–9
    filename_numberoptCOMBOend3 options: off, start, end
    default_extensionoptCOMBOglbUsed only for naming/collision check. File3D items keep their own extension; MESH always writes as .glb

    Outputs (0)

    No outputs