GMFlow
GMFlow (2022; the flow models of UniMatch, 2023): optical flow as one global matching step between Transformer-enhanced features of both images; variants add a second matching scale and refinement steps. MIT code; the authors' weights carry no separate licence.
experimental Fork of autonomousvision/unimatch@943a990 · backends: portable, kernels
- Paper GMFlow: Learning Optical Flow via Global Matching CVPR 2022 · first released 26 Nov 2021
- Authors’ code haofeixu/gmflow (PyTorch), not the code forked here: The authors' unimatch repository (the successor of their GMFlow code) carries the GMFlow models together with the regrefine models in one codebase.
Paper 2021 Added in 0.2.0 Evaluated with 0.2.0
Use it
pip install fastforks Lean install with only what this model needs: pip install fastforks-core
from fastforks import flow
model = flow.load("gmflow-scale1-things") # kernels on a supported GPU, else portable PyTorch
result = model(frame1, frame2)
result.flow
result.backend # what ran: mode, device, dtype, kernels fastforks bench gmflow-scale1-things 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.
| Backend | dtype | Time per call (ms) | vs original fp16 | Peak memory allocated / reserved | Load (s) | First call (s) |
|---|---|---|---|---|---|---|
| Original fp32upstream UniMatch ({'num_scales': 1, 'upsample_factor': 8, 'reg_refine': False}, {'attn_type': 'swin', 'attn_splits_list': [2], 'corr_radius_list': [-1], 'prop_radius_list': [-1], 'num_reg_refine': 1, 'task': 'flow'}), padded to multiples of 16 | fp32 | 1245 | 0.60× | 8,384 MiB/8,458 MiB | 1.5 | 1.69 |
| Original fp16torch.autocast(float16) around the call; upstream UniMatch ({'num_scales': 1, 'upsample_factor': 8, 'reg_refine': False}, {'attn_type': 'swin', 'attn_splits_list': [2], 'corr_radius_list': [-1], 'prop_radius_list': [-1], 'num_reg_refine': 1, 'task': 'flow'}), padded to multiples of 16 | fp16 | 750 | – | 8,360 MiB/8,468 MiB | 0.1 | 0.94 |
| Portable fp32 | fp32 | not measured | – | – | – | – |
| Portable | fp16 | 556 | 1.3× | 4,496 MiB/4,642 MiB | 0.2 | 0.56 |
| Kernels | not measured | – | – | – | – | |
| Portable + torch.compile | 382 | 2.0× | 4,293 MiB/4,558 MiB | 35 (build) | – | |
| TensorRT fp16 | fp16 | 187 | 4.0× | 4,172 MiBenginenot comparable | 69 (build) | – |
Measured on RTX 5060 Ti 16 GB, torch 2.14.1+cu130, 2026-11-11 to 2026-11-15. 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
| Device | Backend | dtype | ms / call | Peak memory | Output vs reference | Input |
|---|---|---|---|---|---|---|
| Apple M1 Pro 16 GB MPS, torch 2.14.1, 2026-11-14 | Original | fp32 | 5143 | 12.8 GiB process | – | 1080x1920 |
| Portable | fp16 | 10676 | 12.3 GiB process | matches | 1080x1920 | |
| Portable | fp32 | 3269 | 11.6 GiB process | matches | 1080x1920 | |
| Kernels | fp32 | not implemented | – | 1080x1920 | ||
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 AND Apache-2.0 AND BSD-3-Clause LICENSELICENSE-Apache-2.0LICENSE-RAFT
- Weights
- MIT AND Apache-2.0 AND BSD-3-Clause (assumed from code)(not stated by the authors; assumed to follow the code) source
- Training data
-
- FlyingChairs (Freiburg) research-only, non-commercial
- Freiburg SceneFlow (FlyingThings3D, Driving, Monkaa) research-only, non-commercial
- weights licence not stated by the original authors; assumed to be the code licence
Our reading of the licences, not legal advice.
Weights
gmflow-scale1-things-e9887eda.pth 18.8 MB· hosted on s3.eu-central-1.amazonaws.comfastforks downloads and checks these files on first use (fastforks download gmflow-scale1-things).
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.
KITTI 2015 train
EPE / Fl-all %
| Run | dtype | EPE ↓ | Fl-all % ↓ | Δ EPE vs fp32 original | pairs | ms / pair |
|---|---|---|---|---|---|---|
| Original fp32 | fp32 | 10.347 | 34.31 | reference | 200 | 90.9 |
| Original fp16 | fp16 | 10.347 | 34.30 | −0.001 | 200 | 53.5 |
| Portable fp32 | fp32 | 10.347 | 34.30 | ±0.000 | 200 | 77.8 |
| Portable | fp16 | 10.346 | 34.30 | +0.001 | 200 | 56.1 |
| Kernels | not measured | |||||
Frames _10 -> _11 at full size against the flow_occ ground truth; EPE = mean of the per-pair mean end-point error, Fl-all = share of all valid pixels with an error > 3 px and > 5 % of the GT magnitude. Original = the authors’ code, same checkpoint and protocol. Measured on original fp32, original fp16: RTX 5060 Ti, torch 2.14.1+cu130, 2026-11-11; portable fp32: RTX 5060 Ti, torch 2.14.1+cu130, fastforks 6f0a70e1, 2026-11-17; portable: RTX 5060 Ti, torch 2.14.1+cu130, fastforks c4a67979, 2026-11-11.
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.0001 vs the original. GPU, float16 (the default), portable and kernels: mean |diff| <= 0.0031 and p99 <= 0.021 (absolute error of the output flow).
| Check | Tolerance | Measured |
|---|---|---|
| CPU fp32, max |diff| | ≤ 0.0001 | not recorded |
| GPU default dtypes, mean |diff| | ≤ 0.0031 | 0.00198 |
| GPU default dtypes, p99 |diff| | ≤ 0.021 | 0.00808 |
Recorded for gmflow-scale1-things on RTX 5060 Ti, torch 2.10.0+cu130, 2026-11-17, with these kernels: flow_upsample
Details
GMFlow (Xu, Zhang, Cai, Rezatofighi & Tao 2022) in its UniMatch release (Xu et al. 2023): optical flow as global matching. A CNN gives features at 1/8 resolution, a Transformer with self- and cross-attention (shifted windows) makes the two images' features aware of each other, the flow is the expected position of the best match over the whole image, and a self-attention layer spreads it into occluded areas. `scale2` variants repeat this at 1/4 resolution with local matching; `regrefine6` variants add 6 RAFT-like local refinements.
- Input / output
- Input: two RGB images (consecutive frames). Output: per-pixel motion from the first to the second (dx, dy in pixels).
- Input size
- any H x W >= 64, padded to a multiple of 16; tested up to 1024x2048 (5,554 MiB allocated)
- Outputs
flow- CUDA kernels
flow_upsample
- Apple (MPS)
- fp32, fp16
Limitations
- TensorRT builds at 1080x1920 fail for scale2 variants with a Myelin CHECK(is_const()) error on RTX 5060 Ti; scale1 variants build.
Full reference, generated from the repository
GMFlow (2022; the flow models of UniMatch, 2023): optical flow as one global matching step between Transformer-enhanced features of both images; variants add a second matching scale and refinement steps. MIT code; the authors' weights carry no separate licence.
Commercial use: yes.
| variant | input | backend | time (ms) | peak memory (MiB, allocated / reserved) |
|---|---|---|---|---|
gmflow-scale1-things | synthetic (1080x1920) | original (fp32) original portable kernels portable + torch.compile TensorRT fp16 | 1245 750 556 – 382 187 | 8384 / 8458 8360 / 8468 4496 / 4642 – 4293 / 4558 4333 / 4390 |
gmflow-scale1-mixdata | synthetic (1080x1920) | original (fp32) original portable kernels portable + torch.compile TensorRT fp16 | 1246 750 556 – 382 187 | 8384 / 8538 8360 / 8448 4496 / 4642 – 4293 / 4558 4333 / 4390 |
gmflow-scale2-things | synthetic (1080x1920) | original (fp32) original portable kernels portable + torch.compile TensorRT fp16 | 2537 1599 1139 – 765 planned for 0.2.1 | 8512 / 8742 8425 / 8552 6017 / 6224 – 10865 / 10904 – |
gmflow-scale2-sintel | synthetic (1080x1920) | original (fp32) original portable kernels portable + torch.compile TensorRT fp16 | 2541 1607 1139 – 765 planned for 0.2.1 | 8512 / 8742 8425 / 8552 6017 / 6224 – 10865 / 10904 – |
gmflow-scale2-mixdata | synthetic (1080x1920) | original (fp32) original portable kernels portable + torch.compile TensorRT fp16 | 2544 1608 1139 – 765 planned for 0.2.1 | 8512 / 8722 8425 / 8572 6017 / 6224 – 10865 / 10904 – |
gmflow-scale2-regrefine6-things | synthetic (1080x1920) | original (fp32) original portable kernels portable + torch.compile TensorRT fp16 | 3230 2175 1665 – 1116 planned for 0.2.1 | 8522 / 8730 8537 / 8822 6080 / 6230 – 10875 / 10972 – |
gmflow-scale2-regrefine6-sintelft | synthetic (1080x1920) | original (fp32) original portable kernels portable + torch.compile TensorRT fp16 | 3255 2184 1674 – 1116 planned for 0.2.1 | 8522 / 8730 8537 / 8822 6080 / 6250 – 10875 / 10972 – |
gmflow-scale2-regrefine6-kitti | synthetic (1080x1920) | original (fp32) original portable kernels portable + torch.compile TensorRT fp16 | 3255 2188 1678 – 1116 planned for 0.2.1 | 8522 / 8710 8537 / 8822 6080 / 6230 – 10875 / 10972 – |
gmflow-scale2-regrefine6-mixdata | synthetic (1080x1920) | original (fp32) original portable kernels portable + torch.compile TensorRT fp16 | 3254 2188 1675 – 1116 planned for 0.2.1 | 8522 / 8710 8537 / 8822 6080 / 6250 – 10875 / 10972 – |
Details
- Original code: https://github.com/autonomousvision/unimatch at
943a99006950 - Code licence: MIT AND Apache-2.0 AND BSD-3-Clause (permissive); files:
LICENSE,LICENSE-Apache-2.0,LICENSE-RAFT - Weights licence: MIT AND Apache-2.0 AND BSD-3-Clause (assumed from code)
- Licence evidence: https://github.com/autonomousvision/unimatch/blob/943a99006950ab6c84ea72a72beb147fdd03c19a/MODEL_ZOO.md
- Training data: FlyingChairs (Freiburg), Freiburg SceneFlow (FlyingThings3D, Driving, Monkaa) (FlyingChairs, then FlyingThings3D (part of SceneFlow))
gmflow-scale1-mixdata: MODEL_ZOO.md: "trained on several mixed public datasets" (not listed)gmflow-scale2-sintel: FlyingChairs (Freiburg), Freiburg SceneFlow (FlyingThings3D, Driving, Monkaa), MPI Sintel optical flow, KITTI stereo / optical flow 2012 / 2015, HCI HD1K optical flow benchmark (FlyingChairs, FlyingThings3D, then upstream's 'sintel' stage: Sintel, KITTI 2015, HD1K and FlyingThings3D)gmflow-scale2-mixdata: MODEL_ZOO.md: "trained on several mixed public datasets" (not listed)gmflow-scale2-regrefine6-sintelft: FlyingChairs (Freiburg), Freiburg SceneFlow (FlyingThings3D, Driving, Monkaa), MPI Sintel optical flow, KITTI stereo / optical flow 2012 / 2015, HCI HD1K optical flow benchmark (FlyingChairs, FlyingThings3D, the 'sintel' stage (Sintel, KITTI 2015, HD1K, FlyingThings3D), then fine-tuned on Sintel)gmflow-scale2-regrefine6-kitti: FlyingChairs (Freiburg), Freiburg SceneFlow (FlyingThings3D, Driving, Monkaa), KITTI stereo / optical flow 2012 / 2015, not stated by the authors (FlyingChairs, FlyingThings3D, Virtual KITTI 2 (no dataset entry here yet, hence 'unstated'), then KITTI 2012 + 2015 (upstream scripts/gmflow_scale2_regrefine6_train.sh, stages vkitti2 and kitti_mix))gmflow-scale2-regrefine6-mixdata: MODEL_ZOO.md: "trained on several mixed public datasets" (not listed)
- Kernel libraries:
flow_upsample - Variants:
gmflow-scale1-things,gmflow-scale1-mixdata,gmflow-scale2-things,gmflow-scale2-sintel,gmflow-scale2-mixdata,gmflow-scale2-regrefine6-things,gmflow-scale2-regrefine6-sintelft,gmflow-scale2-regrefine6-kitti,gmflow-scale2-regrefine6-mixdata - Not in this release (planned for 0.2.1):
gmflow-scale2-thingsTensorRT export: the TensorRT 10 engine build fails (Myelin error on the attention graph);gmflow-scale2-sintelTensorRT export: the TensorRT 10 engine build fails (Myelin error on the attention graph);gmflow-scale2-mixdataTensorRT export: the TensorRT 10 engine build fails (Myelin error on the attention graph);gmflow-scale2-regrefine6-thingsTensorRT export: the TensorRT 10 engine build fails (Myelin error on the attention graph);gmflow-scale2-regrefine6-sintelftTensorRT export: the TensorRT 10 engine build fails (Myelin error on the attention graph);gmflow-scale2-regrefine6-kittiTensorRT export: the TensorRT 10 engine build fails (Myelin error on the attention graph);gmflow-scale2-regrefine6-mixdataTensorRT export: the TensorRT 10 engine build fails (Myelin error on the attention graph) - Outputs: flow
- Input size:
gmflow-scale1-things,gmflow-scale1-mixdata: any H x W >= 64, padded to a multiple of 16gmflow-scale2-things,gmflow-scale2-sintel,gmflow-scale2-mixdata,gmflow-scale2-regrefine6-things,gmflow-scale2-regrefine6-sintelft,gmflow-scale2-regrefine6-kitti,gmflow-scale2-regrefine6-mixdata: any H x W >= 64, padded to a multiple of 32
- Tested up to (portable, fp16, RTX 5060 Ti 16 GB):
gmflow-scale1-things1024x2048 (5.4 GiB peak allocated, 6.0 reserved);gmflow-scale1-mixdata1024x2048 (5.4 GiB peak allocated, 6.0 reserved);gmflow-scale2-things1024x2048 (6.3 GiB peak allocated, 13.1 reserved);gmflow-scale2-sintel1024x2048 (6.3 GiB peak allocated, 13.1 reserved);gmflow-scale2-mixdata1024x2048 (6.3 GiB peak allocated, 13.1 reserved);gmflow-scale2-regrefine6-things1024x2048 (6.3 GiB peak allocated, 13.1 reserved);gmflow-scale2-regrefine6-sintelft1024x2048 (6.3 GiB peak allocated, 13.1 reserved);gmflow-scale2-regrefine6-kitti1024x2048 (6.3 GiB peak allocated, 13.1 reserved);gmflow-scale2-regrefine6-mixdata1024x2048 (6.3 GiB peak allocated, 13.1 reserved) gmflow-scale1-things1080x1920, first call: portable + torch.compile 35 s (cold Inductor cache), TensorRT fp16 69 s (ONNX + engine).gmflow-scale1-mixdata1080x1920, first call: portable + torch.compile 29 s (cold Inductor cache), TensorRT fp16 67 s (ONNX + engine).gmflow-scale2-things1080x1920, first call: portable + torch.compile 47 s (cold Inductor cache).gmflow-scale2-sintel1080x1920, first call: portable + torch.compile 47 s (cold Inductor cache).gmflow-scale2-mixdata1080x1920, first call: portable + torch.compile 47 s (cold Inductor cache).gmflow-scale2-regrefine6-things1080x1920, first call: portable + torch.compile 58 s (cold Inductor cache).gmflow-scale2-regrefine6-sintelft1080x1920, first call: portable + torch.compile 58 s (cold Inductor cache).gmflow-scale2-regrefine6-kitti1080x1920, first call: portable + torch.compile 58 s (cold Inductor cache).gmflow-scale2-regrefine6-mixdata1080x1920, first call: portable + torch.compile 59 s (cold Inductor cache).gmflow-scale1-thingsoriginal (fp32) 1080x1920: upstream UniMatch ({'num_scales': 1, 'upsample_factor': 8, 'reg_refine': False}, {'attn_type': 'swin', 'attn_splits_list': [2], 'corr_radius_list': [-1], 'prop_radius_list': [-1], 'num_reg_refine': 1, 'task': 'flow'}), padded to multiples of 16gmflow-scale1-thingsoriginal 1080x1920: torch.autocast(float16) around the call; upstream UniMatch ({'num_scales': 1, 'upsample_factor': 8, 'reg_refine': False}, {'attn_type': 'swin', 'attn_splits_list': [2], 'corr_radius_list': [-1], 'prop_radius_list': [-1], 'num_reg_refine': 1, 'task': 'flow'}), padded to multiples of 16gmflow-scale1-mixdataoriginal (fp32) 1080x1920: upstream UniMatch ({'num_scales': 1, 'upsample_factor': 8, 'reg_refine': False}, {'attn_type': 'swin', 'attn_splits_list': [2], 'corr_radius_list': [-1], 'prop_radius_list': [-1], 'num_reg_refine': 1, 'task': 'flow'}), padded to multiples of 16gmflow-scale1-mixdataoriginal 1080x1920: torch.autocast(float16) around the call; upstream UniMatch ({'num_scales': 1, 'upsample_factor': 8, 'reg_refine': False}, {'attn_type': 'swin', 'attn_splits_list': [2], 'corr_radius_list': [-1], 'prop_radius_list': [-1], 'num_reg_refine': 1, 'task': 'flow'}), padded to multiples of 16gmflow-scale2-thingsoriginal (fp32) 1080x1920: upstream UniMatch ({'num_scales': 2, 'upsample_factor': 4, 'reg_refine': False}, {'attn_type': 'swin', 'attn_splits_list': [2, 8], 'corr_radius_list': [-1, 4], 'prop_radius_list': [-1, 1], 'num_reg_refine': 1, 'task': 'flow'}), padded to multiples of 32gmflow-scale2-thingsoriginal 1080x1920: torch.autocast(float16) around the call; upstream UniMatch ({'num_scales': 2, 'upsample_factor': 4, 'reg_refine': False}, {'attn_type': 'swin', 'attn_splits_list': [2, 8], 'corr_radius_list': [-1, 4], 'prop_radius_list': [-1, 1], 'num_reg_refine': 1, 'task': 'flow'}), padded to multiples of 32gmflow-scale2-sinteloriginal (fp32) 1080x1920: upstream UniMatch ({'num_scales': 2, 'upsample_factor': 4, 'reg_refine': False}, {'attn_type': 'swin', 'attn_splits_list': [2, 8], 'corr_radius_list': [-1, 4], 'prop_radius_list': [-1, 1], 'num_reg_refine': 1, 'task': 'flow'}), padded to multiples of 32gmflow-scale2-sinteloriginal 1080x1920: torch.autocast(float16) around the call; upstream UniMatch ({'num_scales': 2, 'upsample_factor': 4, 'reg_refine': False}, {'attn_type': 'swin', 'attn_splits_list': [2, 8], 'corr_radius_list': [-1, 4], 'prop_radius_list': [-1, 1], 'num_reg_refine': 1, 'task': 'flow'}), padded to multiples of 32gmflow-scale2-mixdataoriginal (fp32) 1080x1920: upstream UniMatch ({'num_scales': 2, 'upsample_factor': 4, 'reg_refine': False}, {'attn_type': 'swin', 'attn_splits_list': [2, 8], 'corr_radius_list': [-1, 4], 'prop_radius_list': [-1, 1], 'num_reg_refine': 1, 'task': 'flow'}), padded to multiples of 32gmflow-scale2-mixdataoriginal 1080x1920: torch.autocast(float16) around the call; upstream UniMatch ({'num_scales': 2, 'upsample_factor': 4, 'reg_refine': False}, {'attn_type': 'swin', 'attn_splits_list': [2, 8], 'corr_radius_list': [-1, 4], 'prop_radius_list': [-1, 1], 'num_reg_refine': 1, 'task': 'flow'}), padded to multiples of 32gmflow-scale2-regrefine6-thingsoriginal (fp32) 1080x1920: upstream UniMatch ({'num_scales': 2, 'upsample_factor': 4, 'reg_refine': True}, {'attn_type': 'swin', 'attn_splits_list': [2, 8], 'corr_radius_list': [-1, 4], 'prop_radius_list': [-1, 1], 'num_reg_refine': 6, 'task': 'flow'}), padded to multiples of 32gmflow-scale2-regrefine6-thingsoriginal 1080x1920: torch.autocast(float16) around the call; upstream UniMatch ({'num_scales': 2, 'upsample_factor': 4, 'reg_refine': True}, {'attn_type': 'swin', 'attn_splits_list': [2, 8], 'corr_radius_list': [-1, 4], 'prop_radius_list': [-1, 1], 'num_reg_refine': 6, 'task': 'flow'}), padded to multiples of 32gmflow-scale2-regrefine6-sintelftoriginal (fp32) 1080x1920: upstream UniMatch ({'num_scales': 2, 'upsample_factor': 4, 'reg_refine': True}, {'attn_type': 'swin', 'attn_splits_list': [2, 8], 'corr_radius_list': [-1, 4], 'prop_radius_list': [-1, 1], 'num_reg_refine': 6, 'task': 'flow'}), padded to multiples of 32gmflow-scale2-regrefine6-sintelftoriginal 1080x1920: torch.autocast(float16) around the call; upstream UniMatch ({'num_scales': 2, 'upsample_factor': 4, 'reg_refine': True}, {'attn_type': 'swin', 'attn_splits_list': [2, 8], 'corr_radius_list': [-1, 4], 'prop_radius_list': [-1, 1], 'num_reg_refine': 6, 'task': 'flow'}), padded to multiples of 32gmflow-scale2-regrefine6-kittioriginal (fp32) 1080x1920: upstream UniMatch ({'num_scales': 2, 'upsample_factor': 4, 'reg_refine': True}, {'attn_type': 'swin', 'attn_splits_list': [2, 8], 'corr_radius_list': [-1, 4], 'prop_radius_list': [-1, 1], 'num_reg_refine': 6, 'task': 'flow'}), padded to multiples of 32gmflow-scale2-regrefine6-kittioriginal 1080x1920: torch.autocast(float16) around the call; upstream UniMatch ({'num_scales': 2, 'upsample_factor': 4, 'reg_refine': True}, {'attn_type': 'swin', 'attn_splits_list': [2, 8], 'corr_radius_list': [-1, 4], 'prop_radius_list': [-1, 1], 'num_reg_refine': 6, 'task': 'flow'}), padded to multiples of 32gmflow-scale2-regrefine6-mixdataoriginal (fp32) 1080x1920: upstream UniMatch ({'num_scales': 2, 'upsample_factor': 4, 'reg_refine': True}, {'attn_type': 'swin', 'attn_splits_list': [2, 8], 'corr_radius_list': [-1, 4], 'prop_radius_list': [-1, 1], 'num_reg_refine': 6, 'task': 'flow'}), padded to multiples of 32gmflow-scale2-regrefine6-mixdataoriginal 1080x1920: torch.autocast(float16) around the call; upstream UniMatch ({'num_scales': 2, 'upsample_factor': 4, 'reg_refine': True}, {'attn_type': 'swin', 'attn_splits_list': [2, 8], 'corr_radius_list': [-1, 4], 'prop_radius_list': [-1, 1], 'num_reg_refine': 6, 'task': 'flow'}), padded to multiples of 32gmflow-scale1-thingsload / first call: original 0.14 s / 0.942 s, portable 0.16 s / 0.558 sgmflow-scale1-mixdataload / first call: original 0.13 s / 0.76 s, portable 0.16 s / 0.558 sgmflow-scale2-thingsload / first call: original 0.14 s / 1.61 s, portable 0.17 s / 1.141 sgmflow-scale2-sintelload / first call: original 0.13 s / 1.618 s, portable 0.16 s / 1.141 sgmflow-scale2-mixdataload / first call: original 0.13 s / 1.618 s, portable 0.16 s / 1.141 sgmflow-scale2-regrefine6-thingsload / first call: original 0.15 s / 2.186 s, portable 0.16 s / 1.666 sgmflow-scale2-regrefine6-sintelftload / first call: original 0.15 s / 2.369 s, portable 0.26 s / 1.676 sgmflow-scale2-regrefine6-kittiload / first call: original 0.15 s / 2.199 s, portable 0.46 s / 1.679 sgmflow-scale2-regrefine6-mixdataload / first call: original 0.14 s / 2.198 s, portable 0.25 s / 1.676 s- Protocol, first call, 3 warm-up, peak reset, median of 3 rounds x median of 5
Measured
Frames _10 -> _11 at full size against the flow_occ ground truth; EPE = mean of the per-pair mean end-point error, Fl-all = share of all valid pixels with an error > 3 px and > 5 % of the GT magnitude. Original = the original code named under Details, same checkpoint and protocol.
| variant | dataset | original fp32 | original fp16 | portable | portable fp32 | note |
|---|---|---|---|---|---|---|
gmflow-scale1-things | KITTI 2015 train, EPE / Fl-all % | 10.347 / 34.31 | 10.347 / 34.30 | 10.346 / 34.30 | 10.347 / 34.30 | |
gmflow-scale1-mixdata | KITTI 2015 train, EPE / Fl-all % | 3.698 / 17.60 | 3.698 / 17.61 | 3.697 / 17.61 | 3.698 / 17.60 | possibly in the training data |
gmflow-scale2-things | KITTI 2015 train, EPE / Fl-all % | 6.747 / 22.09 | 6.747 / 22.09 | 6.747 / 22.09 | 6.747 / 22.09 | |
gmflow-scale2-sintel | KITTI 2015 train, EPE / Fl-all % | 1.975 / 7.88 | 1.976 / 7.88 | 1.975 / 7.88 | 1.975 / 7.88 | trained on this dataset's public images; not a zero-shot result |
gmflow-scale2-mixdata | KITTI 2015 train, EPE / Fl-all % | 2.390 / 10.10 | 2.390 / 10.10 | 2.389 / 10.10 | 2.390 / 10.10 | possibly in the training data |
gmflow-scale2-regrefine6-things | KITTI 2015 train, EPE / Fl-all % | 4.918 / 16.33 | 4.918 / 16.32 | 4.917 / 16.32 | 4.918 / 16.33 | |
gmflow-scale2-regrefine6-sintelft | KITTI 2015 train, EPE / Fl-all % | 1.153 / 3.92 | 1.154 / 3.92 | 1.154 / 3.92 | 1.153 / 3.92 | trained on this dataset's public images; not a zero-shot result |
gmflow-scale2-regrefine6-kitti | KITTI 2015 train, EPE / Fl-all % | 0.570 / 1.15 | 0.570 / 1.15 | 0.570 / 1.15 | 0.570 / 1.15 | trained on this dataset's public images; not a zero-shot result |
gmflow-scale2-regrefine6-mixdata | KITTI 2015 train, EPE / Fl-all % | 1.315 / 4.64 | 1.315 / 4.63 | 1.315 / 4.64 | 1.314 / 4.64 | possibly in the training data |
Measured on portable: NVIDIA GeForce RTX 5060 Ti, torch 2.14.1+cu130, fastforks c4a67979, 2026-11-11; portable32: NVIDIA GeForce RTX 5060 Ti, torch 2.14.1+cu130, fastforks 6f0a70e1, 2026-11-17.
Parity
CPU, float32: max |diff| <= 0.0001 vs the original. GPU, float16 (the default), portable and kernels: mean |diff| <= 0.0031 and p99 <= 0.021 (absolute error of the output flow).
| variant | kernels error vs original, mean / p99 | GPU, torch | kernels used |
|---|---|---|---|
gmflow-scale1-things | 0.00198 / 0.00808 | RTX 5060 Ti, torch 2.10.0+cu130 | flow_upsample@5eca8c1a6d3b:sm_120 |
gmflow-scale1-mixdata | 0.002 / 0.00938 | RTX 5060 Ti, torch 2.10.0+cu130 | flow_upsample@5eca8c1a6d3b:sm_120 |
gmflow-scale2-things | 0.00128 / 0.00537 | RTX 5060 Ti, torch 2.10.0+cu130 | flow_upsample@5eca8c1a6d3b:sm_120 |
gmflow-scale2-sintel | 0.00134 / 0.00653 | RTX 5060 Ti, torch 2.10.0+cu130 | flow_upsample@5eca8c1a6d3b:sm_120 |
gmflow-scale2-mixdata | 0.00145 / 0.00581 | RTX 5060 Ti, torch 2.10.0+cu130 | flow_upsample@5eca8c1a6d3b:sm_120 |
gmflow-scale2-regrefine6-things | 0.00098 / 0.00504 | RTX 5060 Ti, torch 2.10.0+cu130 | flow_upsample@5eca8c1a6d3b:sm_120 |
gmflow-scale2-regrefine6-sintelft | 0.00112 / 0.00836 | RTX 5060 Ti, torch 2.10.0+cu130 | flow_upsample@5eca8c1a6d3b:sm_120 |
gmflow-scale2-regrefine6-kitti | 0.00175 / 0.01264 | RTX 5060 Ti, torch 2.10.0+cu130 | flow_upsample@5eca8c1a6d3b:sm_120 |
gmflow-scale2-regrefine6-mixdata | 0.00098 / 0.00564 | RTX 5060 Ti, torch 2.10.0+cu130 | flow_upsample@5eca8c1a6d3b:sm_120 |
Limitations
- TensorRT builds at 1080x1920 fail for scale2 variants with a Myelin CHECK(is_const()) error on RTX 5060 Ti; scale1 variants build.
Example output
One fixed input through this checkpoint, the same for every model of the task (portable · float16 · NVIDIA GeForce RTX 5060 Ti).
Input: Motorcycle, Middlebury 2014 stereo (left and right view, downscaled 4x), Scharstein et al., Middlebury College (research dataset, no licence stated).