mlx-spatial

MLX · Apple silicon · inference only

Pixels in.
Geometry out.

image mesh scene

An open-source library for 3D and spatial inference in MLX. Object reconstruction, image-to-mesh, scene geometry, Gaussian splats, and multi-view bundles — running on the Apple GPU, with a native Metal mesh pipeline behind them.

Read the source ↗ Start Weights not bundled

What it is

The run ends in a file, not a preview.

Pure MLX on the Apple GPU

Diffusion, transformer, and reconstruction stacks run in MLX. A native C++/Metal extension carries the mesh work that does not belong in Python.

Real files, not renders

Every pipeline writes something a tool can open — a GLB, a PLY, an NPZ bundle. Drop it into Blender or a viewer and keep working.

Weights stay outside

Checkpoints are downloaded separately and validated before use. Nothing is vendored into the wheel, and every upstream licence stays with its weights.

Pipelines

Different questions want different files.

These pipelines deliberately do not share one output type. A splat is not a mesh, and a scene bundle is neither. The mapping is the product.

Object reconstruction

image + maskGaussian PLY, optional GLB

SAM 3D Objects

Image to textured mesh

object-centric RGB/RGBAshape OBJ or textured GLB

TRELLIS.2

Scene reconstruction

scene image or framescamera, depth, normals, point cloud

HY-WorldMirror 2.0

Image to Gaussian splat

object-centric RGB/RGBA3DGS PLY

LiTo

Multi-view scene bundle

related scene viewsNPZ of depth, cameras, world points

MapAnything

Every pipeline ships a command-line entry point, and each one names its own output rather than hiding behind a shared wrapper. More pipelines are in development; the repository tracks which paths are release-ready.

SpatialKit

Inference is only half of an asset.

A model's raw output is rarely something you can ship. SpatialKit is the mesh half — simplification, unwrapping, and baking, written against Metal rather than handed to a CPU library.

Simplify

Quadric error edge collapse, running in MLX, down to a face budget you choose.

Unwrap

Clustered xatlas charts, so the texture space follows the surface instead of fighting it.

Bake

Physically based texture baking on Metal, not a kdtree scatter on the CPU.

Export

A GLB with its materials attached, plus the artifacts that show what happened on the way.

Start

One command per pipeline.

# Python 3.13, Apple silicon
uv add mlx-spatial

The package is on PyPI. Releases can lag main, so a checkout keeps you on the code the repository documents.

uv run mlx-spatial-sam3d --help
uv run mlx-spatial-trellis2 --help
uv run mlx-spatial-hyworld2 --help
uv run mlx-spatial-lito --help
uv run mlx-spatial-mapanything --help

Weights download separately into weights/ and are validated before a run. Converted checkpoints live on Hugging Face.

Scope

What this is not.

Not a training framework

Inference only. There is no optimiser, no dataset loader, and no fine-tuning path.

Apple silicon

MLX targets the Apple GPU, and the mesh extension is built against Metal. There is no CUDA path.

Quality still moving

Texture and mesh quality are actively improving, and some paths are still in development. The repository says which.