File size: 2,729 Bytes
6756f18 b403325 6756f18 b403325 6756f18 00c41bc 6756f18 55c01a4 6756f18 9896adc 6756f18 b403325 6756f18 4274f4e 6756f18 4274f4e 6789b8d c3220f4 6789b8d c3220f4 6789b8d 6756f18 422968c 6756f18 b403325 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 | ---
pipeline_tag: video-to-video
tags:
- code
---
# RIFE
This version of RIFE has been converted to run on the Axera NPU using **w8a16** quantization.
This model has been optimized with the following LoRA:
Compatible with Pulsar2 version: 4.2
## Convert tools links:
For those who are interested in model conversion, you can try to export axmodel through
- [The repo of AXera Platform](https://github.com/AXERA-TECH/RIFE.axera), which you can get the detail of guide
## Support Platform
- AX650
- [M4N-Dock(็ฑ่ฏๆดพPro)](https://wiki.sipeed.com/hardware/zh/maixIV/m4ndock/m4ndock.html)
- [M.2 Accelerator card](https://docs.m5stack.com/zh_CN/ai_hardware/LLM-8850_Card)
|Chips|model|cost|
|--|--|--|
|AX650|RIFE|200 ms|
## How to use
Download all files from this repository to the device
```
root@ax650:~/rife# tree
.
|-- model
| `-- rife_x2_720p.axmodel
|-- video
| `-- demo.mp4
|`-- run_axmodel.py
|`-- ms_ssim.py
|`-- build_config.json
|`-- requirements.txt
```
### Inference
```
Input Data:
|-- video
| `-- demo.mp4
```
#### Inference with M.2 Accelerator card with gradio demo
```
$python3 gradio_demo.py
[INFO] Available providers: ['AXCLRTExecutionProvider']
[INFO] Using provider: AXCLRTExecutionProvider
[INFO] SOC Name: AX650N
[INFO] VNPU type: VNPUType.DISABLED
[INFO] Compiler version: 4.2 77cdc0c2
[INFO] Using provider: AXCLRTExecutionProvider
[INFO] SOC Name: AX650N
[INFO] VNPU type: VNPUType.DISABLED
[INFO] Compiler version: 4.2 08e76396
[INFO] Using provider: AXCLRTExecutionProvider
[INFO] SOC Name: AX650N
[INFO] VNPU type: VNPUType.DISABLED
[INFO] Compiler version: 4.2 08e76396
==================================================
๐ ่ง้ขๆๅธงๅทฅๅ
ท Web UI ๅทฒๅฏๅจ๏ผ
๐ ๆฌๅฐ่ฎฟ้ฎ: http://127.0.0.1:7860
๐ ๅฑๅ็ฝ่ฎฟ้ฎ: http://10.126.33.124:7860
==================================================
```
Then open the local access link in the browser.

#### Inference with AX650 Host, such as M4N-Dock(็ฑ่ฏๆดพPro)
```
root@ax650 ~/rife #python3 run_axmodel.py --model ./model/rife_x2_720p.axmodel --video ./video/demo.mp4
[INFO] Available providers: ['AxEngineExecutionProvider']
[INFO] Using provider: AxEngineExecutionProvider
[INFO] Chip type: ChipType.MC50
[INFO] VNPU type: VNPUType.DISABLED
[INFO] Engine version: 2.12.0s
[INFO] Model type: 2 (triple core)
[INFO] Compiler version: 4.2 77cdc0c2
input name: onnx::Slice_0
demo.mp4, 128.0 frames in total, 25.0FPS to 50.0FPS
The audio will be merged after interpolation process
99%|โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ| 127/128.0 [01:38<00:00, 1.29it/s]
```
Output:
[INFO]: |