Spaces:
Running
Running
Download index.html from WeReCooking/Flowframes-WebGPU: direct link, hf CLI and curl.
- Browser
- Download file 3.97 kB
-
https://huggingface.co/spaces/WeReCooking/Flowframes-WebGPU/resolve/main/index.html
- Command line
-
hf download hf://spaces/WeReCooking/Flowframes-WebGPU/index.html
-
curl -L -o index.html https://huggingface.co/spaces/WeReCooking/Flowframes-WebGPU/resolve/main/index.html
3.97 kB
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <title>Flowframes WebGPU</title> | |
| <meta name="description" content="Double or quadruple the frame rate of a video with RIFE, on your own GPU in the browser. Nothing is uploaded."> | |
| <link rel="icon" href="data:,"> | |
| <link rel="stylesheet" href="style.css"> | |
| </head> | |
| <body> | |
| <main> | |
| <p id="line"><b><a href="https://github.com/n00mkrad/flowframes" target="_blank" rel="noopener">Flowframes</a></b> makes a video smoother by inventing the frames in between. This is a browser version of it: | |
| RIFE 4.9 on <b>your GPU</b>, and the video never leaves your device.</p> | |
| <label id="drop" for="file"><input id="file" type="file" accept="video/*"><span>Drop a video here, or choose one</span></label> | |
| <p id="examples-row">Or try: <span id="examples"></span></p> | |
| <p id="info"></p> | |
| <div id="opts" hidden> | |
| <label>Frame rate <select id="factor"><option value="2">Γ2</option><option value="4">Γ4</option></select></label> | |
| <label>Size <select id="side"><option value="0">Original</option><option value="1080">up to 1080p</option><option value="720" selected>up to 720p</option><option value="480">up to 480p</option></select></label> | |
| <button id="go" type="button">Interpolate</button> | |
| <button id="stop" type="button" hidden>Stop</button> | |
| </div> | |
| <p id="status" role="status" aria-live="polite">Ready.</p> | |
| <div id="bar"><i></i></div> | |
| <section id="result" hidden> | |
| <video id="video" controls playsinline loop></video> | |
| <a id="save" class="btn">Save the video</a> | |
| </section> | |
| <details id="more"> | |
| <summary>How it works and its limits</summary> | |
| <p><b>Credits.</b> <a href="https://github.com/n00mkrad/flowframes" target="_blank" rel="noopener">Flowframes</a> by n00mkrad is the Windows app this follows (decode, interpolate, re-encode, keep the audio); | |
| <a href="https://huggingface.co/spaces/Luminia/flowframes" target="_blank" rel="noopener">Luminia/flowframes</a> is its Python reimplementation as a Space, whose ONNX graph is used here (it comes from | |
| <a href="https://huggingface.co/yuvraj108c/rife-onnx" target="_blank" rel="noopener">yuvraj108c/rife-onnx</a>). The model is RIFE 4.9 by Huang et al., | |
| <a href="https://github.com/hzwer/Practical-RIFE" target="_blank" rel="noopener">hzwer/Practical-RIFE</a>. It runs with <a href="https://onnxruntime.ai/" target="_blank" rel="noopener">ONNX Runtime Web</a> on WebGPU; frames are decoded and re-encoded in the browser with WebCodecs | |
| (<a href="https://mediabunny.dev/" target="_blank" rel="noopener">Mediabunny</a>); the audio track is copied unchanged when the output format allows it. The Python version of this Space is on the <a href="https://huggingface.co/spaces/WeReCooking/Flowframes-WebGPU/tree/python" target="_blank" rel="noopener"><code>python</code> branch</a>.</p> | |
| <p><b>Speed (an estimate, not a measurement).</b> RIFE costs about 72, 163 and 361 GFLOP per generated frame at 480p, 720p and 1080p. At the 2β4 TFLOPS a discrete GPU reaches in ONNX Runtime Web | |
| that is roughly 20β35, 40β80 and 90β180 ms per frame; on an integrated GPU or Apple M-series (0.5β1.2 TFLOPS) roughly 60β140, 140β330 and 300β720 ms, plus decoding and encoding. | |
| A 10 s, 30 fps, 720p clip at Γ2 (300 new frames) is then about 12β25 s on a discrete GPU and 40β100 s on an integrated one. For comparison, the original Space's server GPU needs 21 ms per 720p frame.</p> | |
| <p>Scene cuts and fast, large motion can show artefacts, as with any interpolator. The result is built in memory, so very long or very large clips can run out of it: use a smaller size first.</p> | |
| <p id="store"></p> | |
| <button id="free" type="button">Free GPU memory</button> | |
| <button id="wipe" type="button">Delete downloaded model</button> | |
| </details> | |
| </main> | |
| <script type="module" src="main.js"></script> | |
| </body> | |
| </html> | |