RIFE (fastforks)

RIFE (Huang et al., ECCV 2022), the Practical-RIFE 4.25 / 4.26 releases: real-time video frame interpolation. A small conv encoder gives 4-channel features of both frames; five IFBlocks (two stride-2 convs, 8 residual convs, a transposed conv) estimate the flow from the intermediate frame to both inputs and a fusion mask, coarse to fine from 1/16 of the image to full size; the frame is both inputs warped to the time and blended by the mask. Any time in [0, 1]. rife-4.25 is the authors' recommended default, rife-4.26 the next release, rife-4.25-lite a narrower last block for lower cost.

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/hzwer/Practical-RIFE at bbfd2ea90910.

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
rife-4.25@1 rife-4.25-flownet.pkl 6615790efd62 MIT yes
rife-4.25-lite@1 rife-4.25-lite-flownet.pkl 81cdba223fe7 MIT yes
rife-4.26@1 rife-4.26-flownet.pkl 45c7f7415670 MIT yes

Licence

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

Training data: Vimeo-90K (septuplets / triplets for frame interpolation) (The README does not list the training data of the 4.x releases; the RIFE paper (arXiv:2011.06294) trains on Vimeo-90K, the 4.x releases add unnamed data (anime scenes per the 4.25 release note).).

Licence evidence: https://github.com/hzwer/Practical-RIFE/blob/bbfd2ea90910789a860ea3e2b32a240cd577b75e/README.md ; https://github.com/hzwer/Practical-RIFE/blob/bbfd2ea90910789a860ea3e2b32a240cd577b75e/LICENSE

Input size

any H x W >= 128, padded to a multiple of 128 Tested up to (portable, fp16, RTX 5060 Ti 16 GB): rife-4.25 3000x4000 (5.5 GiB peak allocated, 6.8 reserved); rife-4.25-lite 3000x4000 (5.5 GiB peak allocated, 6.5 reserved); rife-4.26 3000x4000 (5.5 GiB peak allocated, 6.8 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
rife-4.25 24.5 25.0 21.4 1.1x 1.2x 987 / 1154 755 / 894 848 / 916
rife-4.25-lite 21.3 21.1 18.3 1.2x 1.1x 1012 / 1214 754 / 854 834 / 896
rife-4.26 24.2 25.1 21.4 1.1x 1.2x 1004 / 1154 755 / 894 848 / 916

Startup and first call

model load (s): original portable kernels first call (s): original portable kernels
rife-4.25 1.42 0.31 1.50 0.27 0.49 0.20
rife-4.25-lite 0.18 1.00 1.11 0.12 0.23 0.18
rife-4.26 0.18 0.15 0.29 0.05 0.34 0.21

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)
rife-4.25 1080x1920 25.0 ms 44.9 ms 17.6 ms 21.4 ms 36.1 s 56.3 s 755 / 894 1094 / 1234 848 / 916 696 / 714
rife-4.25-lite 1080x1920 21.1 ms 42.3 ms 14.1 ms 18.3 ms 34.9 s 49.5 s 754 / 854 1061 / 1374 834 / 896 696 / 714
rife-4.26 1080x1920 25.1 ms 44.5 ms 17.6 ms 21.4 ms 34.9 s 54.9 s 755 / 894 1094 / 1234 848 / 916 696 / 714

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
rife-4.25 DAVIS 2017 480p, 2 frame triplets per video (180), PSNR / SSIM 27.13 / 0.8082 27.03 / 0.8074 27.13 / 0.8081 27.13 / 0.8081
rife-4.26 DAVIS 2017 480p, 2 frame triplets per video (180), PSNR / SSIM 27.24 / 0.8131 27.14 / 0.8123 27.24 / 0.8131 27.24 / 0.8131
rife-4.25-lite DAVIS 2017 480p, 2 frame triplets per video (180), PSNR / SSIM 26.82 / 0.8011 26.70 / 0.8001 26.81 / 0.8010 26.81 / 0.8010

Measured on NVIDIA GeForce RTX 5060 Ti, torch 2.14.1+cu130, fastforks 5b3a5646, 2026-11-13.

Parity with the original code

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

Usage

from fastforks import interpolation

model = interpolation.load("rife-4.25")  # 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: rife-4.25, rife-4.25-lite, rife-4.26.

Kernels backend

interpolation.load("rife-4.25", mode="kernels") runs our CUDA kernels (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/rife

Paper for fastforks/rife