Models · Stereo matching

LiteAnyStereo V2

LiteAnyStereo V2, an efficient zero-shot stereo family in sizes S, M, L and H.

stable Fork of TomTomTommi/LiteAnyStereo@8c97bd4 · backends: portable, kernels

Checkpoint

Paper 2026 Added in 0.1.0 Evaluated with 0.2.0

Kernels, RTX 5060 Ti 16 GB 14.3 ms 994x1482, fp16
vs the faster original 3.0× original fp16: 43.5 ms
Peak memory 226 MiB original: 933 MiB
Accuracy vs original fp32 ±0.00 kernels bad px %, ETH3D two-view train (4.10 original)

Use it

pip install fastforks

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

from fastforks import stereo

model = stereo.load("las2-s")  # kernels on a supported GPU, else portable PyTorch
result = model(left, right)
result.disparity
result.backend  # what ran: mode, device, dtype, kernels
fastforks bench las2-s

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 fp32fp32 62.00.70×1,676 MiB/1,746 MiB––
Original fp16torch.autocast(fp16) around the forwardfp16 43.5–933 MiB/978 MiB––
Portable fp32fp32not measured ––––
Portablefp16 27.91.6×557 MiB/608 MiB0.70.03
Kernelsfp16 14.33.0×226 MiB/320 MiB0.60.02
Portable + torch.compile 23.71.8×238 MiB/264 MiB22 (build)–
TensorRT fp16fp16 10.34.2×162 MiBenginenot comparable87 (build)–

Measured on RTX 5060 Ti 16 GB, torch 2.14.1+cu130, 2026-11-01 to 2026-11-16. 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 memoryOutput vs referenceInput
Apple M1 Pro 16 GB MPS, torch 2.14.1, 2026-11-14Originalfp32273 4,556 MiB processmatches994x1482
Portablefp16192 3,590 MiB processmatches994x1482
Portablefp32245 3,983 MiB processmatches994x1482
Kernelsfp16198 2,620 MiB processmatches994x1482
NVIDIA L4 CUDA, torch 2.14.1+cu130, 2026-11-07Portablefp1666.7 921 MiB/966 MiB–994x1482
Kernelsfp1623.0 255 MiB/360 MiB–994x1482
NVIDIA L40S CUDA, torch 2.14.1+cu130, 2026-11-07Portablefp1628.2 921 MiB/966 MiB–994x1482
Kernelsfp1615.3 255 MiB/340 MiB–994x1482
NVIDIA A10 CUDA, torch 2.14.1+cu130, 2026-11-07Portablefp1656.2 921 MiB/966 MiB–994x1482
Kernelsfp1616.9 196 MiB/280 MiB–994x1482
NVIDIA A100-SXM4-40GB CUDA, torch 2.14.1+cu130, 2026-11-07Portablefp1630.5 921 MiB/966 MiB–994x1482
Kernelsfp1615.7 255 MiB/360 MiB–994x1482
NVIDIA RTX PRO 6000 CUDA, torch 2.14.1+cu130, 2026-11-08Portablefp1614.5 921 MiB/966 MiB–994x1482
Kernelsfp164.99 255 MiB/380 MiB–994x1482

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 allowed

Code
MIT LICENSE
Weights
MIT source
Training data
Zero-shot model trained on a mixture of synthetic stereo datasets that includes FSD and Dynamic Replica (non-commercial data terms); the repository does not list the data or its terms
  • Trained on a mixture that includes NVIDIA's FSD dataset and Dynamic Replica, whose terms for commercial use of trained models are unclear (the repository lists no data terms); the status does not depend on the training data.

Our reading of the licences, not legal advice.

Weights

LAS2_S.pth 24.4 MB· hosted on Hugging Face

fastforks downloads and checks these files on first use (fastforks download las2-s).

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.

ETH3D two-view train

bad > 1 px % / EPEtraining data not stated: possibly seen

