jkawamoto commited on
Commit
5db99db
Β·
verified Β·
1 Parent(s): 7319a9b

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +82 -0
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.