Models · Stereo matching

WAFT-Stereo

A stereo network from the Princeton Vision & Learning Lab that warps features instead of building a cost volume, in sizes S and B. The licence differs by size, see the table.

Commercial use: waft-stereo-s: yes; waft-stereo-b: no (weights: CC-BY-NC-4.0).

variantinputbackendtime (ms)peak memory (MiB, allocated / reserved)
waft-stereo-sMiddlebury 2014 half (994x1482)original (fp32)
original
portable
kernels
portable + torch.compile
TensorRT fp16
1252
689
689
284
357
170
3764 / 4352
3314 / 3398
3293 / 3456
1113 / 1286
2024 / 2058
662 (engine)
waft-stereo-bMiddlebury 2014 half (994x1482)original (fp32)
original
portable
kernels
1898
1140
1137
393
7348 / 7528
5743 / 5876
5775 / 5852
1907 / 2316
Details
  • Original code: https://github.com/princeton-vl/WAFT-Stereo at c534320860f4
  • Code licence: BSD-3-Clause (permissive); files: LICENSE
  • Weights licence: BSD-3-Clause
    • waft-stereo-b: CC-BY-NC-4.0
  • Licence evidence: https://github.com/princeton-vl/WAFT-Stereo/blob/c534320860f4bbb2c0df896e3ccb95de49284aec/LICENSE; vendored files (net/*.py) checked against c534320: none carries an NVIDIA or FoundationStereo header, original only credits FoundationStereo in its README, so BSD-3-Clause holds
  • Training data: Freiburg SceneFlow (FlyingThings3D, Driving, Monkaa), not stated by the authors (SceneFlow, TartanAir, CREStereo, Falling Things, Sintel, Virtual KITTI 2, UnrealStereo4K, WMGStereo, CARLA, Spring, TartanGround, FSD (configs/SynLarge/*.yaml); only SceneFlow is in datasets.toml)
  • Licence note: WAFT-Stereo-B is labelled CC-BY-NC-4.0 conservatively although the Hugging Face card says BSD-3-Clause: the checkpoint embeds a fine-tuned Depth Anything V2 ViT-B whose original weights are CC-BY-NC-4.0.
  • Licence note: Both checkpoints were trained on data that includes NVIDIA's FSD dataset, whose terms for commercial use of trained models are unclear; the status does not depend on the training data.
  • Kernel libraries: igev, cutlass_conv, cudnn_hacc, fastbb
  • Variants: waft-stereo-s, waft-stereo-b
  • Outputs: disparity
  • Input size: any H x W >= 17, resized or padded inside the model
  • Tested up to (portable, fp16, RTX 5060 Ti 16 GB): waft-stereo-s 1024x2048 (5.3 GiB peak allocated, 8.3 reserved); waft-stereo-b 1024x1024 (3.2 GiB peak allocated, 4.7 reserved)
  • waft-stereo-s 994x1482, first call: portable + torch.compile 95 s (cold Inductor cache), TensorRT fp16 152 s (ONNX + engine).
  • waft-stereo-s original 994x1482: torch.autocast(fp16) around the forward
  • waft-stereo-b original 994x1482: torch.autocast(fp16) around the forward
  • waft-stereo-s load / first call: original 1.6 s / 0.14 s (375x1242), portable 0.58 s / 0.691† s, kernels 0.3† s / 0.284† s
  • waft-stereo-b load / first call: original 3.07 s / 0.444 s (375x1242), portable 1.65 s / 1.148† s, kernels 0.42† s / 0.393† 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
waft-stereo-sETH3D two-view train, bad > 1 px % / EPE0.95 / 0.1770.95 / 0.1770.95 / 0.1770.95 / 0.177possibly in the training data
waft-stereo-sMiddlebury 2014 trainingH, bad > 2 px % / EPE4.75 / 0.8954.74 / 0.8954.75 / 0.8954.77 / 0.897possibly in the training data
waft-stereo-bETH3D two-view train, bad > 1 px % / EPE0.74 / 0.1630.74 / 0.1630.74 / 0.1630.74 / 0.163possibly in the training data
waft-stereo-bMiddlebury 2014 trainingH, bad > 2 px % / EPE3.38 / 0.7283.39 / 0.7283.38 / 0.7293.38 / 0.728possibly 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
waft-stereo-s0.0013 / 0.00398RTX 5060 Ti, torch 2.14.1+cu130cudnn_hacc@cudnn92400, cutlass_conv@988138e042cb:sm_120, fastbb@7d058322634d:sm_120, igev@f075827d68c6:sm_120
waft-stereo-b0.0013 / 0.00417RTX 5060 Ti, torch 2.14.1+cu130cudnn_hacc@cudnn92400, cutlass_conv@988138e042cb:sm_120, fastbb@7d058322634d:sm_120, igev@f075827d68c6:sm_120

Limitations

  • Only the two SynLarge checkpoints (S, B) are included; DAv2L-5 and the Real / KITTI / Middlebury fine-tunes are not.
  • Portable WAFT-B is slightly slower than the original code and allocates slightly more memory; kernels is about 3x faster with a third of the memory.
  • WAFT-Stereo-B kernels runs its ViT attention with fp16 accumulation: single attention outputs differ from fp32 by up to 34 % (relative), but end-to-end ETH3D / Middlebury-H accuracy matches the fp32 original (EPE 0.163 / 0.728).