TripoSR (fastforks)
TripoSR (Tochilkin et al. 2024, Stability AI and Tripo AI): a feed-forward image-to-3D model that turns one object photo into a coloured triangle mesh in well under a second. A DINO ViT-B/16 image encoder conditions a 16-block transformer that predicts a triplane NeRF (3 x 40 x 64 x 64); the mesh is the marching-cubes surface of its density, coloured per vertex. Input: one view of a single object on a plain background, best prepared with multiview.object_view (object centred on grey from an RGBA image or a matting alpha).
This repo is the model card only: it holds no weights. fastforks downloads the authors' weights from the links below and checks them against the SHA-256 in the model card. Code: https://github.com/kleinicke/fastforks. Kernels for the kernels backend: https://huggingface.co/fastforks/kernels. Original code: https://github.com/VAST-AI-Research/TripoSR at 107cefdc244c.
Author weight repos: https://huggingface.co/stabilityai/TripoSR.
Task: multiview. Tier: experimental. Outputs: mesh, triplane. Backends: portable, kernels.
Input: several images of one scene (posed and calibrated for multi-view stereo, unposed otherwise). Output: depth maps and, where the model predicts them, cameras and 3-D points.
Variants
Weights are the authors' files (not hosted here). SHA-256 shortened to 12 hex digits; the full hashes are in card.toml.
| variant | weights (author link) | SHA-256 | weights licence | commercial use |
|---|---|---|---|---|
triposr@1 |
model.ckpt | 429e2c6b22a0 |
MIT | yes |
Licence
Original-code strings, recorded as they are (research-use package; check them before any other use). Code: MIT. Licence files: LICENSE.
Training data: Objaverse (Deitke et al. 2023): ~800K 3D objects from Sketchfab, rendered views (Per the report (arXiv 2403.02151): a curated subset of Objaverse rendered with varied lighting; the encoder is initialised from DINO ViT-B/16.).
Licence evidence: https://github.com/VAST-AI-Research/TripoSR/blob/107cefdc244c39106fa830359024f6a2f1c78871/LICENSE and https://huggingface.co/stabilityai/TripoSR/blob/5b521936b01fbe1890f6f9baed0254ab6351c04a/README.md (license: mit)
Input size
any H x W >= 1, resized or padded inside the model
Tested up to (portable, fp16, RTX 5060 Ti 16 GB): triposr 3000x4000 (1.8 GiB peak allocated, 2.0 reserved)
Speed and memory
Multiview, synthetic
| model | input | time (ms): original fp32 | original | portable | kernels | kernels speed-up: vs original | vs portable | peak memory (MiB, allocated / reserved): original | portable | kernels |
|---|---|---|---|---|---|---|---|---|---|---|
triposr |
512x512 | β | β | β | 112 | β | β | β | β | 1025 / 1046 |
Multiview, TripoSR example chair, 512x512
| model | time (ms): original | portable | peak memory (MiB, allocated / reserved): original | portable |
|---|---|---|---|---|
triposr |
1628 | 358 | 2557 / 3230 | 1656 / 1906 |
Startup and first call
| model | load (s): original | portable | kernels | first call (s): original | portable | kernels |
|---|---|---|---|---|---|---|
triposr |
11.06 (512x512) | 2.79 (512x512) | 1.09 (512x512) | 3.25 (512x512) | 1.05 (512x512) | 0.46 (512x512) |
torch.compile and TensorRT
| model | input | time: portable | compile | TensorRT (fp16 unless shown) | kernels | preparation: compile (cold first call) | ONNX + engine build | peak MiB (alloc / reserved): portable | compile | kernels | TensorRT (engine + torch) |
|---|---|---|---|---|---|---|---|---|---|---|---|
triposr |
512x512 | 358 ms | 279 ms | 43.1 ms | 112 ms | 46.9 s | 74.5 s | 1656 / 1906 | 1768 / 1844 | 1025 / 1046 | 1810 / 1834 |
Fixed-size cells: time (ms) / peak allocated / peak reserved memory (MiB).
Hardware, protocol and caveats: benchmarks (RTX 5060 Ti 16 GB, sm_120). Original = the original code named above at the precision of portable (fp16, or (fp32) where fp16 is unsupported or not finite); original fp32 = its default fp32 run. Peak memory is the torch allocator's.
Accuracy
Parity with the original code
Every variant is checked against reference outputs of the original code at its pinned commit. CPU, float32: max |diff| <= 0.05 vs the original. GPU, float16 (the default), portable and kernels: mean |diff| <= 1 % and p99 <= 5 % of the reference's median |value| (absolute error of the output mesh).
Limitations
- One object per call, one view: the input should show a single object centred on a plain background (
multiview.object_view); clutter or a full scene gives poor shapes. No depth maps or cameras are returned. - The mesh is in TripoSR's normalised object frame (inside a cube of half-side 0.87) at an unknown scale; it is not aligned to any camera.
- Background removal is not part of the model: pass an RGBA image or a matting alpha to
multiview.object_view(upstream uses rembg). - Portable: the time goes into the NeRF decoder MLP on the resolution^3 grid (memory-bound GEMMs), so
resolution=512costs about 6x256;kernels(CUDA) fuses that MLP into one tensor-core kernel (RTX 5060 Ti: 372 -> 114 ms at 256). Apple MLX runs the marching cubes in PyTorch on the CPU.
Usage
from fastforks import multiview
model = multiview.load("triposr") # mode="auto": the preferred backend from recorded measurements
result = model(["view0.jpg", "view1.jpg", "view2.jpg"]) # the views of one scene, no cameras needed
result.mesh # [V, H, W] float32 tensor; result.kind says what the maps mean
result.backend # what ran, e.g. Backend(mode='portable', device='cuda:0', dtype='float16')
Install with pip install fastforks (see https://github.com/kleinicke/fastforks). Other variants: triposr.
Kernels backend
multiview.load("triposr", mode="kernels") runs our CUDA kernels (triposr_ops). It needs a prebuilt kernel for your GPU architecture (downloaded from https://huggingface.co/fastforks/kernels on first use) and a recent NVIDIA driver; if there is none it raises BackendUnavailableError with the reason and never falls back silently. mode="auto" picks kernels when it can run and logs the choice.
Model tree for fastforks/triposr
Base model
stabilityai/TripoSR