Models · Frame interpolation

RIFE

RIFE (Practical-RIFE 4.25, 4.26 and 4.25 lite, Huang et al.): makes the frame between two video frames from the optical flow it estimates between them, for slow motion and higher frame rates. MIT code and weights.

experimental Fork of hzwer/Practical-RIFE@bbfd2ea · backends: portable, kernels

Checkpoint

Paper 2020 Added in 0.2.0 Evaluated with 0.2.0

Kernels, RTX 5060 Ti 16 GB 21.4 ms 1080x1920, fp16
vs the faster original 1.1× original fp16: 24.5 ms
Peak memory 848 MiB original: 987 MiB
Accuracy vs original fp32 ±0.00 kernels psnr, DAVIS 2017 480p (27.13 original)

Use it

pip install fastforks

Lean install with only what this model needs: pip install fastforks-core

from fastforks import interpolation

model = interpolation.load("rife-4.25")  # kernels on a supported GPU, else portable PyTorch
result = model(frame1, frame2)
result.frame
result.backend  # what ran: mode, device, dtype, kernels
fastforks bench rife-4.25

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.

Input: synthetic, 1080x1920 (the task’s standard size)

BackenddtypeTime per call (ms)vs original fp16Peak memory
allocated / reserved
Load (s)First call (s)
Original fp32fp32not measured ––––
Original fp16the authors' mixed-precision option (float16); upstream Practical-RIFE Model.inference, timestep 0.5, zero pad to 128, inference_video.py --fp16: half default dtype, model and inputfp16 24.5–987 MiB/1,154 MiB0.20.08
Portable fp32fp32not measured ––––
Portablefp16 25.00.98×755 MiB/894 MiB0.20.45
Kernelsfp16 21.41.1×848 MiB/916 MiB0.50.20
Portable + torch.compile 44.90.55×1,094 MiB/1,234 MiB36 (build)–
TensorRT fp16fp16 17.61.4×562 MiBenginenot comparable56 (build)–

Measured on RTX 5060 Ti 16 GB, torch 2.14.1+cu130, 2026-11-13 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

DeviceBackenddtypems / callPeak memoryOutput vs referenceInput
Apple M1 Pro 16 GB MPS, torch 2.14.1, 2026-11-14Originalfp32169 3,588 MiB process–1080x1920
Portablefp16106 2,482 MiB processmatches1080x1920
Portablefp32119 2,481 MiB processmatches1080x1920
Kernelsfp16not 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 LICENSE
Weights
MIT source
Training data

Our reading of the licences, not legal advice.

Weights

rife-4.25-flownet.pkl 24.6 MB· inside a 22.9 MB archive· hosted on Google Drive

fastforks downloads and checks these files on first use (fastforks download rife-4.25).

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.

DAVIS 2017 480p

2 frame triplets per video (180), PSNR / SSIM

Rundtypepsnr ↑ssim ↑Δ psnr vs fp32 originaltripletsms / triplet
Original fp32fp3227.130.8082 reference 180 –
Original fp16fp1627.030.8074 −0.10 180 –
Portable fp32fp3227.130.8082 ±0.00 180 –
Portablefp1627.130.8081 ±0.00 180 –
Kernelsfp1627.130.8081 ±0.00 180 –

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 for the 180-triplet benchmark. Original = the authors’ code, same checkpoint and protocol. Measured on original fp32, original fp16: RTX 5060 Ti, torch 2.14.1+cu130, 2026-11-13; portable fp32: RTX 5060 Ti, torch 2.14.1+cu130, fastforks dc38c37c, 2026-11-17; portable, kernels: RTX 5060 Ti, torch 2.14.1+cu130, fastforks 5b3a5646, 2026-11-13.

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.00024 and p99 <= 0.0013 (absolute error of the output frame).

CheckToleranceMeasured
CPU fp32, max |diff|≤ 0.0001 not recorded
GPU default dtypes, mean |diff|≤ 0.00024 0.00016
GPU default dtypes, p99 |diff|≤ 0.0013 0.00083

Recorded for rife-4.25 on RTX 5060 Ti, torch 2.14.1+cu130, 2026-11-13, with these kernels: cudnn_hacc

Details

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.

Input / output
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].
Input size
any H x W >= 128, padded to a multiple of 128; tested up to 3000x4000 (5,639 MiB allocated)
Options
  • cuda_graphs=true
Outputs
frame
CUDA kernels
  • cudnn_haccconvolutions with fp16 accumulation (cuDNN)
Apple (MPS)
fp32, fp16
Full reference, generated from the repository

RIFE (Practical-RIFE 4.25, 4.26 and 4.25 lite, Huang et al.): makes the frame between two video frames from the optical flow it estimates between them, for slow motion and higher frame rates. MIT code and weights.

Commercial use: yes.

