Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,85 @@
|
|
1 |
---
|
2 |
license: apache-2.0
|
|
|
|
|
3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
license: apache-2.0
|
3 |
+
language:
|
4 |
+
- en
|
5 |
---
|
6 |
+
# Metal compatible models for Frame Interpolation in PyTorch
|
7 |
+
This repository contains exported models for [Frame interpolation in PyTorch](https://github.com/dajes/frame-interpolation-pytorch) and [ComfyUI Frame Interpolation \(ComfyUI VFI\)](https://github.com/Fannovel16/ComfyUI-Frame-Interpolation).
|
8 |
+
The models from [v1.0.2](https://github.com/dajes/frame-interpolation-pytorch/releases/tag/v1.0.2) distributed in the [Frame interpolation in PyTorch](https://github.com/dajes/frame-interpolation-pytorch) repository have an issue where they don't work on Apple Silicon Macs ([Runtime error: MPS Unsupported Border padding mode](https://github.com/dajes/frame-interpolation-pytorch/issues/4)).
|
9 |
+
These models have been re-exported using a [patch](https://github.com/dajes/frame-interpolation-pytorch/pull/6) that resolves this issue.
|
10 |
+
|
11 |
+
The models were created using the following steps:
|
12 |
+
|
13 |
+
1. Clone the original repository and install dependencies:
|
14 |
+
```
|
15 |
+
git clone https://github.com/dajes/frame-interpolation-pytorch.git
|
16 |
+
cd frame-interpolation-pytorch
|
17 |
+
|
18 |
+
uv venv
|
19 |
+
uv pip install -r requirements.txt
|
20 |
+
uv pip install tensorflow
|
21 |
+
```
|
22 |
+
|
23 |
+
2. Download model files distributed by [FILM: Frame Interpolation for Large Motion](https://github.com/google-research/frame-interpolation) from [Google Drive](https://drive.google.com/drive/folders/153dvxVSAcsNv1cyHVJySYZ-Twchm4Jdi) and place them in the repository root:
|
24 |
+
```
|
25 |
+
tree
|
26 |
+
.
|
27 |
+
βββ export.py
|
28 |
+
βββ feature_extractor.py
|
29 |
+
βββ fusion.py
|
30 |
+
βββ inference.py
|
31 |
+
βββ interpolator.py
|
32 |
+
βββ LICENSE
|
33 |
+
βββ photos
|
34 |
+
βΒ Β βββ one.png
|
35 |
+
βΒ Β βββ output.gif
|
36 |
+
βΒ Β βββ two.png
|
37 |
+
βββ pyramid_flow_estimator.py
|
38 |
+
βββ README.md
|
39 |
+
βββ requirements.txt
|
40 |
+
βββ saved_model
|
41 |
+
βΒ Β βββ assets
|
42 |
+
βΒ Β βββ keras_metadata.pb
|
43 |
+
βΒ Β βββ saved_model.pb
|
44 |
+
βΒ Β βββ variables
|
45 |
+
βΒ Β βββ variables.data-00000-of-00001
|
46 |
+
βΒ Β βββ variables.index
|
47 |
+
βββ util.py
|
48 |
+
```
|
49 |
+
|
50 |
+
3. Apply the [patch](https://github.com/dajes/frame-interpolation-pytorch/pull/6):
|
51 |
+
```
|
52 |
+
curl -L https://github.com/dajes/frame-interpolation-pytorch/pull/6.patch -o PR6.patch
|
53 |
+
git apply PR6.patch
|
54 |
+
```
|
55 |
+
|
56 |
+
4. Export the models:
|
57 |
+
```
|
58 |
+
uv run export.py ./saved_model film_net_fp16.pt
|
59 |
+
uv run export.py ./saved_model film_net_fp32.pt --fp32
|
60 |
+
```
|
61 |
+
|
62 |
+
## Citation
|
63 |
+
In accordance with the requirements of the original repositories, if you use these model files, please cite the following:
|
64 |
+
```
|
65 |
+
@inproceedings{reda2022film,
|
66 |
+
title = {FILM: Frame Interpolation for Large Motion},
|
67 |
+
author = {Fitsum Reda and Janne Kontkanen and Eric Tabellion and Deqing Sun and Caroline Pantofaru and Brian Curless},
|
68 |
+
booktitle = {European Conference on Computer Vision (ECCV)},
|
69 |
+
year = {2022}
|
70 |
+
}
|
71 |
+
```
|
72 |
+
|
73 |
+
```
|
74 |
+
@misc{film-tf,
|
75 |
+
title = {Tensorflow 2 Implementation of "FILM: Frame Interpolation for Large Motion"},
|
76 |
+
author = {Fitsum Reda and Janne Kontkanen and Eric Tabellion and Deqing Sun and Caroline Pantofaru and Brian Curless},
|
77 |
+
year = {2022},
|
78 |
+
publisher = {GitHub},
|
79 |
+
journal = {GitHub repository},
|
80 |
+
howpublished = {\url{https://github.com/google-research/frame-interpolation}}
|
81 |
+
}
|
82 |
+
```
|
83 |
+
|
84 |
+
## License
|
85 |
+
Following the original repositories, [Frame Interpolation in PyTorch](https://github.com/dajes/frame-interpolation-pytorch) and [FILM: Frame Interpolation for Large Motion](https://github.com/google-research/frame-interpolation), this project is licensed under the Apache 2.0 License.
|