Skip to content

Merge PR #2 — Hunyuan3D 2.1 paint subsystem (includes the clean-room rewrite) #5

Description

@jethac

PR #2 (devin/1788065256-hunyuan21-paint → master) is the feature-only rebase of the Hunyuan3D 2.1 texture-paint subsystem. It is open, mergeable and green apart from cla-assistant, which fails only because the fork's PERSONAL_ACCESS_TOKEN repository secret is empty — not a real signature failure.

It already includes the clean-room rewrite (PR #4, merged into the paint branch), which replaced unet.py and attention.py wholesale and spliced in the five camera/mesh functions plus view_scale_mapping without reading the old bodies (net −386 lines).

Validation as it stands:

  • Tier-2 parity against the reference UNet with real weights: final noise_pred max abs diff 8.7e-06, worst intermediate block 1.1e-03. Tolerances were not touched.
  • Getting there required fixing three real bugs the first clean-room push had (commit 33d1f4d9): material self-attention view/material layout scrambling, reference-attention value packing, and a learned_text_clip_ref device-placement crash. Before those fixes parity was 9.1e-01, i.e. wrong.
  • Fresh multiview albedo and textured-mesh renders were produced from the clean-room code on a GPU pod.
  • Attention routes through ComfyUI's shared optimized_attention (comfy/ldm/hunyuan3d/paint/attention.py), per AGENTS.md.

Known gap for anyone re-running the tests locally: the paint test collection needs safetensors, and a local Torch/TorchVision version mismatch surfaces as RuntimeError: operator torchvision::nms does not exist. Use a matched pair.

Action: merge #2 into the fork's master (protected branch, so a human or authorized agent has to do it). Upstream submission is tracked separately.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions