# hunyuan3d-swift

Swift and Python MLX ports of the Hunyuan3D image-to-3D pipeline for Apple Silicon, turning a photo into a textured 3D mesh through separate shape and paint stages, with a bundled command-line tool.

hunyuan3d-swift ports the Hunyuan3D shape and texture-painting pipelines to Swift and Python, using Apple's MLX framework so the models run on Apple Silicon. The Swift package sits at the root of the repository, alongside Python MLX ports under a separate directory; the Swift code is checked against Python fixtures, and the Python ports are checked against the original PyTorch implementation.

Two libraries, Hy3DMLX for shape generation and HunyuanPaintMLX for texture generation, are exposed through a command-line tool called hy3d, which can generate a shape, paint an existing mesh, or chain both steps from a single photo into a textured 3D model file. Four model weight configurations are supported, covering small and large variants for both shape and paint. The Swift source is released under the MIT license; bundled dependencies, model weights and algorithm ports keep their own licenses.

Website: https://github.com/ZimengXiong/Hunyuan3D-Swift
