LiteAnyStereo V2
LiteAnyStereo V2, an efficient zero-shot stereo family in sizes S, M, L and H. Commercially usable.
Commercial use: yes.
| variant | input | backend | time (ms) | peak memory (MiB, allocated / reserved) |
|---|---|---|---|---|
las2-s | Middlebury 2014 half (994x1482) | original (fp32) original portable kernels portable + torch.compile TensorRT fp16 | 62.0 43.5 46.9 14.3 23.7 10.3 | 1676 / 1746 933 / 978 955 / 988 320 / 558 238 / 264 162 (engine) |
las2-m | Middlebury 2014 half (994x1482) | original (fp32) original portable kernels | 79.1 52.4 54.1 18.3 | 1691 / 1762 948 / 1000 972 / 1026 329 / 572 |
las2-l | Middlebury 2014 half (994x1482) | original (fp32) original portable kernels | 154 90.8 80.3 29.9 | 1753 / 1812 1010 / 1082 1036 / 1098 397 / 600 |
las2-h | Middlebury 2014 half (994x1482) | original (fp32) original portable kernels | 205 135 123 53.3 | 1839 / 1884 1022 / 1084 1050 / 1110 1021 / 1388 |
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 - 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-s3000x4000 (7.0 GiB peak allocated, 7.4 reserved);las2-m3000x4000 (7.0 GiB peak allocated, 7.4 reserved);las2-l3000x4000 (7.0 GiB peak allocated, 7.4 reserved);las2-h3000x4000 (8.5 GiB peak allocated, 11.7 reserved) las2-s994x1482, first call: portable + torch.compile 22 s (cold Inductor cache), TensorRT fp16 87 s (ONNX + engine).las2-soriginal 994x1482: torch.autocast(fp16) around the forwardlas2-moriginal 994x1482: torch.autocast(fp16) around the forwardlas2-loriginal 994x1482: torch.autocast(fp16) around the forwardlas2-horiginal 994x1482: torch.autocast(fp16) around the forwardlas2-sload / first call: original 0.11 s / 0.019 s (375x1242), portable 0.09 s / 0.047† s, kernels 0.07† s / 0.015† slas2-mload / first call: original 0.17 s / 0.023 s (375x1242), portable 0.12 s / 0.054† s, kernels 0.1† s / 0.02† slas2-lload / first call: original 0.39 s / 0.044 s (375x1242), portable 0.23 s / 0.081† s, kernels 0.18† s / 0.031† slas2-hload / first call: original 0.26 s / 1.212 s (375x1242), portable 0.18 s / 0.136† s, kernels 0.13† s / 0.062† 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,
las2-s,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 - Protocol,
las2-h: median of 9 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 |
|---|---|---|---|---|---|---|
las2-s | ETH3D two-view train, bad > 1 px % / EPE | 4.10 / 0.382 | 4.10 / 0.382 | 4.10 / 0.382 | 4.10 / 0.383 | possibly in the training data |
las2-s | Middlebury 2014 trainingH, bad > 2 px % / EPE | 16.19 / 3.464 | 16.18 / 3.460 | 16.18 / 3.460 | 16.18 / 3.461 | possibly in the training data |
las2-m | ETH3D two-view train, bad > 1 px % / EPE | 2.97 / 0.310 | 2.97 / 0.310 | 2.97 / 0.310 | 2.98 / 0.310 | possibly in the training data |
las2-m | Middlebury 2014 trainingH, bad > 2 px % / EPE | 11.24 / 2.324 | 11.23 / 2.324 | 11.23 / 2.324 | 11.24 / 2.324 | possibly in the training data |
las2-l | ETH3D two-view train, bad > 1 px % / EPE | 2.24 / 0.268 | 2.24 / 0.268 | 2.24 / 0.268 | 2.24 / 0.268 | possibly in the training data |
las2-l | Middlebury 2014 trainingH, bad > 2 px % / EPE | 11.87 / 2.615 | 11.85 / 2.614 | 11.85 / 2.614 | 11.85 / 2.614 | possibly in the training data |
las2-h | ETH3D two-view train, bad > 1 px % / EPE | 2.14 / 0.258 | 2.14 / 0.258 | 2.13 / 0.258 | 2.14 / 0.258 | possibly in the training data |
las2-h | Middlebury 2014 trainingH, bad > 2 px % / EPE | 9.27 / 2.141 | 9.28 / 2.141 | 9.27 / 2.141 | 9.27 / 2.141 | possibly 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.
| variant | kernels error vs original, mean / p99 | GPU, torch | kernels used |
|---|---|---|---|
las2-s | 0.00524 / 0.01843 | RTX 5060 Ti, torch 2.14.1+cu130 | cudnn_hacc@cudnn92400, cutlass_conv@988138e042cb:sm_120, igev@f075827d68c6:sm_120, stereo_ops@899b54f4a755:sm_120 |
las2-m | 0.00574 / 0.02524 | RTX 5060 Ti, torch 2.14.1+cu130 | cudnn_hacc@cudnn92400, cutlass_conv@988138e042cb:sm_120, igev@f075827d68c6:sm_120, stereo_ops@899b54f4a755:sm_120 |
las2-l | 0.0082 / 0.04395 | RTX 5060 Ti, torch 2.14.1+cu130 | cudnn_hacc@cudnn92400, cutlass_conv@988138e042cb:sm_120, igev@f075827d68c6:sm_120, stereo_ops@899b54f4a755:sm_120 |
las2-h | 0.00169 / 0.00883 | RTX 5060 Ti, torch 2.14.1+cu130 | cudnn_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 is faster than the original code but allocates more memory.