Rundtypebad px % ↓EPE ↓Δ bad px % vs fp32 originalpairsms / pair
Original fp32fp324.100.382 reference 27 18.7
Original fp16fp164.100.382 ±0.00 27 19.8
Portable fp32fp324.100.382 ±0.00 27 19.1
Portablefp164.100.382 ±0.00 27 20.2
Kernelsfp164.100.383 ±0.00 27 12.6
Original .half()fp164.100.383 ±0.00 27 18.4

Original = the authors’ code, same checkpoint and protocol. Measured on original fp32, original fp16, original .half(): RTX 5060 Ti, torch 2.14.1+cu130, 2026-11-05; portable fp32, portable, kernels: RTX 5060 Ti, torch 2.14.1+cu130, fastforks 468fba10, 2026-11-05.

Middlebury 2014 trainingH

bad > 2 px % / EPEtraining data not stated: possibly seen

Rundtypebad px % ↓EPE ↓Δ bad px % vs fp32 originalpairsms / pair
Original fp32fp3216.193.464 reference 15 56.2
Original fp16fp1616.183.460 +0.01 15 50.8
Portable fp32fp3216.193.464 ±0.00 15 57.9
Portablefp1616.183.460 +0.01 15 49.9
Kernelsfp1616.183.461 +0.01 15 18.4
Original .half()fp1616.193.462 ±0.00 15 39.2

Original = the authors’ code, same checkpoint and protocol. Measured on original fp32, original fp16, original .half(): RTX 5060 Ti, torch 2.14.1+cu130, 2026-11-05; portable fp32, portable, kernels: RTX 5060 Ti, torch 2.14.1+cu130, fastforks 468fba10, 2026-11-05.

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.002 vs the original. GPU, float16 (the default), portable and kernels: mean |diff| <= 0.05 px and p99 <= 0.5 px.

CheckToleranceMeasured
CPU fp32, max |diff|≤ 0.002 pxnot recorded
GPU default dtypes, mean |diff|≤ 0.05 px0.00524 px
GPU default dtypes, p99 |diff|≤ 0.5 px0.01843 px

Recorded for las2-s on RTX 5060 Ti, torch 2.14.1+cu130, 2026-10-31, with these kernels: cudnn_hacccutlass_convigevstereo_ops

Details

LiteAnyStereo V2: efficient zero-shot stereo with FasterNet-T0 features, a correlation volume and FasterNet 2-D cost aggregation (sizes S / M / L), or a group-wise volume with a selective-GRU update (H).

Input / output
Input: a rectified left / right image pair. Output: a disparity map (pixels, left view).
Input size
any H x W >= 32, padded to a multiple of 32; tested up to 3000x4000 (7,119 MiB allocated)
Options
  • cuda_graphs=true
Outputs
disparity
Checkpoint
size="s"
CUDA kernels
  • igevIGEV stereo: convolution epilogues, correlation lookups, GRU gates
  • cutlass_convCUTLASS convolutions with the recurrent update (GRU) fused in
  • cudnn_haccconvolutions with fp16 accumulation (cuDNN)
  • stereo_opsstereo building blocks: cost volume, soft-argmax, upsampling
Apple (MPS)
stereo_metalMetal: stereo kernels. fp32, fp16

Limitations

  • The original code's LAS1 (LiteAnyStereo.pth, another architecture) is not included.
  • Portable LAS2-H at 375 x 1242 is faster than the original code (35.6 vs 36.4 ms) but peaks 13 MB (3.7 %) higher (365 vs 352 MB). Kernels at 994 x 1482 allocate less than the original (917 vs 1022 MB) but reserve more (1248 vs 1084 MB): graph / cuDNN workspace blocks.
Full reference, generated from the repository

LiteAnyStereo V2, an efficient zero-shot stereo family in sizes S, M, L and H.

Commercial use: yes.

