Skip to content

feat(model): Integrate Hunyuan3D Pro api as one of image/text-to-3D backend.#71

Open
HochCC wants to merge 6 commits into
masterfrom
feat-hunyuan3d
Open

feat(model): Integrate Hunyuan3D Pro api as one of image/text-to-3D backend.#71
HochCC wants to merge 6 commits into
masterfrom
feat-hunyuan3d

Conversation

@HochCC
Copy link
Copy Markdown
Collaborator

@HochCC HochCC commented May 25, 2026

Adds HUNYUAN3D as a third backend alongside SAM3D and TRELLIS for both img3d-cli and text3d-cli, calling Tencent Cloud Hunyuan3D Pro via the SubmitHunyuanTo3DProJob action.
image

HochCC and others added 4 commits May 22, 2026 13:23
Adds HUNYUAN3D as a third backend alongside SAM3D and TRELLIS for both
img3d-cli and text3d-cli, calling Tencent Cloud Hunyuan3D Pro via the
SubmitHunyuanTo3DProJob action. Result tree (mesh/material.mtl +
Material.001.png + <asset>.obj/.glb/_collision.obj + 4 PBR PNGs +
<asset>.urdf + video.mp4) matches the SAM3D/TRELLIS layout; gs.ply is
intentionally absent since Hunyuan has no Gaussian output.

- embodied_gen/models/hunyuan3d.py: new module with TC3-HMAC-SHA256 client
  (stdlib http.client + urllib, no new deps), submit/poll/download flow
  shared between image and text endpoints, GLB->OBJ+MTL+PBR export with
  optional pre-align rotation (text endpoint sits 90 offset around the
  up axis vs image), URDFGen-scaled GLB rewrite that restores PBR maps
  the trimesh roundtrip strips.
- embodied_gen/scripts/imageto3d.py: --image3d_model selector with lazy
  per-backend pipeline cache; HUNYUAN3D path early-continues to
  process_image after segmentation. SAM3D/TRELLIS main loop unchanged.
- embodied_gen/scripts/textto3d.py: --image3d_model forwarded to
  imageto3d for SAM3D/TRELLIS; HUNYUAN3D skips text-to-image and runs
  process_prompt directly. PIPE_IMG / BG_REMOVER / SEMANTIC_CHECKER /
  SEG_CHECKER lazily constructed so HUNYUAN3D runs do not load SD/Flux.
  --n_pipe_retry forced to 1 in HUNYUAN3D mode (Tencent API is billed
  per submit).
- embodied_gen/data/utils.py: save_mesh_with_mtl glossiness default 250
  so Blender's OBJ Phong path shows specular highlights instead of the
  trimesh-default Ns=1 matte.
- embodied_gen/validators/urdf_convertor.py: URDF template empty
  <gs_model></gs_model> to avoid the XML entity escape when no Gaussian
  path is set.
- embodied_gen/data/backproject_v3.py: raise --n_max_faces default to
  50000 for richer SAM3D output.
- docs/tutorials/{image,text}_to_3d.md: backend selector + Hunyuan3D
  credential setup + proxy notes.

Credentials read from TENCENT_SECRET_ID / TENCENT_SECRET_KEY (or
TENCENTCLOUD_* fallbacks); missing credentials fail fast before any
network I/O. Logs never include secrets, signed headers, base64 image
payloads, or signed download URLs. HTTPS_PROXY tunneled via
HTTPSConnection.set_tunnel since http.client does not auto-honor the env.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@HochCC HochCC changed the title feat(model): Integrate Hunyuan3D Pro as image/text-to-3D backend. feat(model): Integrate Hunyuan3D Pro api as one of image/text-to-3D backend. May 25, 2026
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