RIFE-4.25 / README.md
xocialize's picture
Add RIFE-4.25 (MLX fp32 RIFE port)
6b650ea verified
|
Raw
History Blame Contribute Delete
1.51 kB
---
license: mit
library_name: mlx
pipeline_tag: video-to-video
tags:
- mlx
- frame-interpolation
- video-frame-interpolation
- rife
- apple-silicon
---
# RIFE 4.25 (MLX)
Apple **MLX** port of [Practical-RIFE](https://github.com/hzwer/Practical-RIFE)
**4.25** — real-time video **frame interpolation** on Apple Silicon. **MIT.**
First MLX/Apple-Silicon-native RIFE: torch-free inference, arbitrary-timestep
interpolation, `--multi` Nx frame rate, `--scale` pyramid for 4K, audio-preserving
video. Converted from the official RIFE 4.25 `flownet.pkl` (Google-Drive-only
upstream) to fp32 safetensors.
## Usage
```bash
pip install rife-mlx # https://github.com/xocialize/rife-mlx
rife-mlx -i input.mp4 -o out.mp4 --multi 2 # 2x fps, keep audio
rife-mlx --img0 a.png --img1 b.png -t 0.5 -o mid.png
```
```python
from rife_mlx.utils.weights import build_model
from rife_mlx.pipeline_mlx import interpolate_pair
model = build_model("4.25") # auto-downloads this repo
mid = interpolate_pair(model, frame_a, frame_b, 0.5) # HWC uint8
```
## Details
- **Architecture**: IFNet (5 coarse-to-fine IFBlocks c=[192,128,96,64,32],
LeakyReLU, ResConv+beta, Head encoder, ConvTranspose+PixelShuffle).
- **Precision**: fp32 (~23 MB) — RIFE's coarse-to-fine flow is fp16-sensitive.
- **Parity vs PyTorch (CPU fp32)**: warp 2.2e-6 · interp 1.2e-7 · full IFNet 1.43e-3.
## License
MIT (upstream Practical-RIFE, © hzwer). Weights are the official RIFE 4.25
release, converted to MLX.