C-FoundationStereo
NVIDIA's releases of FoundationStereo for commercial use, including a distilled fast variant. The licence differs by variant, see the table.
Commercial use: c-foundationstereo-s, c-fast-foundationstereo: yes; fast-foundationstereo: no (weights: LicenseRef-NVIDIA-Source-Code-License-NC).
| variant | input | backend | time (ms) | peak memory (MiB, allocated / reserved) |
|---|---|---|---|---|
c-foundationstereo-s | Middlebury 2014 half (994x1482) | original portable kernels | 3874 3646 1362 | 8338 / 12870 6312 / 6590 3107 / 4376 |
c-fast-foundationstereo (max_disp 192, valid_iters 8) | Middlebury 2014 half (994x1482) | original (fp32) original portable kernels portable + torch.compile TensorRT fp16 | 741 527 330 135 339 451 | 4569 / 5358 2892 / 2996 2109 / 2336 1196 / 1516 1649 / 1792 1252 (engine) |
fast-foundationstereo (max_disp 192, valid_iters 8) | Middlebury 2014 half (994x1482) | original (fp32) original portable kernels | 741 527 330 135 | 4616 / 5408 2939 / 3306 2109 / 2256 1196 / 1576 |
Details
- Original code: https://github.com/NVIDIA/tao_pytorch_backend at
77fb1a4bca02 - Code licence: Apache-2.0 (permissive); files:
LICENSE,NOTICE - Weights licence: LicenseRef-NVIDIA-Open-Model-License
c-fast-foundationstereo: LicenseRef-NVIDIA-Open-Model-Agreementfast-foundationstereo: LicenseRef-NVIDIA-Source-Code-License-NC
- Licence evidence: https://huggingface.co/nvidia/c-foundationstereo-s/blob/d776ba855977e99cc9f16246f911d701da0bbc7a/README.md
- Training data: Foundation Stereo Dataset (FSD, NVIDIA synthetic), CREStereo synthetic stereo dataset (Megvii), TartanAir (pretrained on the Foundation Stereo Dataset (FSD, NVIDIA synthetic) and CREStereo, fine-tuned on FSD and TartanAir)
c-fast-foundationstereo: Foundation Stereo Dataset (FSD, NVIDIA synthetic), NVIDIA internal proprietary data, Stereo4D (stereo YouTube videos) (large synthetic NVIDIA set (1.4 M pairs; 'internal, proprietary dataset') plus real Stereo4D)fast-foundationstereo: Foundation Stereo Dataset (FSD, NVIDIA synthetic) (Foundation Stereo Dataset (FSD, NVIDIA synthetic) plus further real and synthetic data, distilled from FoundationStereo; no per-dataset terms checked)
- Licence note: fast-foundationstereo is the research checkpoint 23-36-37 (the original demo default, the most accurate released): weights are non-commercial (NVIDIA Source Code License NC); our code here is the Apache-2.0 TAO code, which does not change that. For commercial use take c-foundationstereo-s (its model card says 'ready for commercial use').
- Licence note: Trained on NVIDIA's FSD dataset, whose terms for commercial use of trained models are unclear; the status does not depend on the training data.
- Licence note: c-fast-foundationstereo: the weights are governed by the NVIDIA Open Model Agreement, which allows commercial use; the model card's description also calls the model 'for research and evaluation purposes only', which contradicts it. We follow the governing terms.
- Options:
iters= 0 (>= 0) - Kernel libraries:
igev,cutlass_conv,cudnn_hacc,fastbb,fs,fs_cutlass,cfs,ffs_cutlass - Variants:
c-foundationstereo-s,c-fast-foundationstereo,fast-foundationstereo - 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):
c-foundationstereo-s1024x2048 (8.3 GiB peak allocated, 11.1 reserved);c-fast-foundationstereo1988x2880 (9.3 GiB peak allocated, 12.3 reserved);fast-foundationstereo1988x2880 (9.3 GiB peak allocated, 12.3 reserved) c-fast-foundationstereo994x1482, first call: portable + torch.compile 75 s (cold Inductor cache), TensorRT fp16 240 s (ONNX + engine).c-foundationstereo-soriginal 994x1482: reference implementation (FoundationStereo repo code) with the C-FS-S checkpoint, AMP; NVIDIA's TAO code OOMs (fp32) or errors (AMP) in the same harnessc-foundationstereo-sload / first call: original 1.67 s / 2.731 s (375x1242), portable 0.62 s / 3.647† s, kernels 0.4† s / 1.362† sc-fast-foundationstereoload / first call: original 0.17 s / 0.172 s (375x1242), portable 0.24 s / 0.332† s, kernels 0.16† s / 0.136† sfast-foundationstereoload / first call: original 0.16 s / 0.144 s (375x1242), portable 0.25 s / 0.33† s, kernels 0.14† s / 0.135† 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.
| variant | dataset | original fp32 | original fp16 | portable | kernels | note |
|---|---|---|---|---|---|---|
c-foundationstereo-s | ETH3D two-view train, bad > 1 px % / EPE | 1.25 / 0.202 | 1.25 / 0.202 | 1.25 / 0.201 | 1.24 / 0.202 | |
c-foundationstereo-s | Middlebury 2014 trainingH, bad > 2 px % / EPE | out of memory | out of memory | 3.87 / 0.747 | 3.87 / 0.748 | |
c-fast-foundationstereo | ETH3D two-view train, bad > 1 px % / EPE | 2.20 / 0.255 | 2.21 / 0.254 | 2.20 / 0.254 | 2.20 / 0.256 | |
c-fast-foundationstereo | Middlebury 2014 trainingH, bad > 2 px % / EPE | 7.82 / 1.861 | 7.82 / 1.858 | 7.81 / 1.853 | 7.82 / 1.856 | |
fast-foundationstereo | ETH3D two-view train, bad > 1 px % / EPE | 1.72 / 0.249 | 1.72 / 0.248 | 1.72 / 0.248 | 1.72 / 0.249 | |
fast-foundationstereo | Middlebury 2014 trainingH, bad > 2 px % / EPE | 7.16 / 1.609 | 7.16 / 1.608 | 7.16 / 1.608 | 7.17 / 1.606 |
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.
| variant | kernels error vs original, mean / p99 | GPU, torch | kernels used |
|---|---|---|---|
c-foundationstereo-s | 0.00044 / 0.00146 | RTX 5060 Ti, torch 2.14.1+cu130 | cfs@ef8fd8e49913:sm_120, cudnn_hacc@cudnn92400, cutlass_conv@988138e042cb:sm_120, fastbb@7d058322634d:sm_120, ffs_cutlass@645e15d6e6ee:sm_120, fs@f6f8de2cca1e:sm_120, fs_cutlass@de5f3c10aa1b:sm_120, igev@f075827d68c6:sm_120 |
c-fast-foundationstereo | 0.001 / 0.00212 | RTX 5060 Ti, torch 2.14.1+cu130 | cfs@ef8fd8e49913:sm_120, cudnn_hacc@cudnn92400, cutlass_conv@988138e042cb:sm_120, fastbb@7d058322634d:sm_120, ffs_cutlass@645e15d6e6ee:sm_120, fs@f6f8de2cca1e:sm_120, fs_cutlass@de5f3c10aa1b:sm_120, igev@f075827d68c6:sm_120 |
fast-foundationstereo | 0.00072 / 0.002 | RTX 5060 Ti, torch 2.14.1+cu130 | cfs@ef8fd8e49913:sm_120, cudnn_hacc@cudnn92400, cutlass_conv@988138e042cb:sm_120, fastbb@7d058322634d:sm_120, ffs_cutlass@645e15d6e6ee:sm_120, fs@f6f8de2cca1e:sm_120, fs_cutlass@de5f3c10aa1b:sm_120, igev@f075827d68c6:sm_120 |
Limitations
- ONNX export needs torch >= 2.14 (older exporters fail on this network).