Decode CraftsMan Latents
Turning shape latents into triangles (octree depth is the dial)
- pipeline
- shape_latents
- mesh_vf
The sampling node decides what the object is. This one decides how finely it gets carved. Decode CraftsMan Latents takes the shape latents from Sample CraftsMan Latents and turns them into an actual mesh - vertices and faces you can hold. It's the moment the latent stops being a number and becomes geometry.
If you only remember one thing about this node, make it this: octree_depth is the resolution dial, and it costs you memory at a brutal rate. The mesh is carved out of a volume grid with 2^octree_depth cells per side. Depth 7 means a 128³ grid (2,097,152 cells). Depth 8, the default, means 256³ - 16.7 million cells. That's an eightfold jump in memory between those two settings, which is exactly why the pack's own example workflow includes a note spelling out "7 = 128³, 8 = 256³." Go to 9 or 10 and you'd better have a serious GPU and a lot of patience.
How it works
Mechanically it's the DoraVAE shape model's extract_geometry doing the work. The latents are fed through a hierarchical volume decoder that predicts occupancy across the octree grid, then a marching-cubes pass (extract_mesh_func="mc" in the config) pulls a triangle surface out of the occupancy field. That's why the pack's requirements list both PyMCubes and scikit-image - marching cubes is a genuine dependency, not a suggestion.
Inputs
Only three, and two of them are boilerplate:
pipeline- the loaded pipeline.shape_latents(LATENT) - straight fromSample CraftsMan Latents. It's a standard latent dict, but don't try to feed it an image-model latent; the DoraVAE expects its own code space and will produce garbage geometry (or an error) otherwise.octree_depth(8, 5–10) - the one you'll actually touch. 8 is the sweet spot for most hardware; drop to 7 when VRAM is tight; reserve 9+ for when the mesh genuinely needs the detail and you can afford the wait.
The output
mesh_vf (GEOMETRY_VF) - the pack's custom socket for a {"vertices": tensor, "faces": tensor} pair. It's not a file and not directly previewable; you have to pass it through Save CraftsMan Mesh to get something on disk, or keep it in memory if another node in this pack ever learns to consume it. For now, save is the only realistic destination.
Install and gotchas
Same pack, same install:
cd ComfyUI/custom_nodes
git clone https://github.com/hunzmusic/Comfyui-CraftsMan3DWrapper
cd ComfyUI-CraftsMan3DWrapper
pip install -r requirements.txt # portable: ..\..\..\python_embeded\python.exe -m pip install -r requirements.txt
The decode is the second VRAM peak of the workflow (after sampling), so if you survive sampling and die here, octree_depth is your lever. Also note the mesh you get is coarse by design - this wrapper skips CraftsMan3D's multi-view refinement stage, so don't blame the decoder for the low-poly look. It's carving exactly as finely as you told it to, and what's missing is the second stage, not the first.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| pipeline | CRAFTSMAN_PIPELINE | — | |
| shape_latents | LATENT | — | |
| octree_depth | INT | 85–10 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| mesh_vf | GEOMETRY_VF | — |