GIMM-VFI (fastforks)

GIMM-VFI (Guo et al., NeurIPS 2024), the RAFT-based GIMM-VFI-R: arbitrary-time video frame interpolation. RAFT estimates the flow between both frames in both directions; a generalizable implicit motion model (a SIREN MLP on time and position, conditioned on the forward-splatted flow latents) predicts the flow at the requested time; an AMT-style decoder refines it with the bidirectional feature correlation and blends both warped frames. Any time in [0, 1]. gimm-vfi-r is trained for accuracy, gimm-vfi-r-p adds an LPIPS loss for sharper, perceptually better frames.

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/GSeanCDAT/GIMM-VFI at dbc56449994a.

Author weight repos: https://huggingface.co/GSean/GIMM-VFI.

Task: interpolation. Tier: experimental. Outputs: frame. Backends: portable, kernels.

Input: two RGB images (consecutive frames). Output: the frame between them at timestep (0.5 by default; 0 = the first, 1 = the second), RGB in [0, 1].

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
gimm-vfi-r@1 gimmvfi_r_arb.pt 1dff0ac3ca91 LicenseRef-noncommercial no
gimm-vfi-r-p@1 gimmvfi_r_arb_lpips.pt b33e41536850 LicenseRef-noncommercial no

Licence

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

Training data: Vimeo-90K (septuplets / triplets for frame interpolation) (configs/gimmvfi/gimmvfi_r_arb.yaml: Vimeo-90K septuplets with arbitrary-time targets; the RAFT flow estimator starts from the raft-things checkpoint (FlyingChairs + FlyingThings3D).).

Licence evidence: https://github.com/GSeanCDAT/GIMM-VFI/blob/dbc56449994a3c2e045d46fd46bed570239913f8/LICENSE ; https://github.com/GSeanCDAT/GIMM-VFI/blob/dbc56449994a3c2e045d46fd46bed570239913f8/README.md (weights: https://huggingface.co/GSean/GIMM-VFI)

Input size

any H x W >= 128, padded to a multiple of 32 Tested up to (portable, fp16, RTX 5060 Ti 16 GB): gimm-vfi-r 1024x2048 (13.4 GiB peak allocated, 14.5 reserved); gimm-vfi-r-p 1024x2048 (13.0 GiB peak allocated, 14.2 reserved)

Speed and memory

Interpolation, synthetic, 1080x1920

model time (ms): original portable kernels kernels speed-up: vs original vs portable peak memory (MiB, allocated / reserved): original portable kernels
gimm-vfi-r OOM 2622 1629 – 1.6x – 9899 / 10400 4587 / 5362
gimm-vfi-r-p OOM 2622 1628 – 1.6x – 9899 / 10400 4587 / 5282

Startup and first call

model load (s): original portable kernels first call (s): original portable kernels
gimm-vfi-r 2.05 (480x854) 0.27 0.59 1.34 (480x854) 2.62 1.63
gimm-vfi-r-p 2.96 (480x854) 0.27 (480x854) 0.58 (480x854) 1.44 (480x854) 1.00 (480x854) 0.68 (480x854)

torch.compile and TensorRT

model input time: portable compile TensorRT fp16 kernels preparation: compile (cold first call) ONNX + engine build peak MiB (alloc / reserved): portable compile kernels TensorRT (engine + torch)
gimm-vfi-r 1080x1920 2622 ms deferred (build >5 min) deferred (build >5 min) 1629 ms – – 9899 / 10400 – 4587 / 5362 –
gimm-vfi-r-p 1080x1920 2622 ms deferred (build >5 min) deferred (build >5 min) 1628 ms – – 9899 / 10400 – 4587 / 5282 –

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 original code named above 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

DAVIS 2017 trainval 480p (JPEG), frames 0 / 2 and 20 / 22 of each of the 90 videos give the frame 1 / 21 at time 0.5, compared with the real one: PSNR and SSIM (Gaussian 11 x 11, sigma 1.5) of the output rounded to uint8, on RGB in [0, 1], averaged over the triplets. Original = the original code named under Details, same checkpoint and protocol.

variant dataset original fp32 original fp16 portable kernels note
gimm-vfi-r DAVIS 2017 480p, 2 frame triplets per video (180), PSNR / SSIM 28.94 / 0.8543 28.94 / 0.8543 28.94 / 0.8543 28.94 / 0.8543
gimm-vfi-r-p DAVIS 2017 480p, 2 frame triplets per video (180), PSNR / SSIM 28.81 / 0.8481 28.81 / 0.8481 28.81 / 0.8481 28.81 / 0.8481

Measured on NVIDIA GeForce RTX 5060 Ti, torch 2.14.1+cu130, fastforks e97998ab, 2026-11-14.

Parity with the original code

Every variant is checked against reference outputs of the original code at its pinned commit. CPU, float32: max |diff| <= 5e-05 vs the original. GPU, float16 (the default), portable and kernels: mean |diff| <= 0.0003 and p99 <= 0.003 (absolute error of the output frame).

Usage

from fastforks import interpolation

# non-commercial weights: run with FASTFORKS_NONCOMMERCIAL=1 in the environment
model = interpolation.load("gimm-vfi-r")  # mode="auto": the preferred backend from recorded measurements
result = model("frame1.png", "frame2.png")  # timestep=0.5: the middle frame
result.frame  # [3, H, W] float32 RGB in [0, 1], 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: gimm-vfi-r, gimm-vfi-r-p.

Kernels backend

interpolation.load("gimm-vfi-r", mode="kernels") runs our CUDA kernels (raft_flow, cudnn_hacc). 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

Collection including fastforks/gimm-vfi