Nodes/BrainDead Nodes/BD Cache Trellis2 Texture
ComfyUI Node

BD Cache Trellis2 Texture

Cache the textured mesh and the voxelgrid — the last slow stage of TRELLIS2

By BizaNator·Created 8 months ago·Updated 3 days ago· 15
BD Cache Trellis2 Texture
  • trimesh_out
  • voxelgrid
  • pbr_pointcloud
  • shape_voxelgrid
  • shape_pbr_pointcloud
  • trimesh
  • voxelgrid
  • pbr_pointcloud
  • shape_voxelgrid
  • shape_pbr_pointcloud
  • status
cache_nametrellis2_texture
seed0
force_refreshfalse
name_prefix

The last stage of a TRELLIS2 workflow - texturing the mesh - is also the one that produces the most outputs you're going to want to keep. BD Cache Trellis2 Texture caches the whole result bundle at once, so you can iterate on everything downstream (baking, exporting, CubePart segmentation) without regenerating the texture stage. Its description tells you where it goes: "Place AFTER Trellis2ShapeToTexturedMesh node."

What makes this node distinctive is that it caches four things together, not one:

  • trimesh_out - the textured TRIMESH
  • voxelgrid - the TRELLIS2 VOXELGRID (the structured latent, per the KB's TRELLIS panel this is the field-free "O-Voxel" representation TRELLIS.2 uses)
  • pbr_pointcloud - the PBR attribute point cloud
  • shape_voxelgrid / shape_pbr_pointcloud - optional, for "dual conditioning" workflows where shape and texture use separate voxelgrids

All of them come back on a cache hit, in the same types they went in. The lazy-evaluation machinery skips the ShapeToTexturedMesh node and everything upstream when the cache is valid - so combined with the conditioning and shape caches, the entire three-stage TRELLIS2 run can be reduced to "load from disk." That's the OVoxel baking pattern the pack's docs push: bake once, cache, re-bake from the cached voxelgrid without regenerating.

The inputs

  • trimesh_out, voxelgrid, pbr_pointcloud - required, from Trellis2ShapeToTexturedMesh.
  • shape_voxelgrid, shape_pbr_pointcloud - optional, for dual-conditioning setups.
  • cache_name - label (default trellis2_texture).
  • seed - invalidation key. Change it to force a fresh texture pass.
  • force_refresh - True to overwrite and regenerate.
  • name_prefix - optional path prefix.

Outputs: trimesh, voxelgrid, pbr_pointcloud, plus shape_voxelgrid and shape_pbr_pointcloud (passed through when wired), and status.

The workflow shape

[Trellis2ShapeToTexturedMesh] → [BD Cache Trellis2 Texture] → [OVoxel bake / export / CubePart]
                                 cache_name: "textured_01"
                                 seed: 42

First run textures and caches everything. Every run after that skips the texture stage and hands you the identical bundle. From here the voxelgrid feeds a PBR bake or the BD Load OVoxel reload pattern, and the trimesh feeds the mesh pipeline - both from cache.

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/TRELLIS2.

Gotchas

Seed-keyed like all of them - change the source or the texture parameters, bump the seed. Two TRELLIS2-specific notes. First, this cache stores internal voxelgrid/pointcloud objects; if you update your TRELLIS2 pack and start seeing load errors, that's a version mismatch, and one force_refresh run re-creates the cache. Second, storage is real - voxelgrids and point clouds aren't tiny - so don't sprinkle a dozen named variants around without cleaning up with BD Clear Cache. And the optional shape inputs only pass through: if you wire them, they get cached too; if you don't, they come back empty on a hit, so keep your wiring consistent.

Category🧠BrainDead/TRELLIS2

Inputs (9)

NameTypeDefaultDescription
trimesh_outTRIMESH
voxelgridVOXELGRID
pbr_pointcloudTRIMESH
cache_nameSTRINGtrellis2_texture
seedINT00–18446744073709550000
force_refreshBOOLEANfalse
shape_voxelgridoptVOXELGRID
shape_pbr_pointcloudoptTRIMESH
name_prefixoptSTRING

Outputs (6)

NameTypeDescription
trimeshTRIMESH
voxelgridVOXELGRID
pbr_pointcloudTRIMESH
shape_voxelgridVOXELGRID
shape_pbr_pointcloudTRIMESH
statusSTRING