variantinputbackendtime (ms)peak memory (MiB, allocated / reserved)
las2-sMiddlebury 2014 half (994x1482)original (fp32)
original
portable
kernels
portable + torch.compile
TensorRT fp16
62.0
43.5
27.9
14.3
23.7
10.3
1676 / 1746
933 / 978
557 / 608
226 / 320
238 / 264
258 / 304
las2-mMiddlebury 2014 half (994x1482)original (fp32)
original
portable
kernels
portable + torch.compile
TensorRT fp16
79.1
52.4
37.1
18.1
28.6
13.2
1691 / 1762
948 / 1000
584 / 664
235 / 336
252 / 300
343 / 386
las2-lMiddlebury 2014 half (994x1482)original (fp32)
original
portable
kernels
portable + torch.compile
TensorRT fp16
154
90.8
75.7
30.1
46.6
23.4
1753 / 1812
1010 / 1082
648 / 716
268 / 362
385 / 432
393 / 424
las2-hMiddlebury 2014 half (994x1482)original (fp32)
original
portable
kernels
portable + torch.compile
TensorRT fp16
205
135
113
53.6
75.0
planned for 0.2.1
1839 / 1884
1022 / 1084
1002 / 1046
872 / 960
579 / 724
–
Details
  • Original code: https://github.com/TomTomTommi/LiteAnyStereo at 8c97bd4c4da3
  • Code licence: MIT (permissive); files: LICENSE
  • Weights licence: MIT
  • Licence evidence: https://huggingface.co/tomtomtommi/LiteAnyStereoV2/blob/17788d91618646fa781a14462e2926a034b9f49d/README.md#L2
  • Training data: Zero-shot model trained on a mixture of synthetic stereo datasets that includes FSD and Dynamic Replica (non-commercial data terms); the repository does not list the data or its terms
  • Licence note: Trained on a mixture that includes NVIDIA's FSD dataset and Dynamic Replica, whose terms for commercial use of trained models are unclear (the repository lists no data terms); the status does not depend on the training data.
  • Options: cuda_graphs = True (speed only)
  • Kernel libraries: igev, cutlass_conv, cudnn_hacc, stereo_ops
  • Variants: las2-s, las2-m, las2-l, las2-h
  • Not in this release (planned for 0.2.1): las2-h TensorRT export: the TensorRT 10 engine build fails (Myelin autotuner skips all tactics)
  • 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): las2-s 3000x4000 (7.0 GiB peak allocated, 7.4 reserved); las2-m 3000x4000 (7.0 GiB peak allocated, 7.4 reserved); las2-l 3000x4000 (7.0 GiB peak allocated, 7.4 reserved); las2-h 3000x4000 (8.5 GiB peak allocated, 11.7 reserved)
  • las2-s 994x1482, first call: portable + torch.compile 22 s (cold Inductor cache), TensorRT fp16 87 s (ONNX + engine).
  • las2-m 994x1482, first call: portable + torch.compile 24 s (cold Inductor cache), TensorRT fp16 98 s (ONNX + engine).
  • las2-l 994x1482, first call: portable + torch.compile 31 s (cold Inductor cache), TensorRT fp16 98 s (ONNX + engine).
  • las2-h 994x1482, first call: portable + torch.compile 37 s (cold Inductor cache).
  • las2-s original 994x1482: torch.autocast(fp16) around the forward
  • las2-m original 994x1482: torch.autocast(fp16) around the forward
  • las2-l original 994x1482: torch.autocast(fp16) around the forward
  • las2-h original 994x1482: torch.autocast(fp16) around the forward
  • las2-s load / first call: original 0.11 s / 0.019 s (375x1242), portable 0.66 s / 0.342 s (375x1242), kernels 0.6 s / 0.175 s (375x1242)
  • las2-m load / first call: original 0.17 s / 0.023 s (375x1242), portable 0.25 s / 0.402 s (375x1242), kernels 0.77 s / 0.179 s (375x1242)
  • las2-l load / first call: original 0.39 s / 0.044 s (375x1242), portable 0.53 s / 0.329 s (375x1242), kernels 0.66 s / 0.177 s (375x1242)
  • las2-h load / first call: original 0.26 s / 1.212 s (375x1242), portable 0.38 s / 0.409 s (375x1242), kernels 0.6 s / 0.243 s (375x1242)
  • Protocol, las2-s, las2-h: first call, 3 warm-up, peak reset, median of 3 rounds x median of 5
  • Protocol, las2-m, las2-l: 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 fp16original halfportableportable fp32kernelsnote
