Nodes/ComfyUI-Hunyuan3d-2-1/Hunyuan 3D 2.1 Mesh Generator2
ComfyUI Node

Hunyuan 3D 2.1 Mesh Generator2

The same generator, but the model arrives as a path

By visualbruno·Created about a year ago·Updated 5 days ago· 375
Hunyuan 3D 2.1 Mesh Generator2
  • image
  • latents
model_path
steps50
guidance_scale5.0
seed0
attention_modesdpa

The name is the whole story here, and it's a little anticlimactic: Hunyuan 3D 2.1 Mesh Generator2 does exactly what the first Mesh Generator does, with one difference - the model comes in as a string path instead of a dropdown picker. If you've loaded a workflow and wondered why the pack ships two nearly identical generator nodes, this is the answer: it's the sibling designed to be driven by the pack's own model loader.

Like the original, this node runs Tencent's Hunyuan3D-2.1 DiT (the diffusion transformer that powers image-to-3D) through a flow-matching pipeline, conditioned on an input image, and outputs latents - the shape's compressed representation, not a mesh. You still chain it into Hy3D21VAEDecode with a VAE to get actual geometry, then post-process and export. All the shape-side machinery is identical to Hy3D21MeshGenerator; only the plumbing for which model file gets loaded has changed.

Why would you use the path variant? Because it lets the graph be self-contained. The intended chain is:

  • Hy3D21ModelLoader - no inputs, downloads the weights if missing, and outputs model_path (a STRING) plus a ready vae.
  • Mesh Generator2 - takes that model_path string and your image.
  • Hy3D21VAEDecode - takes the vae and the latents.

Wire it that way and there's no "which file is in the dropdown" state to babysit. The loader decided the model; the generator just uses it. You can also type the path in manually if you're building the graph by hand.

The inputs that matter:

  • model_path - an absolute path to the fp16 DiT checkpoint (e.g. ComfyUI/models/diffusion_models/hunyuan3D-dit-v2-1-fp16.ckpt). This is the one real difference from the dropdown node.
  • image - your source picture; clean subject, plain background, since background removal is disabled in the source.
  • steps (default 50), guidance_scale (default 5.0), seed, attention_mode (sdpa default, or sageattn if you've installed sageattention yourself).

Output. One latents (HY3DLATENT), which feeds Hy3D21VAEDecode.

A gotcha worth knowing before your first run. The loader specifically looks for files named hunyuan3D-dit-v2-1-fp16.ckpt and Hunyuan3D-vae-v2-1-fp16.ckpt (note the -fp16 suffix). The README's manual-download instructions use names without that suffix. If you followed the README by hand, the loader won't recognize your download and will quietly re-fetch ~6.9 GB. Either let the loader download its own files, or name yours to match.

Install. Same as the rest of the pack: ComfyUI Manager (search "Hunyuan3d"), or git clone https://github.com/visualbruno/ComfyUI-Hunyuan3d-2-1 into ComfyUI/custom_nodes, then pip install -r requirements.txt. Python 3.12 is the supported target; 3.13 breaks the pack's prebuilt wheels, and the C++ wheel dance is only needed for the texturing nodes anyway. Windows is the tested path - on Linux expect to compile anything texturing-related yourself, though plain mesh generation runs.

So which generator should you use? If the Model Loader is already in your graph, use this one - it's the pair they were designed for. If you're hand-loading models and prefer a dropdown, the original Mesh Generator is right there.

CategoryHunyuan3D21Wrapper

Inputs (6)

NameTypeDefaultDescription
model_pathSTRING
imageIMAGEImage to generate mesh from
stepsINT501–100Number of diffusion steps
guidance_scaleFLOAT5.01–30Guidance scale
seedINT00–18446744073709550000
attention_modeCOMBOsdpa2 options: sdpa, sageattn

Outputs (1)

NameTypeDescription
latentsHY3DLATENT