Pixal3D for MLX (single view)
The single-view projection-conditioned flows of TencentARC/Pixal3D
(SIGGRAPH 2026), converted for mlx-trellis2-swift (v0.13.0+; lanes v0.14.0; Pixal3DPackage v0.15.0; v0.16.0 current)
("Pixal3D mode"), plus the NAF feature upsampler those flows use.
Pixal3D is TRELLIS.2 with its three flow models retrained so the image features are back-projected through a
camera onto every voxel. The flows here are the only part that differs. The decoders, the DINOv3 image
conditioner and the latent normalization are TRELLIS.2's and come from
xocialize/trellis2-mlx; this repo does not contain DINOv3.
Built with DINOv3. The flows are conditioned on DINOv3 features, so a working pipeline always pairs them
with the DINOv3 conditioner from xocialize/trellis2-mlx, under the DINOv3 License (gated there).
This is a pipeline artifact for mlx-trellis2-swift, not a general model distribution. For the original
PyTorch weights, see TencentARC/Pixal3D.
Use (mlx-trellis2-swift ≥ v0.15.0, mlx-engine-swift ≥ 0.79.0)
Register the Pixal3D lane as its own package. It declares this repo and xocialize/trellis2-mlx as weight
sources, so an MLXEngine host downloads both on first use. The DINOv3 gate on xocialize/trellis2-mlx
needs an HF_TOKEN that has accepted it.
let id = try await engine.register(Pixal3DPackage.registration,
configuration: .pixal3dLane(ImageTo3DContract.res1024), id: "pixal3d")
let response = try await engine.run(
ImageTo3DRequest(image: mattedPhoto, mode: ImageTo3DContract.res1024,
cameras: [ImageTo3DCamera(fovXDegrees: 20)]), package: id) as! ImageTo3DResponse
// response.camera: the photo's camera in the mesh's frame; response.frame: .front
Measured lane footprints (M5 Max 128 GB): res1024 70.4 GB charged, res1536 75.3 GB. With
flowWeightsBF16 (v0.16.0) they are 59.4 / 64.3 GB: byte-identical output, 8–15 % slower. Pixal3D has no
res512 mode. The mesh comes back in the photo's camera frame, rotated to Z-up (package README, "Pixal3D mode").
Field of view. Single view takes the photo's horizontal FOV. The default, 20°, was validated on matted studio product shots only. For other photos (phone shots, wide lenses), pass the real FOV, for example from EXIF; upstream estimates it with MoGe-2, which is not part of this port.
Turnaround sheets (posed multi-view, v0.16.0): Pixal3DPackage.turnaroundCameras(["front", "left", "back", "right"], fovXDegrees: 20) builds the cameras for named views. The multi-view weights are not in this repo. For a local copy instead,
hf download xocialize/pixal3d-mlx --local-dir <dir> and pass pixal3dWeightsDir: <dir>.
| File | What | Source |
|---|---|---|
pixal3d_struct_flow.safetensors | sparse-structure flow | ckpts/ss_flow_img_dit_1_3B_64_bf16.safetensors |
pixal3d_shape_flow_512.safetensors | shape flow, LR cascade pass | ckpts/slat_flow_img2shape_dit_1_3B_512_bf16.safetensors |
pixal3d_shape_flow_1024.safetensors | shape flow, HR cascade pass | ckpts/slat_flow_img2shape_dit_1_3B_1024_bf16.safetensors |
pixal3d_tex_flow_1024.safetensors | texture flow | ckpts/slat_flow_imgshape2tex_dit_1_3B_1024_bf16.safetensors |
naf.safetensors | NAF upsampler (0.66 M params) | valeoai/NAF release asset naf_release.pth |
Conversion (Tools/pixal3d/convert_weights.py in the package): converted from TencentARC/Pixal3D at
revision b0cb2e1b, fp32 on disk → bf16 storage. The keys use the package's module names
(cross_attn.cross_attn_block.* → cross_attn.*, proj_linear kept), and the SS flow's complex
rope_phases buffer is dropped (it is computed at run time). NAF stays fp32 with its torch keys.
SOURCE.json lists the sha256 of every source and output file.
Not included: the posed multi-view (_mv) flows. They are ported and gated, but their shape samplers reach
cosine 0.988 against the 0.99 parity gate, so they are not published yet.
Parity: every stage is gated against CUDA goldens from upstream Pixal3D (f7cf384). Conditioning
matches at cosine 0.999999, the NAF output at 1.000000, and the samplers at 0.995–0.99994. A chain with the
oracle's topology injected gives a mesh with F-score 0.98–0.99 at one voxel. Details are in the package
README, "Pixal3D mode".
Licences and attribution
- Pixal3D code and weights: MIT, © 2026 Tencent (
LICENSE, andNOTICEfrom revisionb0cb2e1b). - NAF: Apache-2.0, valeo.ai (
NAF_LICENSE). - Provenance: converted from
TencentARC/Pixal3Drevisionb0cb2e1b(MIT relicense of 2026-05-20). The HF card of the upstream repo still carries anextra_gated_eu_disallowedfield from its first, academic-only licence; the repo is not gated and the MIT text has no territory clause. This is a reading of the published texts, not legal advice. - The DINOv3 conditioner the flows expect ships separately under the DINOv3 License with
xocialize/trellis2-mlx("Built with DINOv3").