Skip to content

Add Hunyuan 3D 2.1 - #113

Draft
choppu wants to merge 13 commits into
mainfrom
choppu/3d-models
Draft

choppu wants to merge 13 commits into
mainfrom
choppu/3d-models

Conversation

@choppu

@choppu choppu commented Nov 20, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

@choppu choppu changed the title Choppu/3d models Add Hunyuan 3D Nov 20, 2026
@choppu choppu changed the title Add Hunyuan 3D Add Hunyuan 3D 2.1 Nov 20, 2026
Hunyuan3D marks each view of an object with a fixed sincos offset -- the view index
expanded to the tower's width -- and concatenates the marked grids into one context, so the
transformer reads "which view is which" while the latents stay unpositioned. Tencent's
`DinoImageEncoderMV` and ComfyUI's `Hunyuan3Dv2ConditioningMultiView` agree on that recipe
down to keeping the CFG null zeros at the concatenated width; both address views by slot
name (front, left, back, right) with the rest falling back to the background colour. Here
the slot is positional: the pictures arrive in that order, and one picture takes no offset
at all, which leaves the verified single-image path untouched.

Two pictures used to reach the DiT as a batch of two conditionings against batch-one
latents, which is silent garbage rather than an error; views now flatten into the sequence
dimension instead. The ceiling -- four -- is `len(VIEW_SLOTS)`, reported as
`caps.mesh.mv2d` and refused at the request boundary. `image` accepts one picture or
several, on the CLI by repeating `--image`, over HTTP as one value or a list, which is the
convention the image medium already used before it was dropped from its docs.

The offsets are built on the device of the tokens they join: they were built on the host,
and the first hardware run said so at once.

A 2.1 finetune trained with views cannot be told apart from one that was not -- the offsets
are not weights -- so nothing here needs to declare it. The 2.0 family, which is where the
maintained multi-view weights live today, is its own model and written up in models/3d.md.
…ned with

`DinoImageEncoder` -- the conditioner the 2.1 file ships -- concatenates nothing and marks
nothing, so a view offset is a number its tower has never met. The model advertised four
view slots anyway, on the reasoning that a view-trained finetune would be indistinguishable
in its weights; that argument survives, but advertising what the shipped checkpoint cannot
read costs the form picture slots it should never have offered. `hunyuan3d-shape` caps at
`i2d` alone now, and the medium refuses a second picture at the request boundary instead of
quietly keeping the first -- a dropped reference is a shape nobody asked for.

Several pictures stay a thing the *medium* can express: `image` takes one or many on the
CLI, over HTTP and in the spec, `mv2d` stays a mode, and the marking -- a sincos of the view
index added to one view's tokens -- stays in the conditioner for the model that wants it,
which is the 2.0 `-mv` family. What a model can be conditioned on is a capability, so the
form asks rather than knows: `applyModelState` sets the file input's `multiple` and the
views hint from `caps.mesh.mv2d`, and the mesh screen reads that to decide both how many
pictures to collect and whether to call them views.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant