jkawamoto's picture
Update README.md
5db99db verified
metadata
license: apache-2.0
language:
  - en

Metal compatible models for Frame Interpolation in PyTorch

This repository contains exported models for Frame interpolation in PyTorch and ComfyUI Frame Interpolation (ComfyUI VFI). The models from v1.0.2 distributed in the Frame interpolation in PyTorch repository have an issue where they don't work on Apple Silicon Macs (Runtime error: MPS Unsupported Border padding mode). These models have been re-exported using a patch that resolves this issue.

The models were created using the following steps:

  1. Clone the original repository and install dependencies:
git clone https://github.com/dajes/frame-interpolation-pytorch.git
cd frame-interpolation-pytorch

uv venv
uv pip install -r requirements.txt 
uv pip install tensorflow   
  1. Download model files distributed by FILM: Frame Interpolation for Large Motion from Google Drive and place them in the repository root:
tree
.
β”œβ”€β”€ export.py
β”œβ”€β”€ feature_extractor.py
β”œβ”€β”€ fusion.py
β”œβ”€β”€ inference.py
β”œβ”€β”€ interpolator.py
β”œβ”€β”€ LICENSE
β”œβ”€β”€ photos
β”‚   β”œβ”€β”€ one.png
β”‚   β”œβ”€β”€ output.gif
β”‚   └── two.png
β”œβ”€β”€ pyramid_flow_estimator.py
β”œβ”€β”€ README.md
β”œβ”€β”€ requirements.txt
β”œβ”€β”€ saved_model
β”‚   β”œβ”€β”€ assets
β”‚   β”œβ”€β”€ keras_metadata.pb
β”‚   β”œβ”€β”€ saved_model.pb
β”‚   └── variables
β”‚       β”œβ”€β”€ variables.data-00000-of-00001
β”‚       └── variables.index
└── util.py
  1. Apply the patch:
curl -L https://github.com/dajes/frame-interpolation-pytorch/pull/6.patch -o PR6.patch
git apply PR6.patch
  1. Export the models:
uv run export.py ./saved_model film_net_fp16.pt 
uv run export.py ./saved_model film_net_fp32.pt --fp32

Citation

In accordance with the requirements of the original repositories, if you use these model files, please cite the following:

@inproceedings{reda2022film,
 title = {FILM: Frame Interpolation for Large Motion},
 author = {Fitsum Reda and Janne Kontkanen and Eric Tabellion and Deqing Sun and Caroline Pantofaru and Brian Curless},
 booktitle = {European Conference on Computer Vision (ECCV)},
 year = {2022}
}
@misc{film-tf,
  title = {Tensorflow 2 Implementation of "FILM: Frame Interpolation for Large Motion"},
  author = {Fitsum Reda and Janne Kontkanen and Eric Tabellion and Deqing Sun and Caroline Pantofaru and Brian Curless},
  year = {2022},
  publisher = {GitHub},
  journal = {GitHub repository},
  howpublished = {\url{https://github.com/google-research/frame-interpolation}}
}

License

Following the original repositories, Frame Interpolation in PyTorch and FILM: Frame Interpolation for Large Motion, this project is licensed under the Apache 2.0 License.