WAFT-Stereo (fastforks)
WAFT-Stereo (Wang and Deng 2025): warping instead of a cost volume; Depth Anything V2 (LoRA) features, a ViT-based disparity proposal and 3 warp-and-refine iterations.
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/princeton-vl/WAFT-Stereo at c534320860f4.
Author weight repos: https://huggingface.co/MemorySlices/WAFT-Stereo.
Task: stereo. Tier: stable. Outputs: disparity. Backends: portable, kernels.
Input: a rectified left / right image pair. Output: a disparity map (pixels, left view).
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 |
|---|---|---|---|---|
waft-stereo-b@1 |
DAv2B-4.pth | 65c52425722e |
CC-BY-NC-4.0 | no |
waft-stereo-s@1 |
DAv2S-4.pth | 340d6bff17ad |
BSD-3-Clause | yes |
Licence
Original-code strings, recorded as they are (research-use package; check them before any other use). Code: BSD-3-Clause. Files: LICENSE.
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.
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
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-b 1024x1024 (3.2 GiB peak allocated, 4.7 reserved); waft-stereo-s 1024x2048 (5.3 GiB peak allocated, 8.3 reserved)
Speed and memory
Stereo, Middlebury 2014 half, 994x1482
| model | time (ms): original fp32 | original | portable | kernels | kernels speed-up: vs original | vs portable | peak memory (MiB, allocated / reserved): original | portable | kernels |
|---|---|---|---|---|---|---|---|---|---|
waft-stereo-b |
1897.5 | 1139.5 | 1137.23 | 392.88 | 2.9x | 2.9x | 5743 / 5876 | 5775 / 5852 | 1907 / 2316 |
waft-stereo-s |
1251.6 | 689.3 | 689.01 | 283.76 | 2.4x | 2.4x | 3314 / 3398 | 3293 / 3456 | 1113 / 1286 |
Startup and first call
| model | load (s): original | portable | kernels | first call (s): original | portable | kernels |
|---|---|---|---|---|---|---|
waft-stereo-b |
3.07 (375x1242) | 1.65 | 0.42โ | 0.44 (375x1242) | 1.15โ | 0.39โ |
waft-stereo-s |
1.60 (375x1242) | 0.58 | 0.30โ | 0.14 (375x1242) | 0.69โ | 0.28โ |
Fixed-size speed and peak memory, all models
| model | mode | 640x480 | 1280x720 | 1920x1080 | 12 MP 4000x3000 |
|---|---|---|---|---|---|
waft-stereo-b |
portable | SKIPPED | SKIPPED | SKIPPED | SKIPPED |
waft-stereo-b |
kernels | 62.9 ms / 676 / 908 | 214.9 ms / 1310 / 1880 | 607.1 ms / 2523 / 3712 | OOM |
waft-stereo-s |
portable | 83.4 ms / 941 / 1146 | 357.7 ms / 2165 / 3356 | 1234.1 ms / 5368 / 8448 | SKIPPED |
waft-stereo-s |
kernels | 54.4 ms / 381 / 516 | 148.0 ms / 760 / 1120 | 441.0 ms / 1473 / 2150 | 6423.1 ms (n=3) / 7556 / 11364 |
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 authors' code 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
Original = the authors' code, same checkpoint and protocol.
| variant | dataset | portable | kernels | note |
|---|---|---|---|---|
waft-stereo-s |
ETH3D two-view train, bad > 1 px % / EPE | 0.95 / 0.177 | 0.95 / 0.177 | possibly in the training data |
waft-stereo-s |
Middlebury 2014 trainingH, bad > 2 px % / EPE | 4.75 / 0.895 | 4.77 / 0.897 | possibly in the training data |
waft-stereo-b |
ETH3D two-view train, bad > 1 px % / EPE | 0.74 / 0.163 | 0.74 / 0.163 | possibly in the training data |
waft-stereo-b |
Middlebury 2014 trainingH, bad > 2 px % / EPE | 3.39 / 0.728 | 3.38 / 0.728 | possibly in the training data |
Measured on NVIDIA GeForce RTX 5060 Ti, torch 2.14.1+cu130, 2026-10-27.
Parity with the original code
Every variant is checked against golden outputs of the original code at its pinned commit. 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.
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.
Usage
from fastforks import stereo
model = stereo.load("waft-stereo-b") # portable PyTorch on the GPU if there is one, else the CPU
result = model("left.png", "right.png")
result.disparity # [H, W] float32 tensor, input resolution
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: waft-stereo-b, waft-stereo-s.
Kernels backend
stereo.load("waft-stereo-b", mode="kernels") runs our CUDA kernels (igev, cutlass_conv, cudnn_hacc, fastbb). 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.