Hunyuan 3D 2.1 Bake MultiViews With MetaData
The bake node that remembers — it'll even notice when you upscaled your views
- pipeline
- albedo
- mr
- metadata
- albedo
- mr
- trimesh
- output_glb_path
Hy3DBakeMultiViews bakes your views into a texture and leaves them in RAM. Hy3DBakeMultiViewsWithMetaData bakes, inpaints, writes the textured mesh to disk, and saves a meta_data.json alongside it so the whole job is resumable - plus it has a genuinely clever trick: it detects whether you upscaled your views and saves the upscaled versions for the next stage. If you're doing anything beyond a one-shot texture job, this is the bake node you want.
It takes the pipeline, albedo, and mr from a metadata generator (Hy3D21MultiViewsGeneratorWithMetaData), plus that node's metadata (HY3D21METADATA), and returns the baked albedo/mr images, the final trimesh, and the output_glb_path string.
How it works
First the upscale detection: it checks the width of the incoming albedo views against the pipeline's configured resolution. Wider than expected? Then someone upscaled them - so it saves them as Albedo_Upscaled_*.png / MR_Upscaled_*.png in the same output folder and records the new file names in the metadata (that's how the "Use from MetaData" node knows to prefer them). Then the standard dance: pipeline.bake_from_multiview(...) with the camera config from metadata, pipeline.inpaint(...) to kill the seams, set the textures, save the mesh as <name>.glb in output/3D/<name>/, and finally dump meta_data.json.
The outputs
- albedo / mr - the final baked-and-inpainted textures as previewable
IMAGEs. - trimesh - the textured mesh, loaded straight back off disk.
- output_glb_path - where it landed. This node is the "make the file" step of the metadata pipeline.
Where it sits in the flow
Hy3D21MultiViewsGeneratorWithMetaData → Hy3DBakeMultiViewsWithMetaData is the canonical metadata pair. Insert an upscaler between them and you get the Mesh_Texturing_With_MetaData_Upscaled_With_Model workflow, where the bake automatically detects and uses the sharper views. After this node, the UseMultiViewsFromMetaData and HighPolyToLowPoly... nodes can reload the saved state.
Installing and troubleshooting
Same heavy install as every paint-pipeline node - it needs the differentiable renderer for the inpaint step:
cd ComfyUI/custom_nodes
git clone https://github.com/visualbruno/ComfyUI-Hunyuan3d-2-1
cd ComfyUI-Hunyuan3d-2-1
pip install -r requirements.txt
# + the C++ wheels (custom_rasterizer, mesh_inpaint_processor)
The common failure is a missing or stale meta_data.json - if you generated views with the plain generator and feed that output here, there's no metadata and the node can't find the mesh name or camera config. Always pair the metadata generator with this node. And if the upscaled views look worse than the originals, the detection isn't the problem - your upscaler is; the node just prefers the bigger images.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| pipeline | HY3DPIPELINE | — | |
| albedo | IMAGE | — | |
| mr | IMAGE | — | |
| metadata | HY3D21METADATA | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| albedo | IMAGE | — |
| mr | IMAGE | — |
| trimesh | TRIMESH | — |
| output_glb_path | STRING | — |