File size: 4,106 Bytes
5d3d475
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
license: cc-by-nc-4.0
tags:
  - depth-estimation
  - monocular-depth
  - video-depth
  - safetensors
  - comfyui
library_name: safetensors
pipeline_tag: depth-estimation
base_model:
  - depth-anything/Video-Depth-Anything-Large
  - depth-anything/Depth-Anything-V2-Large
---

# Depth Anything, fp16 safetensors

Two depth models converted to fp16 `safetensors`, nothing else changed. They are
the pair used by the **TS Universal Depth** node in
[comfyui-timesaver](https://github.com/AlexYez/comfyui-timesaver): one for
single images, one for video.

| file | source | what it is for | size |
| --- | --- | --- | ---: |
| `depth_anything_v2_vitl_fp16.safetensors` | [depth-anything/Depth-Anything-V2-Large](https://huggingface.co/depth-anything/Depth-Anything-V2-Large) | a single image | 640 MB |
| `video_depth_anything_vitl_fp16.safetensors` | [depth-anything/Video-Depth-Anything-Large](https://huggingface.co/depth-anything/Video-Depth-Anything-Large) | a sequence, temporally consistent | 734 MB |

## ⚠️ Licence: CC BY-NC 4.0 — non-commercial

Both upstream checkpoints are published under
[CC BY-NC 4.0](https://creativecommons.org/licenses/by-nc/4.0/), and this
conversion inherits it unchanged. **You may not use these weights for commercial
purposes.** Attribution goes to the Depth Anything authors; this repository
holds no rights of its own beyond the conversion.

If you need a permissive licence, the *Small* variant of Depth Anything V2 is
Apache-2.0 — a different model, not a smaller copy of this one.

## What was changed

Exactly two things, both mechanical:

1. **float32 → float16.** Nothing was pruned, quantised or re-trained.
2. **`.pth` → `.safetensors`.** The tensors and their names are identical.

Every file carries its provenance in the safetensors metadata: the upstream
repository, the upstream filename and the **sha256 of the original `.pth`** it
was converted from, so the chain back to the source is checkable rather than
promised.

```python
from safetensors import safe_open
with safe_open("depth_anything_v2_vitl_fp16.safetensors", framework="pt") as f:
    print(f.metadata())
```

| file | sha256 of the original `.pth` |
| --- | --- |
| `depth_anything_v2_vitl_fp16.safetensors` | `a7ea19fa0ed99244e67b624c72b8580b7e9553043245905be58796a608eb9345` |
| `video_depth_anything_vitl_fp16.safetensors` | `43df27c6b396042ba34ff7b798ab279f64d204d2e86d7a373968f8fa36d0e6fa` |

## Does fp16 cost quality?

Measured, not assumed. Depth maps were rendered from the same images at 518 px
on an RTX 3080 Ti, and each variant compared against **pure fp32 with autocast
disabled**, on the normalised 0..1 depth map:

| variant | mean deviation | worst pixel |
| --- | ---: | ---: |
| fp32 weights + autocast | 0.020 % | 0.39 % |
| **fp16 weights (this repo) + autocast** | **0.016 – 0.020 %** | 0.51 % |
| fp16 weights and fp16 compute | 0.021 % | 0.61 % |

The dominant difference is autocast itself; storing the weights in fp16 adds
almost nothing on top of it. Half the download, half the disk, no visible cost.

## Loading

```python
from safetensors.torch import load_file
state = load_file("video_depth_anything_vitl_fp16.safetensors")
model.load_state_dict(state)   # architecture from the upstream project
```

Architectures live in the original projects —
[Depth-Anything-V2](https://github.com/DepthAnything/Depth-Anything-V2) and
[Video-Depth-Anything](https://github.com/DepthAnything/Video-Depth-Anything).
This repository ships weights only.

## Citation

```bibtex
@article{depth_anything_v2,
  title   = {Depth Anything V2},
  author  = {Yang, Lihe and Kang, Bingyi and Huang, Zilong and Zhao, Zhen
             and Xu, Xiaogang and Feng, Jiashi and Zhao, Hengshuang},
  journal = {arXiv:2406.09414},
  year    = {2024}
}

@article{video_depth_anything,
  title   = {Video Depth Anything: Consistent Depth Estimation for Super-Long Videos},
  author  = {Chen, Sili and Guo, Hengkai and Zhu, Shengnan and Zhang, Feihu
             and Huang, Zilong and Feng, Jiashi and Kang, Bingyi},
  journal = {arXiv:2501.12375},
  year    = {2025}
}
```