BD Cache Mesh
Freeze a generated mesh as GLB — materials, UVs and vertex colors included
- mesh
- mesh
- status
Image-to-3D is the slowest thing you'll ever run in ComfyUI. A TRELLIS2 or Hunyuan3D generation can take minutes, and when you're iterating on the downstream stage - simplification, UV unwrap, PBR bake, CubePart decomposition - you don't want to regenerate the mesh every time you touch a parameter. BD Cache Mesh is the freeze-frame for that stage: it saves a TRIMESH to disk and, on later runs, skips the entire upstream generation and loads the mesh straight back.
The format is GLB, and that choice is the whole point. The README's table says "PLY," but the shipped code is explicit: GLB, "to preserve PBR materials, UVs, and vertex colors" - with a sidecar pickle holding the metadata (edge colors, planar grouping results, anything attached to the mesh that GLB can't carry). A naive PLY cache would lose the material and the UVs, which is the thing that makes the mesh a finished asset rather than a gray blob. If you're coming from the 3D KB doc, you know the difference between "aesthetic surface" and "geometry that ships" - this cache preserves the shipping part.
The inputs
- mesh - the TRIMESH to cache. Comes out of TRELLIS2, Hunyuan3D, Pixal3D, or any BD mesh node.
- cache_name - label (default
cached_mesh). Name it after the asset, liketrellis_base_mesh, so you can find it later. - seed - invalidation key, hashed into the filename. Change it to force a fresh generation.
- force_refresh - True to overwrite and regenerate.
- name_prefix - optional path prefix under
output/BrainDead_Cache/.
Outputs: mesh (TRIMESH) and status (STRING). Wire the mesh on to your bake, simplify, or export chain.
The workflow shape
[image-to-3D node] → [BD Cache Mesh] → [BD CuMesh Simplify / OVoxel bake / export]
cache_name: "base_mesh"
seed: 42
First run generates and writes the GLB. Every run after that skips the generation model entirely and loads the mesh - materials, UVs, vertex colors intact. If you're dialing in a PBR bake or a CubePart segmentation, that's minutes per iteration saved, and it's the exact pattern the pack's own TRELLIS2 → FBX workflow uses.
Installing it
Part of BizaNator/ComfyUI-BrainDead (BrainDeadGuild). ComfyUI Manager → search "BrainDead" → install, or:
cd ComfyUI/custom_nodes
git clone https://github.com/BizaNator/ComfyUI-BrainDead
cd ComfyUI-BrainDead
pip install -r requirements.txt
Restart; it's under 🧠BrainDead/Mesh. It needs trimesh available - if the mesh nodes don't load, check that your environment has it, since a few of the pack's 3D features depend on it.
Gotchas
The seed trap again: change the source image but not the cache seed and you'll keep loading the old mesh. And unlike the 2D caches, there's a real storage cost - GLB files are big, and every seed you try spawns another hashed copy under output/BrainDead_Cache/. Keep the cache_names tight, and sweep the folder with BD Clear Cache when it swells. Also, if you cache a mesh and later change the mesh generation parameters (like the seed inside the generation node), bump the cache seed too - the cache can't know what you changed, only the seed hash.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| mesh | TRIMESH | — | |
| cache_name | STRING | cached_mesh | — |
| seed | INT | 00–18446744073709550000 | — |
| force_refresh | BOOLEAN | false | — |
| name_prefixopt | STRING | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| mesh | TRIMESH | — |
| status | STRING | — |