File size: 10,251 Bytes
34d1bbf
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
---
library_name: "fastforks"
pipeline_tag: "depth-estimation"
license: "other"
license_name: "dinov3-license"
license_link: "https://github.com/google-research/pointdit/blob/11f53a30aeb4d34d49d2beda655ee6f19b2ad7f8/LICENSE"
tags:
- "depth"
- "mono-depth"
- "monocular-depth"
- "cuda"
- "pytorch"
- "fastforks"
- "fastforks-card"
---
# PointDiT (fastforks)

PointDiT (Xu et al., Google 2026): monocular geometry as generation; a pixel-space diffusion transformer denoises a point map in 3 Euler steps, conditioned on frozen DINOv3 features of the image. Outputs an affine-invariant point map and its depth.

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/google-research/pointdit> at `11f53a30aeb4`.

Author weight repos: <https://huggingface.co/facebook/dinov3-vitb16-pretrain-lvd1689m>, <https://huggingface.co/facebook/dinov3-vitl16-pretrain-lvd1689m>, <https://huggingface.co/haofeixu/pointdit>.

Task: depth. Tier: experimental. Outputs: `points`, `depth`. Backends: `portable`, `kernels`.

Input: one RGB image. Output: a depth or inverse-depth map. `kind` (a card field, `result.kind`) says what the numbers mean: `metric` = metres; `scale_invariant`, `affine_invariant`, `affine_invariant_log` (log depth) and `affine_invariant_inverse` are relative (unknown scale or shift, not metres). Metric models that use the focal length take `model(image, intrinsics=K)` (K `[3, 3]`, pixels of the input): `metric3d-vit-large` and `da3metric-large` need it for correct metres (`da3metric-large`: metres = output x focal / 300; without `intrinsics=` a 300 px focal length is assumed, wrong for a real camera). `unidepth-v2-vitl14`, `unik3d-vitl`, `depth-pro` and MoGe estimate the camera themselves (given `intrinsics=` replace `fx`); `zoedepth-nk` and the relative models (`da3mono-large` too) take none. Normals-only models (`kind` `none`) return `result.normals` `[B, H, W, 3]` (unit vectors, camera frame: x right, y down, z forward).

## Variants

Weights are the authors' files (not hosted here). SHA-256 shortened to 12 hex digits; the full hashes are in [`card.toml`](https://github.com/kleinicke/fastforks/blob/main/src/fastforks/depth/models/pointdit/card.toml).

