kevinqz commited on
Commit
e82c8c5
·
verified ·
1 Parent(s): ee15ce8

coreai-fabric: rife-4-interp card + license + reports

Browse files
Files changed (3) hide show
  1. LICENSE +21 -0
  2. README.md +111 -0
  3. parity-report.json +71 -0
LICENSE ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MIT License
2
+
3
+ Copyright (c) Megvii Inc.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
README.md ADDED
@@ -0,0 +1,111 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ base_model: TensorForger/RIFE-safetensors
4
+ pipeline_tag: image-to-image
5
+ library_name: coreai
6
+ tags:
7
+ - coreai
8
+ - core-ai
9
+ - coreai-fabric
10
+ - aimodel
11
+ - coreml
12
+ - apple
13
+ - apple-silicon
14
+ - on-device
15
+ - frame-interpolation
16
+ - video
17
+ - image-to-image
18
+ ---
19
+
20
+ > **Canonical:** [`kevinqz/RIFE-Frame-Interpolation-CoreAI`](https://huggingface.co/kevinqz/RIFE-Frame-Interpolation-CoreAI) — source of truth.
21
+
22
+ # RIFE Frame Interpolation (fabric)
23
+
24
+ An Apple Core AI conversion of
25
+ [TensorForger/RIFE-safetensors](https://huggingface.co/TensorForger/RIFE-safetensors) — a **frame
26
+ interpolation** network that takes two stacked RGB frames and synthesizes the
27
+ **intermediate frame** between them. Produced by [coreai-fabric](https://github.com/kevinqz/coreai-fabric/blob/main/recipes/rife-4-interp.yaml) and
28
+ indexed by [coreai-catalog](https://github.com/kevinqz/coreai-catalog).
29
+
30
+ > **Frame interpolation, not a generator.** This is a single-forward interpolator — two frames in, one synthesized frame at t=0.5 out. No temporal model, no audio. The **host owns** frame decode/encode and resizing each frame to a multiple of 32 before feeding the graph.
31
+
32
+ ## Model facts
33
+
34
+ | Field | Value |
35
+ |---|---|
36
+ | Parameters | 0.01B |
37
+ | Architecture | cnn/transformer |
38
+ | Capabilities | super-resolution |
39
+ | Input | 1×6×256×256 — concat(img0[:3], img1[3:]) in [0,1] |
40
+ | Output frame | 1×3×256×256 @ t=0.5 |
41
+ | Quantization / precision | none / float32 |
42
+ | On-disk size | 17 MB |
43
+ | Asset kind | single-graph frame interpolator (two frames -> middle frame) |
44
+ | assetVersion | 2.0 |
45
+
46
+
47
+ ## Use it — this needs host code you supply
48
+
49
+ The bundle is a single static-size graph: `frames` (1×6×256×256, `img0` and `img1` concatenated on the channel axis, RGB in [0,1]) in → the interpolated `frame` (1×3×256×256) out. **You supply** the video demux/mux, frame resizing, and any multi-t or recursive-interpolation loop in your host code (Swift or Python).
50
+
51
+ ```bash
52
+ pip install coreai-catalog && coreai-catalog install rife-4-interp
53
+ ```
54
+
55
+ ## Requirements
56
+
57
+ - **Deployment: macOS 27.0+ / iOS 27.0+, Xcode 27+.** The asset serializes with `minimum_os v27`,
58
+ so the on-device Swift runtime requires macOS/iOS 27+. A Mac on macOS 26 can
59
+ convert and inspect it but not run it on-device.
60
+ - Apple Silicon.
61
+
62
+ ## Verification (output parity)
63
+
64
+ - **Gate A (structure): passed** — the bundle's layout + metadata were
65
+ validated; the graph loads.
66
+ - **Gate B — graph_output_cosine: 1.000000 min output cosine** (median 1.000000) vs the fp32 torch reference network over 8 seeded frame pairs, measured on apple_silicon. Certifies the export computes the SAME output as the source — a conversion-fidelity metric, not task accuracy.
67
+ - This certifies the export is **numerically faithful to the source network** — it
68
+ does **NOT** certify perceptual interpolation quality on your footage. Reproduce
69
+ with `coreai-fabric verify`.
70
+
71
+ ## Provenance
72
+
73
+ | Field | Value |
74
+ |---|---|
75
+ | Base model | [TensorForger/RIFE-safetensors](https://huggingface.co/TensorForger/RIFE-safetensors) @ `78a62b7c2dd910536432d6c2c3a25e76f14fbf78` |
76
+ | Converted by | `models/rife/export.py` (version not reported) |
77
+ | Recipe | [rife-4-interp](https://github.com/kevinqz/coreai-fabric/blob/main/recipes/rife-4-interp.yaml) (recipe_source: fabric) |
78
+ | Precision / quantization | float32 / none |
79
+ | Conversion date | 2026-07-10 |
80
+
81
+ Machine-readable, in this repo:
82
+ [`parity-report.json`](./parity-report.json) ·
83
+ [`reproduce-manifest.json`](./reproduce-manifest.json) · [`LICENSE`](./LICENSE).
84
+
85
+ ## License and attribution
86
+
87
+ Weights licensed **mit** — see the bundled `LICENSE`. This artifact is a **converted derivative** of the base model: its
88
+ weights were converted to Apple Core AI format. The conversion itself is
89
+ community work.
90
+
91
+ ## Links
92
+
93
+ - **Base model:** [TensorForger/RIFE-safetensors](https://huggingface.co/TensorForger/RIFE-safetensors)
94
+ - **Reproduce:** [recipe `rife-4-interp`](https://github.com/kevinqz/coreai-fabric/blob/main/recipes/rife-4-interp.yaml)
95
+ - **Index:** [coreai-catalog](https://github.com/kevinqz/coreai-catalog)
96
+
97
+
98
+ ## The on-device Core AI ecosystem
99
+
100
+ - [coreai-fabric](https://github.com/kevinqz/coreai-fabric) — the reproducible
101
+ recipe → `.aimodel` pipeline that produced this asset.
102
+ - [coreai-catalog](https://github.com/kevinqz/coreai-catalog) — the index of Core
103
+ AI models with provenance and integration snippets.
104
+ - [apple/coreai-models](https://github.com/apple/coreai-models) — Apple's official
105
+ exporters and runtimes.
106
+
107
+ ## Not affiliated with Apple
108
+
109
+ Community conversion. Not produced, hosted, or endorsed by Apple. Apple and Core
110
+ AI are trademarks of Apple Inc., used here only to describe the target
111
+ runtime/format.
parity-report.json ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "recipe_id": "rife-4-interp",
3
+ "generated_at": "2026-07-10T03:43:46+00:00",
4
+ "bundle": "build/rife-4-interp/rife-4-interp.aimodel",
5
+ "conversion_manifest": null,
6
+ "gate_a": {
7
+ "status": "passed",
8
+ "checks": [
9
+ {
10
+ "name": "bundle_exists",
11
+ "status": "passed",
12
+ "detail": "build/rife-4-interp/rife-4-interp.aimodel"
13
+ },
14
+ {
15
+ "name": "bundle_files_present",
16
+ "status": "passed",
17
+ "detail": "3 expected file(s) present"
18
+ },
19
+ {
20
+ "name": "metadata_json_parses",
21
+ "status": "passed",
22
+ "detail": "metadata.json parses (3 top-level keys)"
23
+ },
24
+ {
25
+ "name": "metadata_matches_recipe",
26
+ "status": "passed",
27
+ "detail": "1 key(s) match"
28
+ }
29
+ ]
30
+ },
31
+ "gate_b": {
32
+ "metric": "graph_output_cosine",
33
+ "threshold": 0.999,
34
+ "tolerance": 0.0005,
35
+ "value": 0.999999947504797,
36
+ "status": "passed",
37
+ "measurement_source": "graph-output-parity-measured.json",
38
+ "min_cosine": 0.999999947504797,
39
+ "median_cosine": 0.9999999866862368,
40
+ "mean_cosine": 0.99999998080633,
41
+ "cosine_ci95": [
42
+ 0.999999947504797,
43
+ 0.9999999798041546
44
+ ],
45
+ "per_obs_cosine": [
46
+ 0.999999947504797,
47
+ 0.9999999703282998,
48
+ 0.9999999917418397,
49
+ 0.9999999901592456,
50
+ 0.9999999912567035,
51
+ 0.9999999798041546,
52
+ 0.9999999924423718,
53
+ 0.9999999832132279
54
+ ],
55
+ "n_obs": 8,
56
+ "height": 256,
57
+ "width": 256,
58
+ "reference_dtype": "float32",
59
+ "runner": "coreai-fabric-parity-runner/0.1.0",
60
+ "environment": {
61
+ "platform": "darwin-arm64",
62
+ "accelerator": "apple_silicon",
63
+ "runtime_version": "1.0.0b2",
64
+ "coreai_torch": "0.4.1",
65
+ "torch": "2.9.0",
66
+ "transformers": "4.57.6"
67
+ },
68
+ "reference": "Torch RIFE IFNet (TRUE grid_sample warp) interpolated frame [1,3,H,W] vs the Core AI .aimodel (manual bilinear warp) over identical seeded frame-pairs [1,6,H,W] in [0,1]; single forward, t=0.5."
69
+ },
70
+ "overall": "passed"
71
+ }