Runs released Rusting models. Inference only, in Rust, on RustingBrain. No Python.
One model so far:
| Command | Model | Does |
|---|---|---|
rusting-runner 3d |
Kaze-3D-v0.2 (and v0.1) | one image in, one mesh (GLB) out |
Kaze-3D here is geometry only: the GLB has positions and normals, no texture and no colours. Texture comes with a later release.
- A Rust toolchain, 1.88 or newer.
- For the GPU build: an NVIDIA card and the CUDA toolkit; see RustingBrain's INSTALL_CUDA.md. Without one it runs on the CPU.
RustingBrain is taken from the directory next to this one:
git clone https://github.com/RustingStudio/RustingBrain
git clone https://github.com/RustingStudio/RustingRunner
cd RustingRunner
cargo build --release # CPU
cargo build --release --features cuda # NVIDIAThe binary is target/release/rusting-runner.
-
Kaze-3D-v0.2 from Hugging Face,
rusting-studio/Kaze-3D-v0.2. The runner readsflow.safetensorsandvae.safetensorsfrom that directory; the settings inconfigs/are also stored inside the two files. -
The image encoder, DINOv2 ViT-B/14, is not part of that repository. Fetch
model.safetensorsfromfacebook/dinov2-baseand put it atKaze-3D-v0.2/dinov2-base/model.safetensors, or name it with--dinov2:hf download facebook/dinov2-base model.safetensors --local-dir Kaze-3D-v0.2/dinov2-base
Kaze-3D-v0.2/
flow.safetensors
vae.safetensors
configs/flow-100m.json
configs/vae-32m.json
dinov2-base/model.safetensors
The flow file names the image encoder it was trained on, and the runner loads
that one. Kaze-3D-v0.1 names none and uses CLIP ViT-B/16 instead, at
Kaze-3D-v0.1/clip-vit-base-patch16/model.safetensors or --clip; that
file is in the safetensors pull request of
openai/clip-vit-base-patch16
(hf download openai/clip-vit-base-patch16 model.safetensors --revision refs/pr/17 --local-dir Kaze-3D-v0.1/clip-vit-base-patch16).
rusting-runner 3d --weights Kaze-3D-v0.2 --image my-object.png --out my-object.glb| Flag | Default | |
|---|---|---|
--weights |
the release directory above | |
--image |
the input image, PNG or JPEG | |
--out |
out.glb |
the mesh |
--dinov2 |
<weights>/dinov2-base/model.safetensors |
the DINOv2 checkpoint (v0.2) |
--clip |
<weights>/clip-vit-base-patch16/model.safetensors |
the CLIP checkpoint (v0.1) |
--seed |
0 | the noise the shape is sampled from |
--steps |
28 | sampling steps |
--guidance |
4 | classifier-free guidance scale |
--resolution |
128 | the marching grid along one axis |
--faces |
50000 | the face budget the mesh is simplified to; 0 keeps every face |
--cuda |
the NVIDIA device, e.g. --cuda 0; needs the cuda build |
Steps 28, guidance 4 and resolution 128 are the settings the model was evaluated with.
One 512×512 RGBA image. The model was trained on renders of single objects on a plain background. Photos, scenes and several objects in one image are outside what it has seen.
The alpha is composited over white, and the image is resized to 224×224 without cropping, so an image that is not square is stretched. An image without alpha is used as it is; give it a white background.
A binary glTF (.glb) with one mesh inside the cube ±1.05: positions, normals
and triangles, with a plain white material.
The shape is the same every time for the same image, seed and settings on the
same device: with --faces 0 the file is byte for byte the same. The
simplification to --faces chooses between equally cheap edges in an order
that changes from run to run, so two simplified meshes of one shape have the
same number of faces but not the same vertices.
On an NVIDIA card the image encoder computes in half precision, so the CPU and the card do not give the same mesh for the same seed.
One generation with the defaults took 46 seconds on the CPU alone: a Ryzen 5 7600X (6 cores), release build, while the machine was running other jobs. Not measured on a card here.
cargo test --releasemarches a sphere's field into a mesh, simplifies it, writes the GLB and reads it back; it needs no weights. With the weights in place,
KAZE_WEIGHTS=Kaze-3D-v0.2 KAZE_IMAGE=my-object.png cargo test --release -- --ignoredruns the whole pipeline once.
- This code: see LICENSE.md.
- The Kaze-3D weights: Apache-2.0.
- The DINOv2 weights: Apache-2.0, from Meta; the CLIP weights: MIT, from OpenAI. Neither is redistributed here.