las2-sETH3D two-view train, bad > 1 px % / EPE4.10 / 0.3824.10 / 0.3824.10 / 0.3834.10 / 0.3824.10 / 0.3824.10 / 0.383possibly in the training data
las2-sMiddlebury 2014 trainingH, bad > 2 px % / EPE16.19 / 3.46416.18 / 3.46016.19 / 3.46216.18 / 3.46016.19 / 3.46416.18 / 3.461possibly in the training data
las2-mETH3D two-view train, bad > 1 px % / EPE2.97 / 0.3102.97 / 0.3102.97 / 0.3102.97 / 0.3102.98 / 0.3102.98 / 0.310possibly in the training data
las2-mMiddlebury 2014 trainingH, bad > 2 px % / EPE11.24 / 2.32411.23 / 2.32411.26 / 2.32511.23 / 2.32411.24 / 2.32411.24 / 2.324possibly in the training data
las2-lETH3D two-view train, bad > 1 px % / EPE2.24 / 0.2682.24 / 0.2684.57 / 0.3892.24 / 0.2682.24 / 0.2682.24 / 0.268possibly in the training data
las2-lMiddlebury 2014 trainingH, bad > 2 px % / EPE11.87 / 2.61511.85 / 2.61417.75 / 3.20211.85 / 2.61411.87 / 2.61511.85 / 2.614possibly in the training data
las2-hETH3D two-view train, bad > 1 px % / EPE2.14 / 0.2582.14 / 0.2585.54 / 0.3382.13 / 0.2582.14 / 0.2582.14 / 0.258possibly in the training data
las2-hMiddlebury 2014 trainingH, bad > 2 px % / EPE9.27 / 2.1419.28 / 2.14112.62 / 2.5469.27 / 2.1419.27 / 2.1419.27 / 2.141possibly 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.05 px and p99 <= 0.5 px.

variantkernels error vs original, mean / p99GPU, torchkernels used
las2-s0.00524 / 0.01843RTX 5060 Ti, torch 2.14.1+cu130cudnn_hacc@cudnn92400, cutlass_conv@988138e042cb:sm_120, igev@f075827d68c6:sm_120, stereo_ops@899b54f4a755:sm_120
las2-m0.00574 / 0.02524RTX 5060 Ti, torch 2.14.1+cu130cudnn_hacc@cudnn92400, cutlass_conv@988138e042cb:sm_120, igev@f075827d68c6:sm_120, stereo_ops@899b54f4a755:sm_120
las2-l0.0082 / 0.04395RTX 5060 Ti, torch 2.14.1+cu130cudnn_hacc@cudnn92400, cutlass_conv@988138e042cb:sm_120, igev@f075827d68c6:sm_120, stereo_ops@899b54f4a755:sm_120
las2-h0.00169 / 0.00883RTX 5060 Ti, torch 2.14.1+cu130cudnn_hacc@cudnn92400, cutlass_conv@988138e042cb:sm_120, igev@f075827d68c6:sm_120, stereo_ops@899b54f4a755:sm_120

Limitations

  • The original code's LAS1 (LiteAnyStereo.pth, another architecture) is not included.
  • Portable LAS2-H at 375 x 1242 is faster than the original code (35.6 vs 36.4 ms) but peaks 13 MB (3.7 %) higher (365 vs 352 MB). Kernels at 994 x 1482 allocate less than the original (917 vs 1022 MB) but reserve more (1248 vs 1084 MB): graph / cuDNN workspace blocks.

Example output

One fixed input through this checkpoint, the same for every model of the task (kernels · float16 · NVIDIA GeForce RTX 5060 Ti).

Left view
Right view
Output
Motorcycle, Middlebury 2014 stereo (left and right view, downscaled 4x), left view
Left view · 100%

Input: Motorcycle, Middlebury 2014 stereo (left and right view, downscaled 4x), Scharstein et al., Middlebury College (research dataset, no licence stated).