From 8b5c1cdfcde4b6da5127d60b11a1242ddc65bbb8 Mon Sep 17 00:00:00 2001 From: nihui Date: Thu, 30 Jul 2020 00:25:28 +0800 Subject: [PATCH] update readme usage, add ubuntu-20.04 ci --- .github/workflows/CI.yml | 34 ++++++++++++++++++++++++++++++++++ README.md | 10 +++++----- 2 files changed, 39 insertions(+), 5 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 248b207..b65d7e0 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -139,6 +139,40 @@ jobs: name: waifu2x-ncnn-vulkan-artifact-ubuntu-18.04 path: waifu2x-ncnn-vulkan-artifact + ubuntu-2004: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v2 + with: + submodules: 'recursive' + - name: cache-vulkansdk + id: cache-vulkansdk + uses: actions/cache@v1 + with: + path: "1.2.135.0" + key: vulkansdk-linux-x86_64-1.2.135.0 + - name: vulkansdk + if: steps.cache-vulkansdk.outputs.cache-hit != 'true' + run: | + wget https://sdk.lunarg.com/sdk/download/1.2.135.0/linux/vulkansdk-linux-x86_64-1.2.135.0.tar.gz?Human=true -O vulkansdk-linux-x86_64-1.2.135.0.tar.gz + tar -xf vulkansdk-linux-x86_64-1.2.135.0.tar.gz + rm -rf 1.2.135.0/source 1.2.135.0/samples + find 1.2.135.0 -type f | grep -v -E 'vulkan|glslang' | xargs rm + - name: configure + run: export VULKAN_SDK=`pwd`/1.2.135.0/x86_64 && mkdir build && cd build && cmake ../src + - name: build + run: cmake --build build -j 2 + - name: deploy + run: | + mkdir waifu2x-ncnn-vulkan-artifact + strip build/waifu2x-ncnn-vulkan + cp -v build/waifu2x-ncnn-vulkan waifu2x-ncnn-vulkan-artifact + cp -v -r models/* waifu2x-ncnn-vulkan-artifact + - uses: actions/upload-artifact@v2 + with: + name: waifu2x-ncnn-vulkan-artifact-ubuntu-20.04 + path: waifu2x-ncnn-vulkan-artifact + macos-1015: runs-on: macos-10.15 steps: diff --git a/README.md b/README.md index 4a14130..ea9f163 100644 --- a/README.md +++ b/README.md @@ -30,15 +30,15 @@ Usage: waifu2x-ncnn-vulkan -i infile -o outfile [options]... -h show this help -v verbose output -i input-path input image path (jpg/png/webp) or directory - -o output-path output image path (png/webp) or directory + -o output-path output image path (jpg/png/webp) or directory -n noise-level denoise level (-1/0/1/2/3, default=0) -s scale upscale ratio (1/2, default=2) - -t tile-size tile size (>=32/0=auto, default=0) + -t tile-size tile size (>=32/0=auto, default=0) can be 0,0,0 for multi-gpu -m model-path waifu2x model path (default=models-cunet) - -g gpu-id gpu device to use (default=0) - -j load:proc:save thread count for load/proc/save (default=1:2:2) + -g gpu-id gpu device to use (default=0) can be 0,1,2 for multi-gpu + -j load:proc:save thread count for load/proc/save (default=1:2:2) can be 1:2,2,2:2 for multi-gpu -x enable tta mode - -f format output image format (png/webp, default=ext/png) + -f format output image format (jpg/png/webp, default=ext/png) ``` - `input-path` and `output-path` accept either file path or directory path