Models · Monocular depth

Sapiens2 normals

Meta's Sapiens2 (2026): surface normals of people from one image (background normals are not meaningful). Custom Sapiens2 licence with use restrictions (commercial use allowed, not in the commercial pack).

experimental Fork of facebookresearch/sapiens2@7e5bae8 · backends: portable, kernels

  • Paper Sapiens2 ICLR 2026 · first released 24 Apr 2026
Checkpoint

Paper 2026 Added in 0.4.0 Evaluated with 0.4.0

Kernels, RTX 5060 Ti 16 GB 137 ms 2048x1536, fp16
vs the faster original 1.3× original bf16: 178 ms
Peak memory 1,422 MiB original: 3,234 MiB
Accuracy vs original fp32 – original not run on the test set

Use it

pip install fastforks

Lean install with only what this model needs: pip install fastforks-core

from fastforks import depth

model = depth.load("sapiens2-normal-0.4b")  # fastest backend that runs here
result = model("photo.jpg")

# result fields: normals
normals = result.normals  # a torch tensor
arrays = result.numpy()  # the tensor fields as NumPy arrays: arrays["normals"]
result.backend  # what ran: mode, device, dtype
Other ways to run it
  • Backend: depth.load("sapiens2-normal-0.4b", mode="kernels") # or "portable", "auto" (default)
  • Precision: depth.load("sapiens2-normal-0.4b", dtype="float32") # full precision: slower, portable only
fastforks bench sapiens2-normal-0.4b

Times the model on this machine. load(…, mode="portable") or mode="kernels" picks a backend; usage guide.

Speed and memory

Every backend on one GPU (RTX 5060 Ti 16 GB) and the same input, the authors’ code included. Kernels runs fp16. Portable runs fp16 on CUDA.

