Nodes/ComfyUI-SAM3DBody/SAM 3D Body: Load Mesh
ComfyUI Node

SAM 3D Body: Load Mesh

Reload a saved mesh without burning GPU time on inference again

By PozzettiAndrea·Created 9 months ago·Updated 2 months ago· 321
SAM 3D Body: Load Mesh
    • mesh_data
    source_folderinput
    file_path

    Running SAM 3D Body inference isn't free - it needs the model loaded and a real forward pass per photo. If you've already exported a mesh with SAM3DBodyExportMesh and want to keep iterating on the downstream part of your graph - visualizing it differently, trying different export settings, feeding it into SAM3DBodyGetVertices - you don't need to re-run the whole detection-and-reconstruction pipeline every time. SAM3DBodyLoadMesh reads a mesh straight from disk and hands it back as mesh_data, same type as if you'd just generated it fresh.

    How it works

    Point it at a source folder and a specific file, and it loads that file into the same SAM3D_OUTPUT type every Process node produces. From the rest of your graph's perspective, there's no difference between a mesh that came from SAM3DBodyLoadMesh and one that came straight out of SAM3DBodyProcess - it's a drop-in, just skipping the model and the image entirely.

    The inputs and outputs that matter

    • source_folder (default input) - a dropdown for which folder to look in. Defaults to ComfyUI's input directory, which is where you'd typically drop a mesh file you want to reuse.
    • file_path (dropdown) - the specific file within that folder. This populates based on what's actually in the source folder, so you'll want the mesh file already sitting there before you open this node's dropdown.

    One output: mesh_data (SAM3D_OUTPUT) - usable anywhere a Process node's mesh output would be: SAM3DBodyVisualize, SAM3DBodyExportMesh, SAM3DBodyExportFBX, SAM3DBodyGetVertices.

    How to install it

    Comes bundled with the pack. Via ComfyUI Manager: search SAM3DBody, install, restart. Manual install:

    cd ComfyUI/custom_nodes
    git clone https://github.com/PozzettiAndrea/ComfyUI-SAM3DBody.git
    cd ComfyUI-SAM3DBody
    pip install -r requirements.txt --upgrade
    python install.py
    

    Nothing extra to download for this node itself - it reads files you've already produced, no dependency on the gated SAM 3D Body checkpoint or the model loader at all.

    Common issues & troubleshooting

    File doesn't show up in the file_path dropdown. Make sure the file actually landed in the folder source_folder points at - recall that a few people on the pack's release thread reported exports going to a folder relative to where ComfyUI was launched rather than the expected input/output locations. If a file you know you exported isn't showing up here, that's the first place to check.

    Loaded mesh doesn't match what you remember exporting. Confirm you're pointing at the right file - if you've exported several meshes with similar names during iteration, it's easy to grab the wrong one from the dropdown.

    You actually just wanted the file path as a string, not the loaded mesh object. That's SAM3DBodySelectMesh instead - same source-folder/file-path inputs, but it hands back a plain STRING path rather than loading the mesh data into memory. Use that one if you're feeding a path into something like SAM3DBodyPreviewRiggedMesh rather than a node that expects SAM3D_OUTPUT.

    CategorySAM3DBody/IO

    Inputs (2)

    NameTypeDefaultDescription
    source_folderCOMBOinputSource folder to load mesh from
    file_pathCOMBOMesh file to load. Supports FBX, OBJ, PLY, STL, GLB, etc.

    Outputs (1)

    NameTypeDescription
    mesh_dataSAM3D_OUTPUT