| variant | weights (author link) | SHA-256 | weights licence | commercial use |
|---|---|---|---|---|
| `pointdit-b-512@1` | [dinov3-vitb16-pretrain-lvd1689m/model.safetensors](https://huggingface.co/facebook/dinov3-vitb16-pretrain-lvd1689m/resolve/5931719e67bbdb9737e363e781fb0c67687896bc/model.safetensors)<br>[pointditb-512-mixdata-nodinov3-1d42aacf.pth](https://huggingface.co/haofeixu/pointdit/resolve/956a6f4279c20b59adfc1ea2038603514f4fe5dc/pointditb-512-mixdata-nodinov3-1d42aacf.pth) | `9a21ac3df0c6`<br>`1d42aacfd6aa` | LicenseRef-DINOv3-License | yes |
| `pointdit-l-512@1` | [dinov3-vitl16-pretrain-lvd1689m/model.safetensors](https://huggingface.co/facebook/dinov3-vitl16-pretrain-lvd1689m/resolve/ea8dc2863c51be0a264bab82070e3e8836b02d51/model.safetensors)<br>[pointditl-512-mixdata-nodinov3-240c1a4f.pth](https://huggingface.co/haofeixu/pointdit/resolve/956a6f4279c20b59adfc1ea2038603514f4fe5dc/pointditl-512-mixdata-nodinov3-240c1a4f.pth) | `dcb2e45127cc`<br>`240c1a4fc9a2` | LicenseRef-DINOv3-License | yes |

## Licence

Original-code strings, recorded as they are (research-use package; check them before any other use). Code: Apache-2.0. Licence files: `LICENSE`.

Training data: Mixture of synthetic and real point-map datasets ("mixdata") per the PointDiT paper; the DINOv3 encoder: LVD-1689M (not released).

- Licence note: The PointDiT code and weights are Apache-2.0; the frozen DINOv3 ViT-B/16 and ViT-L/16 encoders are under the DINOv3 License (Meta: attribution and conditions apply; gated on Hugging Face); read it before commercial use.

Licence evidence: https://github.com/google-research/pointdit/blob/11f53a30aeb4d34d49d2beda655ee6f19b2ad7f8/LICENSE (Apache-2.0); https://huggingface.co/haofeixu/pointdit (license: apache-2.0); encoder: https://huggingface.co/facebook/dinov3-vitl16-pretrain-lvd1689m (DINOv3 License, gated)

## Input size

any H x W >= 1, resized or padded inside the model
Tested up to (portable, fp16, RTX 5060 Ti 16 GB): `pointdit-b-512` 3000x4000 (0.8 GiB peak allocated, 1.0 reserved); `pointdit-l-512` 3000x4000 (1.6 GiB peak allocated, 2.2 reserved)

## Speed and memory

### Depth, 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 |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| `pointdit-b-512` | 518x770 | – | – | 30.7 | 20.5 | – | 1.5x | – | 432 / 484 | 434 / 590 |
| `pointdit-l-512` | 518x770 | – | – | 94.2 | 61.0 | – | 1.5x | – | 1285 / 1410 | 1314 / 1656 |

### Depth, Middlebury 2014 half, 994x1482

| model | time (ms): original fp32 | original | portable | kernels | kernels speed-up: vs original | vs portable | peak memory (MiB, allocated / reserved): original | portable | kernels |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| `pointdit-b-512` | 105 | 48.7 | 30.7 | 20.6 | 2.4x | 1.5x | 1214 / 1246 | 450 / 544 | 466 / 630 |
| `pointdit-l-512` | 335 | 112 | 94.6 | 61.4 | 1.8x | 1.5x | 3953 / 4010 | 1301 / 1410 | 1314 / 1696 |

### Startup and first call

| model | load (s): original | portable | kernels | first call (s): original | portable | kernels |
| --- | --- | --- | --- | --- | --- | --- |
| `pointdit-b-512` | 2.57 | 0.65 (518x770) | 0.56 (518x770) | 0.11 | 0.29 (518x770) | 0.17 (518x770) |
| `pointdit-l-512` | 9.47 | 0.92 (518x770) | 0.94 (518x770) | 0.12 | 0.27 (518x770) | 0.25 (518x770) |

### torch.compile and TensorRT

| model | input | time: portable | compile | TensorRT fp16 | kernels | preparation: compile (cold first call) | ONNX + engine build | peak MiB (alloc / reserved): portable | compile | kernels | TensorRT (engine + torch) |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| `pointdit-b-512` | 994x1482 | 30.7 ms | 23.7 ms | fails: BackendUnavailableError: onnx is not installed: pip install | 20.6 ms | 33.6 s | – | 450 / 544 | 465 / 524 | 466 / 630 | – |

Fixed-size cells: time (ms) / peak allocated / peak reserved memory (MiB).

Hardware, protocol and caveats: [benchmarks](https://github.com/kleinicke/fastforks/blob/main/docs/benchmarks.md) (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

### On public datasets

AbsRel / delta1 after a least-squares scale + shift fit (in disparity space for inverse-depth models), mean over images. Original = the original code named under Details, same checkpoint and protocol.

| variant | dataset | original fp32 | original fp16 | portable | kernels | note |
|---|---|---|---|---|---|---|
| `pointdit-b-512` | NYUv2 test, AbsRel / delta1 | 0.0453 / 0.9773 | 0.0454 / 0.9773 | 0.0453 / 0.9773 | 0.0453 / 0.9773 |  |
| `pointdit-b-512` | iBims-1, AbsRel / delta1 | 0.0374 / 0.9821 | 0.0374 / 0.9820 | 0.0374 / 0.9821 | 0.0374 / 0.9821 |  |
| `pointdit-b-512` | ETH3D two-view train left, AbsRel / delta1 | 0.0896 / 0.9085 | 0.0896 / 0.9086 | 0.0896 / 0.9086 | 0.0896 / 0.9085 | possibly in the training data |
| `pointdit-b-512` | Middlebury 2014 trainingH left, AbsRel / delta1 | 0.0313 / 0.9948 | 0.0313 / 0.9948 | 0.0313 / 0.9948 | 0.0313 / 0.9948 | possibly in the training data |
| `pointdit-l-512` | NYUv2 test, AbsRel / delta1 | 0.0410 / 0.9800 | 0.0411 / 0.9800 | 0.0410 / 0.9800 | 0.0410 / 0.9800 |  |
| `pointdit-l-512` | iBims-1, AbsRel / delta1 | 0.0313 / 0.9848 | 0.0313 / 0.9847 | 0.0313 / 0.9848 | 0.0313 / 0.9848 |  |
| `pointdit-l-512` | ETH3D two-view train left, AbsRel / delta1 | 0.0748 / 0.9264 | 0.0748 / 0.9278 | 0.0748 / 0.9265 | 0.0748 / 0.9261 | possibly in the training data |
| `pointdit-l-512` | Middlebury 2014 trainingH left, AbsRel / delta1 | 0.0230 / 0.9952 | 0.0230 / 0.9951 | 0.0230 / 0.9952 | 0.0230 / 0.9952 | possibly in the training data |

Measured on NVIDIA GeForce RTX 5060 Ti, torch 2.14.1+cu130, fastforks 2fb984b3, 2026-11-15.

### Parity with the original code

Every variant is checked against reference outputs of the original code at its pinned commit. CPU, float32: max |diff| <= 1.5e-06 vs the original. GPU, float16 (the default), portable and kernels: mean |diff| <= 0.00029 and p99 <= 0.0012 (absolute error of the output `points`).

## Limitations

- Affine-invariant output: points up to an unknown scale and 3-D shift, depth (their z) up to scale and shift; align before use.
- Trained at 512 x 512: inputs are resized to about `tokens` 16-pixel patches at their aspect ratio (bilinear) and the point map is resized back with nearest, as the original's wild-image path.

## Usage

```python
from fastforks import depth

model = depth.load("pointdit-b-512")  # mode="auto": the preferred backend from recorded measurements
result = model("room.jpg")
result.points  # [H, W] float32 tensor; result.kind says what the maps mean
# models that take a camera: model("room.jpg", intrinsics=K), K [3, 3] in pixels
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: `pointdit-b-512`, `pointdit-l-512`.

## Kernels backend

`depth.load("pointdit-b-512", mode="kernels")` runs our CUDA kernels (`fastbb`, `dpt_fused`). 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.

<!-- staged from fastforks 1cbf1671 (2026-11-15) -->