LiteAnyStereo V2 (fastforks)

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).

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/TomTomTommi/LiteAnyStereo at 8c97bd4c4da3.

Author weight repos: https://huggingface.co/tomtomtommi/LiteAnyStereoV2.

Task: stereo. Tier: experimental. 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
las2-h@1 LAS2_H.pth 758585a25c3a MIT yes
las2-l@1 LAS2_L.pth 12f86f758b0a MIT yes
las2-m@1 LAS2_M.pth c41b61efce9b MIT yes
las2-s@1 LAS2_S.pth dda5ad549571 MIT yes

Licence

Original-code strings, recorded as they are (research-use package; check them before any other use). Code: MIT. Files: LICENSE.

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.

Licence evidence: https://huggingface.co/tomtomtommi/LiteAnyStereoV2/blob/17788d91618646fa781a14462e2926a034b9f49d/README.md#L2

Input size

any H x W >= 32, padded to a multiple of 32 Tested up to (portable, fp16, RTX 5060 Ti 16 GB): las2-h 3000x4000 (8.5 GiB peak allocated, 11.7 reserved); las2-l 3000x4000 (7.0 GiB peak allocated, 7.4 reserved); las2-m 3000x4000 (7.0 GiB peak allocated, 7.4 reserved); las2-s 3000x4000 (7.0 GiB peak allocated, 7.4 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
las2-h 204.8 134.9 122.8 53.27 2.5x 2.3x 1022 / 1084 1050 / 1110 1021 / 1388
las2-l 153.5 90.8 80.32 29.92 3.0x 2.7x 1010 / 1082 1036 / 1098 397 / 600
las2-m 79.1 52.4 54.13 18.29 2.9x 3.0x 948 / 1000 972 / 1026 329 / 572
las2-s 62.0 43.5 46.86 14.35 3.0x 3.3x 933 / 978 955 / 988 320 / 558

Startup and first call

model load (s): original portable kernels first call (s): original portable kernels
las2-h 0.26 (375x1242) 0.18 0.13โ€  1.21 (375x1242) 0.14โ€  0.06โ€ 
las2-l 0.39 (375x1242) 0.23 0.18โ€  0.04 (375x1242) 0.08โ€  0.03โ€ 
las2-m 0.17 (375x1242) 0.12 0.10โ€  0.02 (375x1242) 0.05โ€  0.02โ€ 
las2-s 0.11 (375x1242) 0.09 0.07โ€  0.02 (375x1242) 0.05โ€  0.01โ€ 

Fixed-size speed and peak memory, all models

model mode 640x480 1280x720 1920x1080 12 MP 4000x3000
las2-h portable 29.8 ms / 269 / 328 69.1 ms / 668 / 904 174.8 ms / 1386 / 2168 1408.7 ms / 8708 / 12018
las2-h kernels 10.2 ms / 218 / 596 28.5 ms / 604 / 1636 73.6 ms / 1344 / 1648 512.5 ms / 9695 / 12606
las2-l portable 25.5 ms / 286 / 328 51.1 ms / 653 / 700 110.1 ms / 1317 / 1404 824.0 ms / 7201 / 7598
las2-l kernels 6.6 ms / 129 / 270 16.8 ms / 241 / 676 38.6 ms / 422 / 588 254.6 ms / 2174 / 2896
las2-m portable 18.9 ms / 219 / 252 35.4 ms / 586 / 648 73.9 ms / 1249 / 1358 602.8 ms / 7135 / 7584
las2-m kernels 4.0 ms / 96 / 258 9.2 ms / 187 / 618 21.5 ms / 346 / 516 146.5 ms / 1870 / 2684
las2-s portable 16.1 ms / 202 / 234 31.0 ms / 569 / 632 64.4 ms / 1232 / 1342 532.1 ms / 7119 / 7566
las2-s kernels 3.0 ms / 88 / 246 6.9 ms / 179 / 602 16.6 ms / 338 / 500 109.3 ms / 1859 / 2598

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 original portable kernels note
las2-s ETH3D two-view train, bad > 1 px % / EPE 4.10 / 0.382 4.09 / 0.382 possibly in the training data
las2-s Middlebury 2014 trainingH, bad > 2 px % / EPE 16.18 / 3.460 16.18 / 3.462 possibly in the training data
las2-m ETH3D two-view train, bad > 1 px % / EPE 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.22 / 2.323 possibly in the training data
las2-l ETH3D two-view train, bad > 1 px % / EPE 2.24 / 0.268 2.25 / 0.269 possibly in the training data
las2-l Middlebury 2014 trainingH, bad > 2 px % / EPE 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.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.27 / 2.141 9.28 / 2.141 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.05 px and p99 <= 0.5 px.

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.

Usage

from fastforks import stereo

model = stereo.load("las2-h")  # 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: las2-h, las2-l, las2-m, las2-s.

Kernels backend

stereo.load("las2-h", mode="kernels") runs our CUDA kernels (igev, cutlass_conv, cudnn_hacc, stereo_ops). 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.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support