Models · Stereo matching

FoundationStereo

NVIDIA's zero-shot stereo foundation model. Non-commercial weights.

Commercial use: no (code: LicenseRef-NVIDIA-Source-Code-License-NC AND Apache-2.0 (noncommercial); weights: LicenseRef-NVIDIA-Source-Code-License-NC).

variantinputbackendtime (ms)peak memory (MiB, allocated / reserved)
foundationstereo-vit-lMiddlebury 2014 half (994x1482)original (fp32)
original
portable
kernels
9228
4237
2990
1513
11323 / 11632
8286 / 8750
3141 / 3436
2818 / 3300
foundationstereo-vit-sMiddlebury 2014 half (994x1482)original (fp32)
original
portable
kernels
portable + torch.compile
TensorRT fp16
7129
3609
2514
1120
2044
1196
9991 / 15144
6987 / 7280
2493 / 2606
2169 / 2470
2822 / 3646
2570 (engine)
Details
  • Original code: https://github.com/NVlabs/FoundationStereo at 6e8806816b53
  • Code licence: LicenseRef-NVIDIA-Source-Code-License-NC AND Apache-2.0 (noncommercial); files: LICENSE
  • Weights licence: LicenseRef-NVIDIA-Source-Code-License-NC
  • Licence evidence: https://github.com/NVlabs/FoundationStereo/blob/6e8806816b533e4d13ddbb95ffa907b797060a62/readme.md#L158
  • Training data: Foundation Stereo Dataset (FSD, synthetic, NVIDIA) plus SceneFlow, Falling Things, Sintel, CREStereo, InStereo2K and others; no per-dataset terms checked
  • Licence note: Code and weights are under the NVIDIA Source Code License-NC (non-commercial research use only). Our kernels for this family count as derived work and inherit the NC limit; the family ships in fastforks-nc.
  • Options: iters = 32 (>= 1)
  • Kernel libraries: fs, fs_cutlass, cudnn_hacc, fastbb
  • Variants: foundationstereo-vit-l, foundationstereo-vit-s
  • Outputs: disparity
  • Input size: any H x W >= 32, padded to a multiple of 32
  • Tested up to (portable, fp16, RTX 5060 Ti 16 GB): foundationstereo-vit-l 1988x2880 (7.1 GiB peak allocated, 11.4 reserved); foundationstereo-vit-s 1988x2880 (6.5 GiB peak allocated, 10.7 reserved)
  • foundationstereo-vit-s 994x1482, first call: portable + torch.compile 212 s (cold Inductor cache), TensorRT fp16 545 s (ONNX + engine).
  • foundationstereo-vit-l load / first call: original 10.86 s / 2.563 s (375x1242), portable 1.98 s / 2.99† s, kernels 1.17† s / 1.517† s
  • foundationstereo-vit-s load / first call: original 1.44 s / 1.058 s (375x1242), portable 1.03 s / 2.514† s, kernels 0.33† s / 1.12† s
  • † measured in the speed sweep after the portable load (or an earlier size) in the same process: file cache and kernels are warm, so the time is lower than a fresh start.
  • Protocol, median of 5 after 3 warm-up, uint8 CUDA input (synthetic for bench_inputs sizes), card defaults; gc before each load; peak = max over the first call and the timed calls

Measured

Original = the original code named under Details, same checkpoint and protocol.

variantdatasetoriginal fp32original fp16portablekernelsnote
foundationstereo-vit-lETH3D two-view train, bad > 1 px % / EPE0.65 / 0.1680.65 / 0.1680.65 / 0.1680.65 / 0.168possibly in the training data
foundationstereo-vit-lMiddlebury 2014 trainingH, bad > 2 px % / EPE2.48 / 0.5622.48 / 0.5612.47 / 0.5612.48 / 0.561possibly in the training data
foundationstereo-vit-sETH3D two-view train, bad > 1 px % / EPE1.10 / 0.2021.10 / 0.2021.10 / 0.2021.10 / 0.202possibly in the training data
foundationstereo-vit-sMiddlebury 2014 trainingH, bad > 2 px % / EPE3.32 / 0.6793.32 / 0.6813.32 / 0.6803.30 / 0.680possibly in the training data

Measured on NVIDIA GeForce RTX 5060 Ti, torch 2.14.1+cu130, fastforks 468fba10, 2026-11-05.

Parity

CPU, float32: max |diff| <= 0.002 vs the original. GPU, float16 (the default), portable and kernels: mean |diff| <= 0.02 px and p99 <= 0.25 px.

variantkernels error vs original, mean / p99GPU, torchkernels used
foundationstereo-vit-l0.00035 / 0.00121RTX 5060 Ti, torch 2.14.1+cu130cudnn_hacc@cudnn92400, fastbb@7d058322634d:sm_120, fs@f6f8de2cca1e:sm_120, fs_cutlass@de5f3c10aa1b:sm_120
foundationstereo-vit-s0.00029 / 0.0009RTX 5060 Ti, torch 2.14.1+cu130cudnn_hacc@cudnn92400, fastbb@7d058322634d:sm_120, fs@f6f8de2cca1e:sm_120, fs_cutlass@de5f3c10aa1b:sm_120

Limitations

  • ONNX export needs torch >= 2.14 (older exporters fail on this network).