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

SAM 3D Body: Select Mesh File

Pick a saved mesh file and pass its path along, nothing more

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

    Easy to mix up with SAM3DBodyLoadMesh because the inputs are identical, but the jobs are different. SAM3DBodyLoadMesh reads a file and gives you back a usable mesh_data object. SAM3DBodySelectMesh doesn't load anything - it just resolves a file picker into a plain string path. Use it when the node downstream wants a STRING, not SAM3D_OUTPUT. It's a small, unglamorous node, but the distinction matters the first time you wire the wrong one into a graph and get a type-mismatch error you weren't expecting.

    How it works

    You pick a folder and a file from dropdowns, same as SAM3DBodyLoadMesh, but instead of reading and parsing the file's contents into a mesh object, this node just returns the resolved file path as text. It's a file browser, not a loader - cheap, instant, no parsing overhead.

    The inputs and outputs that matter

    • source_folder (default input) - which directory to browse.
    • file_path (dropdown) - the specific file, populated from what's actually present in that folder.

    One output: file_path (STRING) - just the resolved path as text, ready to feed into anything expecting a raw string rather than a loaded mesh object.

    How to install it

    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
    

    No separate dependency for this node - it's pure filesystem plumbing, doesn't touch the model or the SAM 3D Body checkpoint at all.

    Common issues & troubleshooting

    Confusing this with SAM3DBodyLoadMesh. If you wire this node's file_path output into something expecting SAM3D_OUTPUT, it'll error - this node never actually loads the mesh, it just names it. Use SAM3DBodyLoadMesh instead if you need the mesh data itself.

    Not obvious when you'd want a plain path over a loaded mesh. The clearest case: SAM3DBodyPreviewRiggedMesh takes a fbx_output_path string, not a mesh object. If you're pointing that node at a previously-exported FBX rather than one you just made with SAM3DBodyExportFBX in the same run, this node (or manually typing the path) is how you get that string into the graph.

    Dropdown is empty or missing your file. Same root cause as SAM3DBodyLoadMesh - check that source_folder is actually pointing at the directory your file landed in, especially if you're not sure whether an earlier export went to input, output, or somewhere relative to your ComfyUI launch directory.

    Weighing whether you need this node at all. For a single pass through a graph - export, then immediately preview or reload in the same run - you can usually just wire the exporting node's own path output straight downstream and skip this node entirely. It earns its place across sessions: once ComfyUI's been restarted and you've lost the in-graph connection to a file you exported earlier, this is the quick way to point back at it without retyping a path from memory.

    CategorySAM3DBody/IO

    Inputs (2)

    NameTypeDefaultDescription
    source_folderCOMBOinputSource folder to select mesh from
    file_pathCOMBOMesh file to select

    Outputs (1)

    NameTypeDescription
    file_pathSTRING