Model card synced with fastforks 7204e33f
Browse files
README.md
CHANGED
|
@@ -60,6 +60,12 @@ Tested up to (portable, fp16, RTX 5060 Ti 16 GB): `monster-mix-all` 1988x2880 (6
|
|
| 60 |
| --- | --- | --- | --- | --- | --- | --- |
|
| 61 |
| `monster-mix-all` | 5.85 (375x1242) | 4.83 | 0.95† | 1.26 (375x1242) | 1.59† | 0.67† |
|
| 62 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 63 |
### Fixed-size speed and peak memory, all models
|
| 64 |
|
| 65 |
| model | mode | 640x480 | 1280x720 | 1920x1080 | 12 MP 4000x3000 |
|
|
@@ -69,6 +75,12 @@ Tested up to (portable, fp16, RTX 5060 Ti 16 GB): `monster-mix-all` 1988x2880 (6
|
|
| 69 |
| `monster-sceneflow` | portable | 284.1 ms / 1089 / 1184 | 894.5 ms / 1732 / 2154 | 2290.9 ms (n=3) / 2935 / 3668 | OOM |
|
| 70 |
| `monster-sceneflow` | kernels | 127.1 ms / 1112 / 1250 | 379.4 ms / 1752 / 2288 | 956.9 ms / 2939 / 3460 | OOM |
|
| 71 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 72 |
Fixed-size cells: time (ms) / peak allocated / peak reserved memory (MiB).
|
| 73 |
|
| 74 |
- `monster-sceneflow`: same network and settings as `monster-mix-all`, measured once (rows not repeated).
|
|
@@ -86,7 +98,8 @@ Every variant is checked against golden outputs of the original code at its pinn
|
|
| 86 |
```python
|
| 87 |
from fastforks import stereo
|
| 88 |
|
| 89 |
-
|
|
|
|
| 90 |
result = model("left.png", "right.png")
|
| 91 |
result.disparity # [H, W] float32 tensor, input resolution
|
| 92 |
result.backend # what ran, e.g. Backend(mode='portable', device='cuda:0', dtype='float16')
|
|
@@ -97,3 +110,5 @@ Install with `pip install fastforks` (see <https://github.com/kleinicke/fastfork
|
|
| 97 |
## Kernels backend
|
| 98 |
|
| 99 |
`stereo.load("monster-mix-all", 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.
|
|
|
|
|
|
|
|
|
| 60 |
| --- | --- | --- | --- | --- | --- | --- |
|
| 61 |
| `monster-mix-all` | 5.85 (375x1242) | 4.83 | 0.95† | 1.26 (375x1242) | 1.59† | 0.67† |
|
| 62 |
|
| 63 |
+
### torch.compile and TensorRT
|
| 64 |
+
|
| 65 |
+
| model | input | portable ms | compile ms | compile s (cold) | TensorRT fp16 ms | ONNX + build s | kernels ms | peak MiB (alloc / reserved): portable | compile | TensorRT (device) |
|
| 66 |
+
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
|
| 67 |
+
| `monster-sceneflow` | 994x1482 | 1585.15 | 1096.3 | 102.6 | fails: ONNX export: conversion failed | – | 667.63 | 2336 / 2494 | 2081 / 2272 | – |
|
| 68 |
+
|
| 69 |
### Fixed-size speed and peak memory, all models
|
| 70 |
|
| 71 |
| model | mode | 640x480 | 1280x720 | 1920x1080 | 12 MP 4000x3000 |
|
|
|
|
| 75 |
| `monster-sceneflow` | portable | 284.1 ms / 1089 / 1184 | 894.5 ms / 1732 / 2154 | 2290.9 ms (n=3) / 2935 / 3668 | OOM |
|
| 76 |
| `monster-sceneflow` | kernels | 127.1 ms / 1112 / 1250 | 379.4 ms / 1752 / 2288 | 956.9 ms / 2939 / 3460 | OOM |
|
| 77 |
|
| 78 |
+
### Apple silicon (MPS)
|
| 79 |
+
|
| 80 |
+
| model | `portable` | `kernels` | speed-up |
|
| 81 |
+
| --- | --- | --- | --- |
|
| 82 |
+
| `monster-sceneflow` | 3344 ms / 3491 MiB (float16) | 2756 ms / 4093 MiB | 1.21x |
|
| 83 |
+
|
| 84 |
Fixed-size cells: time (ms) / peak allocated / peak reserved memory (MiB).
|
| 85 |
|
| 86 |
- `monster-sceneflow`: same network and settings as `monster-mix-all`, measured once (rows not repeated).
|
|
|
|
| 98 |
```python
|
| 99 |
from fastforks import stereo
|
| 100 |
|
| 101 |
+
# non-commercial weights: run with FASTFORKS_NONCOMMERCIAL=1 in the environment
|
| 102 |
+
model = stereo.load("monster-mix-all") # mode="auto": the preferred backend from recorded measurements
|
| 103 |
result = model("left.png", "right.png")
|
| 104 |
result.disparity # [H, W] float32 tensor, input resolution
|
| 105 |
result.backend # what ran, e.g. Backend(mode='portable', device='cuda:0', dtype='float16')
|
|
|
|
| 110 |
## Kernels backend
|
| 111 |
|
| 112 |
`stereo.load("monster-mix-all", 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.
|
| 113 |
+
|
| 114 |
+
<!-- staged from fastforks 7204e33f (2026-11-05) -->
|