variantinputbackendtime (ms)peak memory (MiB, allocated / reserved)
rife-4.25synthetic (1080x1920)original
portable
kernels
portable + torch.compile
TensorRT fp16
24.5
25.0
21.4
44.9
17.6
987 / 1154
755 / 894
848 / 916
1094 / 1234
696 / 714
rife-4.26synthetic (1080x1920)original
portable
kernels
portable + torch.compile
TensorRT fp16
24.2
25.1
21.4
44.5
17.6
1004 / 1154
755 / 894
848 / 916
1094 / 1234
696 / 714
rife-4.25-litesynthetic (1080x1920)original
portable
kernels
portable + torch.compile
TensorRT fp16
21.3
21.1
18.3
42.3
14.1
1012 / 1214
754 / 854
834 / 896
1061 / 1374
696 / 714
Details
  • Original code: https://github.com/hzwer/Practical-RIFE at bbfd2ea90910
  • Code licence: MIT (permissive); files: LICENSE
  • Weights licence: MIT
  • Licence evidence: https://github.com/hzwer/Practical-RIFE/blob/bbfd2ea90910789a860ea3e2b32a240cd577b75e/README.md ; https://github.com/hzwer/Practical-RIFE/blob/bbfd2ea90910789a860ea3e2b32a240cd577b75e/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).)
  • Options: cuda_graphs = True (speed only)
  • Kernel libraries: cudnn_hacc
  • Variants: rife-4.25, rife-4.26, rife-4.25-lite
  • Outputs: frame
  • 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.26 3000x4000 (5.5 GiB peak allocated, 6.8 reserved); rife-4.25-lite 3000x4000 (5.5 GiB peak allocated, 6.5 reserved)
  • rife-4.25 1080x1920, first call: portable + torch.compile 36 s (cold Inductor cache), TensorRT fp16 56 s (ONNX + engine).
  • rife-4.26 1080x1920, first call: portable + torch.compile 35 s (cold Inductor cache), TensorRT fp16 55 s (ONNX + engine).
  • rife-4.25-lite 1080x1920, first call: portable + torch.compile 35 s (cold Inductor cache), TensorRT fp16 50 s (ONNX + engine).
  • rife-4.25 original 1080x1920: the authors' mixed-precision option (float16); upstream Practical-RIFE Model.inference, timestep 0.5, zero pad to 128, inference_video.py --fp16: half default dtype, model and input
  • rife-4.26 original 1080x1920: the authors' mixed-precision option (float16); upstream Practical-RIFE Model.inference, timestep 0.5, zero pad to 128, inference_video.py --fp16: half default dtype, model and input
  • rife-4.25-lite original 1080x1920: the authors' mixed-precision option (float16); upstream Practical-RIFE Model.inference, timestep 0.5, zero pad to 128, inference_video.py --fp16: half default dtype, model and input
  • rife-4.25 load / first call: original 1.42 s / 0.265 s, portable 0.16 s / 0.447 s, kernels 1.5 s / 0.203 s
  • rife-4.26 load / first call: original 0.18 s / 0.046 s, portable 0.16 s / 0.334 s, kernels 0.29 s / 0.215 s
  • rife-4.25-lite load / first call: original 0.18 s / 0.12 s, portable 0.24 s / 0.273 s, kernels 0.6 s / 0.195 s
  • Protocol, first call, 3 warm-up, peak reset, median of 3 rounds x median of 5

Measured

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 for the 180-triplet benchmark. Original = the original code named under Details, same checkpoint and protocol.

variantdatasetoriginal fp32original fp16portableportable fp32kernelsnote
rife-4.25DAVIS 2017 480p, 2 frame triplets per video (180), PSNR / SSIM27.13 / 0.808227.03 / 0.807427.13 / 0.808127.13 / 0.808227.13 / 0.8081
rife-4.26DAVIS 2017 480p, 2 frame triplets per video (180), PSNR / SSIM27.24 / 0.813127.14 / 0.812327.24 / 0.813127.24 / 0.813127.24 / 0.8131
rife-4.25-liteDAVIS 2017 480p, 2 frame triplets per video (180), PSNR / SSIM26.82 / 0.801126.70 / 0.800126.81 / 0.801026.82 / 0.801126.81 / 0.8010

Measured on portable: NVIDIA GeForce RTX 5060 Ti, torch 2.14.1+cu130, fastforks 5b3a5646, 2026-11-13; portable32: NVIDIA GeForce RTX 5060 Ti, torch 2.14.1+cu130, fastforks dc38c37c, 2026-11-17; kernels: NVIDIA GeForce RTX 5060 Ti, torch 2.14.1+cu130, fastforks 5b3a5646, 2026-11-13.

Parity

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

variantkernels error vs original, mean / p99GPU, torchkernels used
rife-4.250.00016 / 0.00083RTX 5060 Ti, torch 2.14.1+cu130cudnn_hacc@cudnn92400
rife-4.260.00015 / 0.00075RTX 5060 Ti, torch 2.14.1+cu130cudnn_hacc@cudnn92400
rife-4.25-lite0.00015 / 0.00078RTX 5060 Ti, torch 2.14.1+cu130cudnn_hacc@cudnn92400

Example output

No example rendered for this checkpoint yet.