Views
No views yet
| Original | This repo | |
|---|---|---|
| Weight format | .pkl hosted on Google Drive | .safetensors hosted on Hugging Face |
TensorRT / torch.compile | Known issues with torchinductor and TensorRT backends | Fixed — model sources are fully compatible |
model/IFNet.py
with all changes required for torch.compile and TensorRT export applied.(B, 6, H, W) tensor — the first frame in channels [:3] and the
second frame in channels [3:], values in [0, 1].(B, 3, H, W) interpolated frame tensor, values in [0, 1].1git clone https://huggingface.co/tensorforger/RIFE-safetensors
2cd RIFE-safetensors
3pip install -r requirements.txt1import torch
2from safetensors.torch import load_file
3from interpolation_model import IFNet
4
5model = IFNet()
6model.load_state_dict(load_file("flownet.safetensors"))
7model.to("cuda").eval()
8
9# frame0, frame1: (B, 3, H, W) float tensors in [0, 1]
10x = torch.cat([frame0, frame1], dim=1) # → (B, 6, H, W)
11with torch.no_grad():
12 mid_frame = model(x) # → (B, 3, H, W)model = torch.compile(model, backend="inductor") # or backend="tensorrt"matplotlib.python demo.pytorch.Size([1, 3, 256, 256]).| File | Description |
|---|---|
flownet.safetensors | Model weights (converted from original .pkl) |
interpolation_model.py | IFNet model definition (compile-friendly fork of upstream) |
demo.py | Minimal runnable example |
requirements.txt | Python dependencies |
1@inproceedings{huang2022rife,
2 title = {Real-Time Intermediate Flow Estimation for Video Frame Interpolation},
3 author = {Huang, Zhewei and Zhang, Tianyuan and Heng, Wen and Shi, Boxin and Zhou, Shuchang},
4 booktitle = {Proceedings of the European Conference on Computer Vision (ECCV)},
5 year = {2022}
6}