https://github.com/upscayl/upscayl-ncnn
The Upscayl backend powered by the NCNN framework and Real-ESRGAN architecture.
https://github.com/upscayl/upscayl-ncnn
esrgan ncnn real-esrgan real-esrgan-gui upscale upscayl
Last synced: about 1 month ago
JSON representation
The Upscayl backend powered by the NCNN framework and Real-ESRGAN architecture.
- Host: GitHub
- URL: https://github.com/upscayl/upscayl-ncnn
- Owner: upscayl
- License: agpl-3.0
- Fork: true (xinntao/Real-ESRGAN-ncnn-vulkan)
- Created: 2023-08-14T13:47:28.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-08-01T19:15:54.000Z (9 months ago)
- Last Synced: 2024-08-01T21:43:25.930Z (9 months ago)
- Topics: esrgan, ncnn, real-esrgan, real-esrgan-gui, upscale, upscayl
- Language: C
- Homepage: https://upscayl.org
- Size: 1.59 MB
- Stars: 130
- Watchers: 2
- Forks: 25
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome - upscayl/upscayl-ncnn - The Upscayl backend powered by the NCNN framework and Real-ESRGAN architecture. (C)
README
# Installation:
### Prerequisites:
- `cmake`
- `gcc-9` and `g++-9`
- `Vulkan SDK`
- Download the latest Vulkan SDK tarball from [https://vulkan.lunarg.com/sdk/home](https://vulkan.lunarg.com/sdk/home) and extract it using:\
`wget https://sdk.lunarg.com/sdk/download/1.3.280.1/linux/vulkansdk-linux-x86_64-1.3.280.1.tar.xz && tar -xf vulkansdk-linux-x86_64-1.3.280.1.tar.xz && rm vulkansdk-linux-x86_64-1.3.280.1.tar.xz`### Steps:
1. Clone the repository with all submodules (requires an SSH key be added to your account):
`git clone --recursive [email protected]:upscayl/upscayl-ncnn.git`
`cd upscayl-ncnn` or if you've already cloned: `git submodule update --init --recursive`
2. Set up environment variables: `export CC="gcc-9" CXX="g++-9" `
3. `export VULKAN_SDK=/path` where you extracted your vulkan SDK -> 1.3.280.1/x86_64
4. Make a new build directory and cd into it: `mkdir build && cd build`
5. Now, build : `cmake ../src`
6. `cmake --build . -j 2` Replace the `-j 2` with the number of cores you want to use to compile## MacOS
### Prerequisites:
- openmp installed, install with `brew install libomp`
- cmake installed, install with `brew install cmake`
- Install VulkanSDK from the website and it should be in /Users/youruser/VulkanSDK/`` normally if you did not change anything### Steps:
After making the build directory, open it and use the following cmake command (replace the paths from your system)
```bash
mkdir build-x86_64 && cd build-x86_64
cmake -D USE_STATIC_MOLTENVK=ON -D CMAKE_OSX_ARCHITECTURES="x86_64" -D OpenMP_C_FLAGS="-Xclang -fopenmp" -D OpenMP_CXX_FLAGS="-Xclang -fopenmp" -D OpenMP_C_LIB_NAMES="libomp" -D OpenMP_CXX_LIB_NAMES="libomp" -D OpenMP_libomp_LIBRARY="/opt/homebrew/opt/libomp/lib/libomp.a" -D Vulkan_INCLUDE_DIR="./VulkanSDK/*/MoltenVK/include" -D Vulkan_LIBRARY=./VulkanSDK/*/MoltenVK/MoltenVK.xcframework/macos-arm64_x86_64/libMoltenVK.a ../src
cmake --build . -j 8
```For arm processors, the build command will only change to
```bash
mkdir build-arm64 && cd build-arm64
cmake -D USE_STATIC_MOLTENVK=ON -D CMAKE_OSX_ARCHITECTURES="arm64" -D CMAKE_CROSSCOMPILING=ON -D CMAKE_SYSTEM_PROCESSOR=arm64 -D OpenMP_C_FLAGS="-Xclang -fopenmp" -D OpenMP_CXX_FLAGS="-Xclang -fopenmp -I/opt/homebrew/opt/libomp/include" -D OpenMP_C_LIB_NAMES="libomp" -D OpenMP_CXX_LIB_NAMES="libomp" -D OpenMP_libomp_LIBRARY="/opt/homebrew/opt/libomp/lib/libomp.a" -D Vulkan_INCLUDE_DIR="../VulkanSDK/1.3.261.1/MoltenVK/include" -D Vulkan_LIBRARY="../VulkanSDK/1.3.261.1/MoltenVK/MoltenVK.xcframework/macos-arm64_x86_64/libMoltenVK.a" ../src
cmake --build . -j 8
```