BackenddtypeTime per call (ms)vs original fp16Peak memory
allocated / reserved
Load (s)First call (s)
Original fp32facebookresearch/sapiens2@7e5bae88456a config model (MODELS.build), fp32, TF32 offfp32 6590.27×3,991 MiB/4,306 MiB3.00.88
Original (own default)facebookresearch/sapiens2@7e5bae88456a config model under torch.autocast bfloat16 (no authors' flag)bf16 178–3,234 MiB/4,306 MiB3.00.34
Portable fp32fp32not measured ––––
Portablefp16 1591.1×1,432 MiB/1,900 MiB0.70.31
Kernelsfp16 1371.3×1,422 MiB/1,560 MiB1.20.15
Portable + torch.compilenot measured here ––––
TensorRTnot measured here ––––

Measured on RTX 5060 Ti 16 GB, torch 2.14.1+cu130, 2026-11-28 to 2026-12-02. First call, 3 warm-up, peak reset, median of 3 rounds x median of 5. Ratios divide two times of this table (same GPU, same input). Original fp16 is the authors’ own precision option, else torch.autocast. torch.compile and TensorRT: build time instead of load time. TensorRT memory (engine, not comparable) is the GPU memory the engine took, read from the driver because TensorRT allocates outside PyTorch, so it can't be compared with the PyTorch peaks of the other rows.

Other devices

DeviceBackenddtypems / callPeak memoryLoad / first call (s)Output vs referenceInput
Apple silicon runs on macOS
Apple M1 Pro 16 GB (MLX, fp16) MLX, torch 2.14.1, 2026-11-30Portablefp161362 3,472 MiB process8.2 / 2.3skip1024x768
Portablefp322012 5,633 MiB process12.3 / 4.2skip1024x768

CUDA memory is torch’s peak allocated / reserved; Apple has no such counter, so the Mac rows show the process footprint (weights, Python and torch included). “Output vs reference” compares the device’s output with the stored golden output under the card’s tolerance; – = not checked on that device. Kernels “not implemented” = no kernels for this model on that backend yet: it runs portable there.

Licence and weights

Commercial use unclear

Code
LicenseRef-Sapiens2-License LICENSE
Weights
other source
Training data
Pretraining on Humans-1B (Meta-internal, not released); normal fine-tuning on rendered people (Meta's MetaSim and RenderPeople scans; not released).
  • weights: other
  • Sapiens2 License (custom, Meta): commercial use allowed, but with use restrictions (no surveillance, biometric identification, deepfakes, inferring sensitive attributes, military use); redistribution must include the licence. https://github.com/facebookresearch/sapiens2/blob/main/LICENSE.md

Our reading of the licences, not legal advice.

Weights

sapiens2_0.4b_normal.safetensors 1.8 GB· hosted on Hugging Face

fastforks downloads and checks these files on first use (fastforks download sapiens2-normal-0.4b).

Accuracy

The test set through the authors’ code and through ours: same checkpoint, same protocol. The distance between the original’s fp32 and fp16 runs is what half precision alone costs; our runs should stay within it.

NYUv2 test normals

mean / median angle deg, % < 11.25 / < 30 deg

Rundtypeang_mean ↓ang_median ↓a11.25 ↑a30 ↑imagesms / image
Original fp32not measured
Original fp16not measured
Portable fp32fp3235.7333.1914.3848.00 654 544
Portablefp1635.7433.2014.3747.99 654 158
Kernelsnot measured

The original code was not run on this dataset, so the table cannot show the distance to it.

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. Normals: angle to the ground-truth normal over the pixels with ground truth (Marigold's evaluation sets), mean over images. Measured on RTX 5060 Ti, torch 2.14.1+cu130, fastforks f0b2da70d, 2026-11-30.

iBims-1 normals

mean / median angle deg, % < 11.25 / < 30 deg

Rundtypeang_mean ↓ang_median ↓a11.25 ↑a30 ↑imagesms / image
Original fp32not measured
Original fp16not measured
Portable fp32fp3227.2520.4532.1667.24 100 544
Portablefp1627.2520.4532.1667.24 100 158
Kernelsnot measured

The original code was not run on this dataset, so the table cannot show the distance to it.

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. Measured on RTX 5060 Ti, torch 2.14.1+cu130, fastforks f0b2da70d, 2026-11-30.

Closeness to the original

Beyond the test-set scores: the raw output of ours against the original’s fp32 output on the same input, pixel by pixel. CPU, float32: max |diff| <= 0.01 vs the original. GPU, float16 (the default), portable and kernels: mean |diff| <= 0.003 and p99 <= 0.01 (absolute error of the output normals).

CheckToleranceMeasured
CPU fp32, max |diff|≤ 0.01 not recorded
GPU default dtypes, mean |diff|≤ 0.003 0.00043
GPU default dtypes, p99 |diff|≤ 0.01 0.00207

Recorded for sapiens2-normal-0.4b on RTX 5060 Ti, torch 2.14.1+cu130, 2026-12-02, with these kernels: sapiens2_opsswiglu

Details

Sapiens2 (Meta 2026) surface normals of people: a ViT with RoPE, grouped-query attention and SwiGLU, pretrained on 1 B human images, fine-tuned with a PixelShuffle upsampling head on rendered humans; 1024 x 768 input (aspect ratio kept, padded), normals at the image size.

Input / output
Input: one RGB image. Output: a depth or inverse-depth map.
What the numbers mean, and which models need the camera focal length

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).

Input size
any H x W >= 1, resized or padded inside the model; tested up to 3000x4000 (1,526 MiB allocated)
Outputs
normals
Checkpoint
embed_dim=1024, depth=24, num_heads=16
CUDA kernels
  • sapiens2_ops
  • swiglu

Limitations

  • Custom licence with use restrictions: not in the commercial selection (FASTFORKS_COMMERCIAL_ONLY, commercial ComfyUI pack).
  • Trained on people only: normals of the background are not meaningful; mask them, e.g. with sapiens2-seg (class 0 = background).
  • Every image is resized into 1024 x 768 (aspect ratio kept, padded; upstream test protocol); crop to the person first for small people.
  • fp16 CUDA kernels (shared with Sapiens2 segmentation). Apple MLX: a hand-written network (shared Sapiens2 backbone, channels-last head); the resize, padding and normalisation stay on torch.
Full reference, generated from the repository

Meta's Sapiens2 (2026): surface normals of people from one image (background normals are not meaningful). Custom Sapiens2 licence with use restrictions (commercial use allowed, not in the commercial pack).

Commercial use: unclear (treat as no) (weights: other).

variantinputbackendtime (ms)peak memory (MiB, allocated / reserved)
sapiens2-normal-0.4bCOCO val2017 000000003156.jpg (one person) resized to the input size (2048x1536)original (fp32)
original
portable
kernels
659
178
159
137
3991 / 4306
3234 / 4306
1432 / 1900
1422 / 1560
sapiens2-normal-0.4bCOCO val2017 000000003156.jpg (one person) resized to the input size (1024x768)original (fp32)
original
portable
kernels
portable + torch.compile
TensorRT fp16
658
177
158
136
127
280
3991 / 4290
3235 / 4306
1405 / 1900
1396 / 1540
1322 / 1360
2324 / 2360
sapiens2-normal-1bCOCO val2017 000000003156.jpg (one person) resized to the input size (2048x1536)original (fp32)
original
portable
kernels
1753
440
374
327
8578 / 9914
9461 / 9914
3504 / 4156
3494 / 3626
sapiens2-normal-1bCOCO val2017 000000003156.jpg (one person) resized to the input size (1024x768)original (fp32)
original
portable
kernels
portable + torch.compile
TensorRT fp16
1752
439
373
326
318
394
8578 / 9276
9461 / 9914
3477 / 4156
3467 / 3586
3394 / 3524
6444 / 6492
Details
  • Original code: https://github.com/facebookresearch/sapiens2 at 7e5bae88456a
  • Code licence: LicenseRef-Sapiens2-License (permissive); files: LICENSE
  • Weights licence: other
  • Licence evidence: https://huggingface.co/facebook/sapiens2-normal-0.4b/blob/52886591372f049acd4d59ae6d0a792ae1a61ac5/README.md (license: other, license_name: sapiens2-license) ; https://github.com/facebookresearch/sapiens2/blob/7e5bae88456ac418ff0e58e74106c9fe192055d4/LICENSE.md
  • Training data: Pretraining on Humans-1B (Meta-internal, not released); normal fine-tuning on rendered people (Meta's MetaSim and RenderPeople scans; not released).
  • Licence note: Sapiens2 License (custom, Meta): commercial use allowed, but with use restrictions (no surveillance, biometric identification, deepfakes, inferring sensitive attributes, military use); redistribution must include the licence. https://github.com/facebookresearch/sapiens2/blob/main/LICENSE.md
  • Kernel libraries: sapiens2_ops, swiglu
  • Variants: sapiens2-normal-0.4b, sapiens2-normal-1b
  • Outputs: normals; kind: none
  • Input size: any H x W >= 1, resized or padded inside the model
  • Tested up to (portable, fp16, RTX 5060 Ti 16 GB): sapiens2-normal-0.4b 3000x4000 (1.5 GiB peak allocated, 1.9 reserved); sapiens2-normal-1b 3000x4000 (3.5 GiB peak allocated, 4.0 reserved)
  • sapiens2-normal-0.4b 1024x768, first call: portable + torch.compile 26 s (cold Inductor cache), TensorRT fp16 66 s (ONNX + engine).
  • sapiens2-normal-1b 1024x768, first call: portable + torch.compile 38 s (cold Inductor cache), TensorRT fp16 120 s (ONNX + engine).
  • sapiens2-normal-0.4b original (fp32) 2048x1536, original (fp32) 1024x768: facebookresearch/sapiens2@7e5bae88456a config model (MODELS.build), fp32, TF32 off
  • sapiens2-normal-0.4b original 2048x1536, original 1024x768: facebookresearch/sapiens2@7e5bae88456a config model under torch.autocast bfloat16 (no authors' flag)
  • sapiens2-normal-1b original (fp32) 2048x1536, original (fp32) 1024x768: facebookresearch/sapiens2@7e5bae88456a config model (MODELS.build), fp32, TF32 off
  • sapiens2-normal-1b original 2048x1536, original 1024x768: facebookresearch/sapiens2@7e5bae88456a config model under torch.autocast bfloat16 (no authors' flag)
  • sapiens2-normal-0.4b load / first call: original 2.97 s / 0.345 s (2048x1536), portable 0.65 s / 0.313 s (2048x1536), kernels 1.23 s / 0.206 s (1024x768)
  • sapiens2-normal-1b load / first call: original 3.88 s / 0.591 s (2048x1536), portable 1.29 s / 0.478 s (2048x1536), kernels 40.73 s / 0.462 s (1024x768)
  • Protocol, median of 20 after 3 warm-ups, batch 1, unit normals at the image size; upstream: config test_pipeline + data_preprocessor on the host (not timed), then the network + resize on the GPU; fastforks: float CUDA image in, its own resize on the GPU; peak = one call after the warm-ups (weights included); load / first call: per process (first call at 1024x768)

Measured

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. Normals: angle to the ground-truth normal over the pixels with ground truth (Marigold's evaluation sets), mean over images. Original = the original code named under Details, same checkpoint and protocol.

variantdatasetportableportable fp32note
sapiens2-normal-0.4bNYUv2 test normals, mean / median angle deg, % < 11.25 / < 30 deg35.74 / 33.20 / 14.37 / 47.9935.73 / 33.19 / 14.38 / 48.00
sapiens2-normal-0.4biBims-1 normals, mean / median angle deg, % < 11.25 / < 30 deg27.25 / 20.45 / 32.16 / 67.2427.25 / 20.45 / 32.16 / 67.24
sapiens2-normal-1bNYUv2 test normals, mean / median angle deg, % < 11.25 / < 30 deg40.73 / 39.46 / 9.94 / 37.8140.74 / 39.47 / 9.93 / 37.79
sapiens2-normal-1biBims-1 normals, mean / median angle deg, % < 11.25 / < 30 deg23.03 / 15.12 / 42.68 / 75.1623.03 / 15.12 / 42.68 / 75.16

Measured on NVIDIA GeForce RTX 5060 Ti, torch 2.14.1+cu130, fastforks f0b2da70d, 2026-11-30.

Parity

CPU, float32: max |diff| <= 0.01 vs the original. GPU, float16 (the default), portable and kernels: mean |diff| <= 0.003 and p99 <= 0.01 (absolute error of the output normals).

variantkernels error vs original, mean / p99GPU, torchkernels used
sapiens2-normal-0.4b0.00043 / 0.00207RTX 5060 Ti, torch 2.14.1+cu130sapiens2_ops@20cfca7e340c:sm_120, swiglu@25fe34a2d389:sm_120
sapiens2-normal-1b0.00055 / 0.00238RTX 5060 Ti, torch 2.14.1+cu130sapiens2_ops@20cfca7e340c:sm_120, swiglu@25fe34a2d389:sm_120

Limitations

  • Custom licence with use restrictions: not in the commercial selection (FASTFORKS_COMMERCIAL_ONLY, commercial ComfyUI pack).
  • Trained on people only: normals of the background are not meaningful; mask them, e.g. with sapiens2-seg (class 0 = background).
  • Every image is resized into 1024 x 768 (aspect ratio kept, padded; upstream test protocol); crop to the person first for small people.
  • fp16 CUDA kernels (shared with Sapiens2 segmentation). Apple MLX: a hand-written network (shared Sapiens2 backbone, channels-last head); the resize, padding and normalisation stay on torch.

Example output

No example rendered for this checkpoint yet.