Nodes/ComfyUI-BPT/Trimesh Load
ComfyUI Node

Trimesh Load

Pull any mesh file into your workflow

By Easymode-ai·Created about a year ago·Updated about a year ago· 12
Trimesh Load
    • trimesh
    load_path
    file_format

    Trimesh Load is the front door of ComfyUI-BPT: it reads a mesh file off your disk and hands it to the graph as a TRIMESH, the mesh type the whole pack runs on. It's a thin utility node - the node description is literally "Loads a model from the given path" - but it's what lets you feed your own geometry into the BPT remesher instead of only working with meshes generated inside ComfyUI.

    Its most useful job is the one the README calls out directly: take the .glb that Microsoft's TRELLIS outputs, load it here, and run it through the pack's BPT node for a cleanup or detail pass. It also works with output from kijai's ComfyUI-Hunyuan3DWrapper, since that wrapper speaks the same TRIMESH type this pack defines.

    How it works

    The node is a thin wrapper around the Python trimesh library: it calls trimesh.load() with force="mesh" and the format you select. That means it loads the geometry - vertices and faces - and doesn't drag textures or full scene structure along. For remeshing purposes that's exactly what you want; you're feeding geometry in, and geometry is what comes out.

    Inputs and output

    Two inputs, and only one should ever give you trouble:

    • load_path (STRING) - the path to the mesh file. No ComfyUI file-browser dropdown here; you type or paste a path. An absolute path is the most reliable option, and the format you pick needs to match the file you point at.
    • file_format - glb, obj, ply, stl, 3mf, or dae. Pick the one that matches your file's extension.

    The single output is trimesh (TRIMESH) - wire it into the BPT node to remesh it, or into Trimesh Save to re-export it in another format. That load-then-resave loop is genuinely handy for converting between formats, by the way: load an obj, save as glb.

    Installing the pack

    Same install as the rest of the pack. ComfyUI Manager: search "ComfyUI-BPT". Or manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Easymode-ai/ComfyUI-BPT
    

    Then install dependencies (the README runs this against the portable install's Python):

    cd ComfyUI/custom_nodes/ComfyUI-BPT
    ..\..\..\python_embeded\python.exe -m pip install -r requirements.txt
    

    Heavy dependency list - trimesh itself plus deepspeed and torch_geometric for the BPT node - so budget some install time. For just loading a mesh you don't need the BPT weight file.

    Troubleshooting

    • File not found / can't load. The path is a raw string - double-check it's a full path, not relative, and that the file_format you selected matches the actual file extension. A .obj loaded as glb will fail.
    • Model loads but looks wrong in a viewer. Remember it's geometry-only (force="mesh"). Textures and materials don't survive - that's by design, not a bug.
    • Pasted a Windows-style path on Linux (or vice versa)? Normalize the slashes; trimesh won't fix them for you.

    If you're generating meshes entirely inside ComfyUI - Hunyuan3D or TRELLIS - you may never need this node. The moment you want to remesh something you already own, it's the on-ramp.

    CategoryBPT

    Inputs (2)

    NameTypeDefaultDescription
    load_pathSTRINGThe path of the mesh to load.
    file_formatCOMBO6 options: glb, obj, ply, stl, 3mf, dae

    Outputs (1)

    NameTypeDescription
    trimeshTRIMESHThe model of the mesh to load.