Any2Full (fastforks)

Any2Full (2026): one-stage depth completion that prompts Depth Anything V2 with a sparse depth map of any pattern and density; the depth tokens modulate the ViT features entering the DPT head, the disparity is fitted to the prompt.

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/zhiyuandaily/Any2Full at 780edf6.

Author weight repos: https://huggingface.co/zhiyuandaily/Any2Full.

Task: depth. Tier: experimental. Outputs: 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.

variant weights (author link) SHA-256 weights licence commercial use
any2full-b@1 Any2Full_vitb.pth.tar 5afd2519e061 CC-BY-NC-4.0 no
any2full-l@1 Any2Full_vitl.pth.tar ea2809c9c490 CC-BY-NC-4.0 no
any2full-s@1 Any2Full_vits.pth.tar c797e3b93a1b Apache-2.0 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: Training data and code not released yet (arXiv 2603.05711); the ViT and head start from Depth Anything V2.

Licence evidence: https://github.com/zhiyuandaily/Any2Full/blob/main/LICENSE and the Hugging Face model card zhiyuandaily/Any2Full (license: apache-2.0)

Input size

any H x W >= 1, resized or padded inside the model (ViT patch 14) Tested up to (portable, fp16, RTX 5060 Ti 16 GB): any2full-b 3000x4000 (0.7 GiB peak allocated, 0.9 reserved); any2full-l 3000x4000 (1.2 GiB peak allocated, 1.3 reserved); any2full-s 3000x4000 (0.5 GiB peak allocated, 0.6 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
any2full-b 994x1482 – 108 26.8 17.2 6.3x 1.6x 1109 / 1160 538 / 596 481 / 536
any2full-l 994x1482 – 269 67.7 42.3 6.4x 1.6x 2436 / 2788 1178 / 1250 1115 / 1210
any2full-s 994x1482 – 47.5 12.4 9.47 5.0x 1.3x 646 / 670 274 / 312 218 / 252

Startup and first call

model load (s): original portable kernels first call (s): original portable kernels
any2full-b 3.73 6.38 0.74 0.34 3.34 0.26
any2full-l 9.41 1.45 1.50 0.47 0.30 0.28
any2full-s 2.55 0.31 0.37 0.74 0.36 0.30

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)
any2full-b 994x1482 26.8 ms 24.2 ms 15.8 ms 17.2 ms 97.0 s 64.4 s 538 / 596 442 / 496 481 / 536 731 / 794
any2full-l 994x1482 67.7 ms 63.8 ms 40.2 ms 42.3 ms 33.9 s 79.0 s 1178 / 1250 987 / 1092 1115 / 1210 1860 / 1928
any2full-s 994x1482 12.4 ms 9.88 ms 6.72 ms 9.47 ms 26.4 s 59.0 s 274 / 312 223 / 294 218 / 252 366 / 398

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

On public datasets

Aligned depth scores fit scale and shift by least squares, in disparity space for inverse-depth models. Metric depth scores follow each dataset's protocol. Both average over images. Prompt depth models: the prompt is a 192x256 low-resolution depth built from the ground truth (mean of the valid pixels per cell, holes filled with the nearest cell), the output is metric depth compared without any scale fit; AbsRel / delta1 over the pixels with ground truth, mean over images. The prompt comes from the ground truth, so the numbers are not comparable with the paper's (ARKitScenes / ScanNet++ with a LiDAR prompt, L1 in mm): they compare our modes with the original. Original = the original code named under Details, same checkpoint and protocol.

variant dataset original fp32 original fp16 portable portable fp32 kernels note
any2full-s NYUv2 test (every 4th: 164 images) with a 192x256 depth prompt, AbsRel / delta1 (metric) 0.0040 / 1.0000 0.0038 / 1.0000 0.0038 / 1.0000 0.0038 / 1.0000
any2full-s iBims-1 (100 images) with a 192x256 depth prompt, AbsRel / delta1 (metric) 0.0081 / 0.9958 0.0079 / 0.9960 0.0079 / 0.9960 0.0079 / 0.9960
any2full-b NYUv2 test (every 4th: 164 images) with a 192x256 depth prompt, AbsRel / delta1 (metric) 0.0037 / 1.0000 0.0044 / 1.0000 0.0034 / 1.0000 0.0034 / 1.0000 0.0034 / 1.0000
any2full-b iBims-1 (100 images) with a 192x256 depth prompt, AbsRel / delta1 (metric) 0.0074 / 0.9962 0.0077 / 0.9962 0.0071 / 0.9964 0.0071 / 0.9964 0.0071 / 0.9964
any2full-l NYUv2 test (every 4th: 164 images) with a 192x256 depth prompt, AbsRel / delta1 (metric) 0.0037 / 1.0000 0.0034 / 1.0000 0.0034 / 1.0000 0.0034 / 1.0000
any2full-l iBims-1 (100 images) with a 192x256 depth prompt, AbsRel / delta1 (metric) 0.0072 / 0.9963 0.0069 / 0.9966 0.0069 / 0.9966 0.0069 / 0.9966

Measured on portable: NVIDIA GeForce RTX 5060 Ti, torch 2.14.1+cu130, fastforks 5f4a908a0 / 68b2f345, 2026-11-16 to 2026-11-19; portable32: NVIDIA GeForce RTX 5060 Ti, torch 2.14.1+cu130, fastforks 30c7a8e9, 2026-11-17 to 2026-11-18; kernels: NVIDIA GeForce RTX 5060 Ti, torch 2.14.1+cu130, fastforks 67dbea00e / 68b2f345, 2026-11-16 to 2026-11-20.

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.005 vs the original. GPU, float16 (the default), portable and kernels: mean |diff| <= 1.5 % and p99 <= 5 % of the reference's median |value| (absolute error of the output depth).

Limitations

  • The depth map is required: call the model with prompt_depth= a metric map in metres (any size, sparse points or holes as 0 / NaN / inf). The output is fitted to it by scale and shift in disparity, so it needs at least two distinct valid values.
  • Export has a fixed input size.

Usage

from fastforks import depth

# non-commercial weights: run with FASTFORKS_NONCOMMERCIAL=1 in the environment
model = depth.load("any2full-b")  # mode="auto": the preferred backend from recorded measurements
result = model("room.jpg")
result.depth  # [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: any2full-b, any2full-l, any2full-s.

Kernels backend

depth.load("any2full-b", 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.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Collection including fastforks/any2full