Spaces:
Runtime error
Runtime error
|
Download docs/ncnn_conversion.md from Sumit7864/Image-Enhancer: direct link, hf CLI and curl.
- Browser
- Download file 580 Bytes
-
https://huggingface.co/spaces/Sumit7864/Image-Enhancer/resolve/main/docs/ncnn_conversion.md
- Command line
-
hf download hf://spaces/Sumit7864/Image-Enhancer/docs/ncnn_conversion.md
-
curl -L -o ncnn_conversion.md https://huggingface.co/spaces/Sumit7864/Image-Enhancer/resolve/main/docs/ncnn_conversion.md
580 Bytes
| # Instructions on converting to NCNN models | |
| 1. Convert to onnx model with `scripts/pytorch2onnx.py`. Remember to modify codes accordingly | |
| 1. Convert onnx model to ncnn model | |
| 1. `cd ncnn-master\ncnn\build\tools\onnx` | |
| 1. `onnx2ncnn.exe realesrgan-x4.onnx realesrgan-x4-raw.param realesrgan-x4-raw.bin` | |
| 1. Optimize ncnn model | |
| 1. fp16 mode | |
| 1. `cd ncnn-master\ncnn\build\tools` | |
| 1. `ncnnoptimize.exe realesrgan-x4-raw.param realesrgan-x4-raw.bin realesrgan-x4.param realesrgan-x4.bin 1` | |
| 1. Modify the blob name in `realesrgan-x4.param`: `data` and `output` | |