Giter Site home page Giter Site logo

nihui / realcugan-ncnn-vulkan Goto Github PK

View Code? Open in Web Editor NEW
727.0 10.0 45.0 42.38 MB

real-cugan converter ncnn version, runs fast on intel / amd / nvidia / apple-silicon GPU with vulkan

License: MIT License

CMake 2.49% C++ 31.86% C 65.65%
windows macos linux amd nvidia intel gpu vulkan ncnn realcugan

realcugan-ncnn-vulkan's Introduction

Real-CUGAN ncnn Vulkan

❗ ❗ ❗ This software is in the early development stage, it may bite your cat

CI download

ncnn implementation of Real-CUGAN converter. Runs fast on Intel / AMD / Nvidia / Apple-Silicon with Vulkan API.

realcugan-ncnn-vulkan uses ncnn project as the universal neural network inference framework.

Download Windows/Linux/MacOS Executable for Intel/AMD/Nvidia/Apple-Silicon GPU

https://github.com/nihui/realcugan-ncnn-vulkan/releases

This package includes all the binaries and models required. It is portable, so no CUDA or PyTorch runtime environment is needed :)

About Real-CUGAN

Real-CUGAN (Real Cascade U-Nets for Anime Image Super Resolution)

https://github.com/bilibili/ailab/tree/main/Real-CUGAN

Usages

Example Command

realcugan-ncnn-vulkan.exe -i input.jpg -o output.png

Full Usages

Usage: realcugan-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 (jpg/png/webp) or directory
  -n noise-level       denoise level (-1/0/1/2/3, default=-1)
  -s scale             upscale ratio (1/2/3/4, default=2)
  -t tile-size         tile size (>=32/0=auto, default=0) can be 0,0,0 for multi-gpu
  -c syncgap-mode      sync gap mode (0/1/2/3, default=3)
  -m model-path        realcugan model path (default=models-se)
  -g gpu-id            gpu device to use (-1=cpu, default=auto) 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 (jpg/png/webp, default=ext/png)
  • input-path and output-path accept either file path or directory path
  • noise-level = noise level, large value means strong denoise effect, -1 = no effect
  • scale = scale level, 1 = no scaling, 2 = upscale 2x
  • tile-size = tile size, use smaller value to reduce GPU memory usage, default selects automatically
  • syncgap-mode = sync gap mode, 0 = no sync, 1 = accurate sync, 2 = rough sync, 3 = very rough sync
  • load:proc:save = thread count for the three stages (image decoding + realcugan upscaling + image encoding), using larger values may increase GPU usage and consume more GPU memory. You can tune this configuration with "4:4:4" for many small-size images, and "2:2:2" for large-size images. The default setting usually works fine for most situations. If you find that your GPU is hungry, try increasing thread count to achieve faster processing.
  • format = the format of the image to be output, png is better supported, however webp generally yields smaller file sizes, both are losslessly encoded

If you encounter a crash or error, try upgrading your GPU driver:

Build from Source

  1. Download and setup the Vulkan SDK from https://vulkan.lunarg.com/
  • For Linux distributions, you can either get the essential build requirements from package manager
dnf install vulkan-headers vulkan-loader-devel
apt-get install libvulkan-dev
pacman -S vulkan-headers vulkan-icd-loader
  1. Clone this project with all submodules
git clone https://github.com/nihui/realcugan-ncnn-vulkan.git
cd realcugan-ncnn-vulkan
git submodule update --init --recursive
  1. Build with CMake
  • You can pass -DUSE_STATIC_MOLTENVK=ON option to avoid linking the vulkan loader library on MacOS
mkdir build
cd build
cmake ../src
cmake --build . -j 4

Sample Images

Original Image

origin

Upscale 2x with ImageMagick

convert origin.jpg -resize 200% output.png

browser

Upscale 2x with ImageMagick Lanczo4 Filter

convert origin.jpg -filter Lanczos -resize 200% output.png

browser

Upscale 2x with Real-CUGAN

realcugan-ncnn-vulkan.exe -i origin.jpg -o output.png -s 2 -n 1 -x

realcugan

Original Real-CUGAN Project

Other Open-Source Code Used

realcugan-ncnn-vulkan's People

Contributors

k4yt3x avatar nihui avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

realcugan-ncnn-vulkan's Issues

Is there a way to specify the "alpha" parameter?

Real-GUGAN has introduced a parameter called "alpha" in 20220227.

alpha: 该值越大AI修复程度、痕迹越小,越模糊;alpha越小处理越烈,越锐化,色偏(对比度、饱和度增强)越大;默认为1不调整,推荐调整区间(0.7,1.3);

It is possible to specify this parameter in realcugan-ncnn-vulkan? Is there any plan to support it? Thanks.

tilesize=400的意义是什么?

想请教下以tilesize=400进行分块处理的意义是什么?不了解这个模型,请问下这样分块处理是由于realcugan模型的要求,还是出于ncnn推理超分模型时的性能考虑?

vulkan和cuda速度对比

请问一下,使用ncnn vulkan可以支持AMD卡,但是想问一下如果使用Nvidia显卡,那么ncnn vulkan和cuda的速度相比怎么样呢?ncnn vulkan会不会慢很多?谢谢。

开四倍报错

运行:
realcugan-ncnn-vulkan -i $file -o $file -s 4 -n 1 -x

[0 Apple M1 Max] queueC=0[1] queueG=0[1] queueT=0[1]
[0 Apple M1 Max] bugsbn1=0 bugbilz=188 bugcopc=0 bugihfa=0
[0 Apple M1 Max] fp16-p/s/a=1/1/1 int8-p/s/a=1/1/1
[0 Apple M1 Max] subgroup=32 basic=1 vote=1 ballot=1 shuffle=1
fopen /models-se/up4x-denoise1x.param failed
fopen /models-se/up4x-denoise1x.bin failed

Try
find_blob_index_by_name in0 failed
Try
find_blob_index_by_name gap0 failed
Try
find_blob_index_by_name gap1 failed
Try
find_blob_index_by_name gap2 failed
Try
find_blob_index_by_name gap3 failed
Try

4x doesn't output, either silent exit or error

image

With low thread counts it just simply exits silently without any output result.
With higher thread counts, it reports vkAllocateMemory failed -10.
Checking through AMD driver panel, VRAM was never full - at most 8GB where I have in total 16GB.

Same setting can be run stably under CPU mode, though takes much longer.

my rig:

i7-10700F
6900XT 16GB
32GB RAM

AMD driver has been updated to latest.

色彩出现混乱

我使用
/realcugan-ncnn -i /sdcard/DCIM/early_{2}/{f+1}.png -o /sdcard/DCIM/early_{4}/{f+1}.png -m models-pro -n 3 -s 2
(里面的大括号是Python字符串处理中的东西,不用管)
来进行超分
但在进行到16倍或者是32倍的时候
出现了如下图所示的色彩混乱
Screenshot_20230727_110205_bin mt plus
分辨率在右上角
termux-info如下
`termux-info
Termux Variables:
TERMUX_APP_PACKAGE_MANAGER=apt
TERMUX_APP__AM_SOCKET_SERVER_ENABLED=true
TERMUX_APP__APK_PATH=/data/app/~~ZoeDIZzR4ZKp8TJX8Pk6IA==/com.termux-PhdHZRYbHQYbKtYdPvpoGQ==/base.apk
TERMUX_APP__APK_RELEASE=UNKNOWN
TERMUX_APP__FILES_DIR=/data/user/0/com.termux/files
TERMUX_APP__IS_DEBUGGABLE_BUILD=false
TERMUX_APP__IS_INSTALLED_ON_EXTERNAL_STORAGE=false
TERMUX_APP__PACKAGE_MANAGER=apt
TERMUX_APP__PACKAGE_NAME=com.termux
TERMUX_APP__PACKAGE_VARIANT=apt-android-7
TERMUX_APP__PID=5014
TERMUX_APP__SE_FILE_CONTEXT=u:object_r:app_data_file:s0:c76,c258,c512,c768
TERMUX_APP__SE_INFO=default:targetSdkVersion=28:complete
TERMUX_APP__SE_PROCESS_CONTEXT=u:r:untrusted_app_27:s0:c76,c258,c512,c768
TERMUX_APP__TARGET_SDK=28
TERMUX_APP__UID=10588
TERMUX_APP__USER_ID=0
TERMUX_APP__VERSION_CODE=117
TERMUX_APP__VERSION_NAME=0.118.36.2
TERMUX_MAIN_PACKAGE_FORMAT=debian
TERMUX_VERSION=0.118.36.2
Packages CPU architecture:
aarch64
Subscribed repositories:

sources.list

deb https://mirrors.bfsu.edu.cn/termux/apt/termux-main stable main

sources.list.d/pointless.list

deb https://its-pointless.github.io/files/21 termux extras
Updatable packages:
All packages up to date
termux-tools version:
1.38.3
Android version:
12
Kernel build information:
Linux localhost 5.10.43 #1 SMP PREEMPT Thu Jun 8 18:32:25 CST 2023 aarch64 Android
Device manufacturer:
HUAWEI
Device model:
TAS-AN00
LD Variables:
LD_LIBRARY_PATH=
LD_PRELOAD=/data/data/com.termux/files/usr/lib/libtermux-exec.so`

Missing models

Some models are missing so some denoise and scale combination are unusable, will those models be uploaded later?
@nihui

出现 vulkan-1.dll 找不到

正常情况不会出现,nv 和 amd 驱动一般都是自带 vulkan 运行时的,我出现的情况是之前用的 n 卡,换了 a 卡装了新驱动,到这里都没有问题,我看到 n 卡驱动没用了就卸载了,然后就出现了 vulkan 运行时找不到。

可以找任意 electron 的 x64 的软件下的 vulkan-1.dll 拷贝过来(例如 vscode)。

或者是手动下载 vulkan-runtime,安装或者下载 zip 提取 vulkan-1.dll。

Easy Drag and Drop Acceptable Batchfile for Windows

This isn't issue for technically but I don't know where to make so I made here...
Enlarges to x2(default) and uses model models-pro, and add "x2" to the end of file name

@echo off
cd "%~dp0"
realcugan-ncnn-vulkan -i "%~1" -m models-pro -o "%~n1x2.png"
pause

这是怎么勒

root@DA151:/home/j/realcugan-ncnn-vulkan/build# ./realcugan-ncnn-vulkan -i /home/a.jpg -o b.png
[0 llvmpipe (LLVM 12.0.0, 128 bits)] queueC=0[1] queueG=0[1] queueT=0[1]
[0 llvmpipe (LLVM 12.0.0, 128 bits)] bugsbn1=0 bugbilz=0 bugcopc=0 bugihfa=0
[0 llvmpipe (LLVM 12.0.0, 128 bits)] fp16-p/s/a=1/1/0 int8-p/s/a=1/1/0
[0 llvmpipe (LLVM 12.0.0, 128 bits)] subgroup=4 basic=1 vote=1 ballot=1 shuffle=0
WARNING: lavapipe is not a conformant vulkan implementation, testing use only.
fopen /home/j/realcugan-ncnn-vulkan/build/models-se/up2x-conservative.param failed
fopen /home/j/realcugan-ncnn-vulkan/build/models-se/up2x-conservative.bin failed
find_blob_index_by_name in0 failed
Try
find_blob_index_by_name gap0 failed
Try
find_blob_index_by_name gap1 failed
Try
find_blob_index_by_name gap2 failed
Try
find_blob_index_by_name gap3 failed
Try
Invalid bitcast
%347 = bitcast i32 %346 to i16
LLVM ERROR: Broken function
Aborted

bug in 20220728

Windows, nvidia 3060Ti

test image https://github.com/nihui/realcugan-ncnn-vulkan/blob/master/images/0.jpg

[0 NVIDIA GeForce RTX 3060 Ti]  queueC=2[8]  queueG=0[16]  queueT=1[2]
[0 NVIDIA GeForce RTX 3060 Ti]  bugsbn1=0  bugbilz=0  bugcopc=0  bugihfa=0
[0 NVIDIA GeForce RTX 3060 Ti]  fp16-p/s/a=1/1/1  int8-p/s/a=1/1/1
[0 NVIDIA GeForce RTX 3060 Ti]  subgroup=32  basic=1  vote=1  ballot=1  shuffle=1
[1 Intel(R) UHD Graphics 630]  queueC=0[1]  queueG=0[1]  queueT=0[1]
[1 Intel(R) UHD Graphics 630]  bugsbn1=0  bugbilz=0  bugcopc=0  bugihfa=0
[1 Intel(R) UHD Graphics 630]  fp16-p/s/a=1/1/1  int8-p/s/a=1/1/1
[1 Intel(R) UHD Graphics 630]  subgroup=32  basic=1  vote=1  ballot=1  shuffle=1

-m models-se -s 2 -f jpg
0 se

-m models-pro -s 2 -f jpg
0 pro


works well for cpu and Intel(R) UHD Graphics 630

Your Results in New Super-Resolution Benchmarks

Hello,

MSU Graphics & Media Lab Video Group has recently launched two new Super-Resolution Benchmarks.

Your method achieved 10th place in Video Upscalers Benchmark: Quality Enhancement in 'Animation 4x' category. We look forward to your future work!

We would be grateful for your feedback on our work.

4x Upscaling fails on Windows 11

_wfopen H:\Tools\realcugan-ncnn-vulkan-20220318-windows\models-se/up4x-denoise1x.param failed
Is what I get when trying to run 4x upscale against a folder of pngs.
Same folder works in 2x upscale, 3x fails same as 4x.

Command line: For /D %%G in (*) DO H:\Tools\realcugan-ncnn-vulkan-20220318-windows\realcugan-ncnn-vulkan.exe -i %CD%%%~nxG -o A:\Waifu\RealCUGAN%%G\ -s 4 -n 1

System:
i5 8600k
16GB DDR4
RTX 2070

Run Error on Ubuntu 20.04

Ubuntu Version: Ubuntu 20.04 LTS x86_64
Kernel Version: Linux VM-0-11-ubuntu 5.4.0-121-generic #137-Ubuntu SMP Wed Jun 15 13:33:07 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
CPU Info: Intel(R) Xeon(R) Platinum 8255C CPU @ 2.50GHz
Graphic Card Info: NVIDIA Tesla T4
Graphic Card Driver Version: 515.65.01
RealCUGAN Version: 20220728

ubuntu@VM-0-11-ubuntu:~/chokora$ nvidia-smi
Tue Aug 30 01:46:36 2022       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 515.65.01    Driver Version: 515.65.01    CUDA Version: 11.7     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  Tesla T4            On   | 00000000:00:08.0 Off |                  Off |
| N/A   31C    P8    14W /  70W |      7MiB / 16384MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A      1529      G   /usr/lib/xorg/Xorg                  4MiB |
+-----------------------------------------------------------------------------+
ubuntu@VM-0-11-ubuntu:~/chokora$ file /tmp/56b65b554b2631564dea13b00]
/tmp/56b65b554b2631564dea13b00: PNG image data, 1580 x 1020, 8-bit/color RGBA, non-interlaced

ubuntu@VM-0-11-ubuntu:~/chokora$ ./bin/realcugan-ncnn-vulkan -i /tmp/56b65b554b2631564dea13b00 -o /tmp/r.png -s 2

vkEnumeratePhysicalDevices failed -3
double free or corruption (out)
Aborted (core dumped)

有死循环?

image unkind\illust_96146558_20220214_121642.png has alpha channel ! unkind\illust_96146558_20220214_121642.png will output unkind\illust_96146558_20220214_121642.png0RCG1.5.jpg.png
gap sync gap0
gap sync gap1
gap sync gap2
gap sync gap3

当出现 alpha channel 时,卡在这个进度。然后输出文件尺寸持续变大

3倍放大下输出的图片不正常

其它放大倍率正常,只有3倍下会输出异常图片:
ev201c
ev101a
参数:
image
报错:
vkAllocateMemory failed -2
vkWaitForFences failed -4
vkWaitForFences failed -4
vkQueueSubmit failed -4
vkQueueSubmit failed -4
vkQueueSubmit failed -4
vkQueueSubmit failed -4

suggestion: configuration parameter for VRAM usage

I am using the latest release on Windows. I can use 2x and 3x without issue, but 4x always fail.

When I set tile-size to <= 65, error message vkAllocateMemory failed -10 shows up; when I set it above that or left the parameter out, the program starts up but then ends without any output result or warning message. It simply shows

image

and then just quits.

I am using a 6900XT with 16GB VRAM.

One thing I've observed from AMD panel while running the program is that it only goes up to ~4GB VRAM consumed before it quitted/showing error. Is there some way for the user to configure that the session should use more VRAM? RAM doesn't get consumed fully too.

GPU usage goes up to 100% before it quits abruptly so I think the process was started but somehow quitted without log. I also tried -j 1:1:1 but didn't help.

ERROR: Could not build wheels for realcugan-ncnn-vulkan-python, which is required to install pyproject.toml-based projects

Hi there,

I'm trying to install module realcugan-ncnn-vulkan-python on my macbook, but getting an error:

aise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '-S', '/private/var/folders/p9/mx7w4h2149vdglfr2c0ddmpm0000gn/T/pip-install-p6r_9mxi/realcugan-ncnn-vulkan-python_71a0be6d527745c59fa316681cfad201/realcugan_ncnn_vulkan_python', '-B', '/private/var/folders/p9/mx7w4h2149vdglfr2c0ddmpm0000gn/T/pip-install-p6r_9mxi/realcugan-ncnn-vulkan-python_71a0be6d527745c59fa316681cfad201/build/temp.macosx-10.9-x86_64-cpython-39_realcugan-ncnn-vulkan-python', '-GNinja', '-DCMAKE_BUILD_TYPE=Release', '-DCMAKE_INSTALL_PREFIX:PATH=/private/var/folders/p9/mx7w4h2149vdglfr2c0ddmpm0000gn/T/pip-install-p6r_9mxi/realcugan-ncnn-vulkan-python_71a0be6d527745c59fa316681cfad201/build/lib.macosx-10.9-x86_64-cpython-39/realcugan_ncnn_vulkan_python', '-DCMAKE_MAKE_PROGRAM=/private/var/folders/p9/mx7w4h2149vdglfr2c0ddmpm0000gn/T/pip-build-env-vfonxjmm/overlay/bin/ninja', '-DBUILD_SHARED_LIBS:BOOL=OFF', '-DCALL_FROM_SETUP_PY:BOOL=ON']' returned non-zero exit status 1.
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for realcugan-ncnn-vulkan-python
Failed to build realcugan-ncnn-vulkan-python
ERROR: Could not build wheels for realcugan-ncnn-vulkan-python, which is required to install pyproject.toml-based projects

Do you know what's wrong?

Br

使用後幾個問題

你好 首先非常感谢提供ncnn版本

想请教关于syncgap-mode的用途是什么
当放大解析度较大的图片时,syncgap-mode使用default会出现如下的错误,除此之外皆可正常使用,这是否是显存不足的问题
image

第二个问题是,使用no-sync会出现以下的长方形边界,是否不该提供no-sync的方式
图源1
图源2
image
image

第三个是使用cugan后会有色偏的问题
图源
原图
image
使用CUGAN后
image

图源
原图
image
使用CUGAN后
image

ninja: error: ... Filename longer than 260 characters when installing

I have run into so many build issues trying to install this and now I'm up against this error. At my wit's end.

`python -m pip install rife-ncnn-vulkan-python
Collecting rife-ncnn-vulkan-python
Using cached rife-ncnn-vulkan-python-1.1.3.tar.gz (21.9 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: pillow in c:\python\python39\lib\site-packages (from rife-ncnn-vulkan-python) (9.2.0)
Building wheels for collected packages: rife-ncnn-vulkan-python
Building wheel for rife-ncnn-vulkan-python (pyproject.toml) ... error
error: subprocess-exited-with-error

× Building wheel for rife-ncnn-vulkan-python (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [276 lines of output]
C:\Users\Aaron\AppData\Local\Temp\pip-build-env-4_4jfuv0\overlay\Lib\site-packages\setuptools\config\setupcfg.py:508: SetuptoolsDeprecationWarning: The license_file parameter is deprecated, use license_files instead.
warnings.warn(msg, warning_class)
Downloading: https://github.com/nihui/rife-ncnn-vulkan/archive/c806e66490679aebc1b4a6832985e004fd552f46.zip
Total size: 420066225
Chunk size: 4096
Saving to: C:\Users\Aaron\AppData\Local\Temp\tmpfv2u3w2e
running bdist_wheel
running build
running build_ext
-- The C compiler identification is MSVC 19.27.29111.0
-- The CXX compiler identification is MSVC 19.27.29111.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.27.29110/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
CMake Warning in C:/Users/Aaron/AppData/Local/Temp/pip-install-a1my1s33/rife-ncnn-vulkan-python_8861ce3bafba40479c5ef3bdc5d5ee30/build/temp.win-amd64-cpython-39/Release_rife-ncnn-vulkan-python/CMakeFiles/CMakeTmp/CMakeLists.txt:
The object file directory

      C:/Users/Aaron/AppData/Local/Temp/pip-install-a1my1s33/rife-ncnn-vulkan-python_8861ce3bafba40479c5ef3bdc5d5ee30/build/temp.win-amd64-cpython-39/Release_rife-ncnn-vulkan-python/CMakeFiles/CMakeTmp/CMakeFiles/cmTC_937d6.dir/./

    has 224 characters.  The maximum full path to an object file is 250
    characters (see CMAKE_OBJECT_PATH_MAX).  Object file

      CMakeCXXCompilerABI.cpp.obj

    cannot be safely placed under this directory.  The build may not work
    correctly.


  -- Detecting CXX compiler ABI info - done
  -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.27.29110/bin/Hostx64/x64/cl.exe - skipped
  -- Detecting CXX compile features
  -- Detecting CXX compile features - done
  -- Performing Test CMAKE_HAVE_LIBC_PTHREAD
  -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
  -- Looking for pthread_create in pthreads
  -- Looking for pthread_create in pthreads - not found
  -- Looking for pthread_create in pthread
  -- Looking for pthread_create in pthread - not found
  -- Found Threads: TRUE
  -- Found OpenMP_C: -openmp (found version "2.0")
  -- Found OpenMP_CXX: -openmp (found version "2.0")
  -- Found OpenMP: TRUE (found version "2.0")
  -- Found Vulkan: C:/VulkanSDK/1.3.224.1/Lib/vulkan-1.lib (found version "1.3.224") found components: glslc glslangValidator
  -- Found Python: C:/Python/Python39/libs/python39.lib (found version "3.9.2") found components: Development Development.Module Development.Embed
  -- Found SWIG: C:/swigwin-4.0.2/swig.exe (found version "4.0.2") found components: python
  SWIG found: C:/swigwin-4.0.2/swig.exe
  -- CMAKE_INSTALL_PREFIX = C:/Users/Aaron/AppData/Local/Temp/pip-install-a1my1s33/rife-ncnn-vulkan-python_8861ce3bafba40479c5ef3bdc5d5ee30/build/lib.win-amd64-cpython-39/rife_ncnn_vulkan_python
  -- NCNN_VERSION_STRING = 1.0.20220922
  -- Performing Test NCNN_COMPILER_SUPPORT_X86_AVX
  -- Performing Test NCNN_COMPILER_SUPPORT_X86_AVX - Success
  -- Performing Test NCNN_COMPILER_SUPPORT_X86_FMA
  -- Performing Test NCNN_COMPILER_SUPPORT_X86_FMA - Success
  -- Performing Test NCNN_COMPILER_SUPPORT_X86_XOP
  -- Performing Test NCNN_COMPILER_SUPPORT_X86_XOP - Success
  -- Performing Test NCNN_COMPILER_SUPPORT_X86_F16C
  -- Performing Test NCNN_COMPILER_SUPPORT_X86_F16C - Success
  -- Performing Test NCNN_COMPILER_SUPPORT_X86_AVX2
  -- Performing Test NCNN_COMPILER_SUPPORT_X86_AVX2 - Success
  -- Performing Test NCNN_COMPILER_SUPPORT_X86_AVX_VNNI
  -- Performing Test NCNN_COMPILER_SUPPORT_X86_AVX_VNNI - Success
  -- Performing Test NCNN_COMPILER_SUPPORT_X86_AVX512
  -- Performing Test NCNN_COMPILER_SUPPORT_X86_AVX512 - Success
  -- Performing Test NCNN_COMPILER_SUPPORT_X86_AVX512_VNNI
  -- Performing Test NCNN_COMPILER_SUPPORT_X86_AVX512_VNNI - Success
  CMake Warning at rife-ncnn-vulkan/src/ncnn/CMakeLists.txt:428 (message):
    The compiler does not support avx512 bf16 extension.  NCNN_AVX512BF16 will
    be OFF.


  CMake Warning at rife-ncnn-vulkan/src/ncnn/CMakeLists.txt:435 (message):
    The compiler does not support avx512 fp16 extension.  NCNN_AVX512FP16 will
    be OFF.


  -- Target arch: x86
  -- Performing Test COMPILER_HAS_DEPRECATED_ATTR
  -- Performing Test COMPILER_HAS_DEPRECATED_ATTR - Failed
  -- Performing Test COMPILER_HAS_DEPRECATED
  -- Performing Test COMPILER_HAS_DEPRECATED - Success
  CMake Warning (dev) at C:/Users/Aaron/AppData/Local/Temp/pip-build-env-4_4jfuv0/overlay/Lib/site-packages/cmake/data/share/cmake-3.24/Modules/UseSWIG.cmake:775 (message):
    Policy CMP0078 is not set: UseSWIG generates standard target names.  Run
    "cmake --help-policy CMP0078" for policy details.  Use the cmake_policy
    command to set the policy and suppress this warning.

  Call Stack (most recent call first):
    CMakeLists.txt:302 (swig_add_library)
  This warning is for project developers.  Use -Wno-dev to suppress it.

  CMake Warning (dev) at C:/Users/Aaron/AppData/Local/Temp/pip-build-env-4_4jfuv0/overlay/Lib/site-packages/cmake/data/share/cmake-3.24/Modules/UseSWIG.cmake:617 (message):
    Policy CMP0086 is not set: UseSWIG honors SWIG_MODULE_NAME via -module
    flag.  Run "cmake --help-policy CMP0086" for policy details.  Use the
    cmake_policy command to set the policy and suppress this warning.

  Call Stack (most recent call first):
    C:/Users/Aaron/AppData/Local/Temp/pip-build-env-4_4jfuv0/overlay/Lib/site-packages/cmake/data/share/cmake-3.24/Modules/UseSWIG.cmake:888 (SWIG_ADD_SOURCE_TO_MODULE)
    CMakeLists.txt:302 (swig_add_library)
  This warning is for project developers.  Use -Wno-dev to suppress it.

  -- Configuring done
  CMake Warning in CMakeLists.txt:
    The object file directory

      C:/Users/Aaron/AppData/Local/Temp/pip-install-a1my1s33/rife-ncnn-vulkan-python_8861ce3bafba40479c5ef3bdc5d5ee30/build/temp.win-amd64-cpython-39/Release_rife-ncnn-vulkan-python/CMakeFiles/rife_ncnn_vulkan_wrapper.dir/./

    has 218 characters.  The maximum full path to an object file is 250
    characters (see CMAKE_OBJECT_PATH_MAX).  Object file

      rife-ncnn-vulkan/src/warp.cpp.obj

    cannot be safely placed under this directory.  The build may not work
    correctly.


  CMake Warning in rife-ncnn-vulkan/src/ncnn/glslang/glslang/CMakeLists.txt:
    The object file directory

      C:/Users/Aaron/AppData/Local/Temp/pip-install-a1my1s33/rife-ncnn-vulkan-python_8861ce3bafba40479c5ef3bdc5d5ee30/build/temp.win-amd64-cpython-39/Release_rife-ncnn-vulkan-python/rife-ncnn-vulkan/src/ncnn/glslang/glslang/CMakeFiles/GenericCodeGen.dir/./

    has 250 characters.  The maximum full path to an object file is 250
    characters (see CMAKE_OBJECT_PATH_MAX).  Object file

      GenericCodeGen/CodeGen.cpp.obj

    cannot be safely placed under this directory.  The build may not work
    correctly.


  CMake Warning in rife-ncnn-vulkan/src/ncnn/glslang/glslang/CMakeLists.txt:
    The object file directory

      C:/Users/Aaron/AppData/Local/Temp/pip-install-a1my1s33/rife-ncnn-vulkan-python_8861ce3bafba40479c5ef3bdc5d5ee30/build/temp.win-amd64-cpython-39/Release_rife-ncnn-vulkan-python/rife-ncnn-vulkan/src/ncnn/glslang/glslang/CMakeFiles/MachineIndependent.dir/./

    has 254 characters.  The maximum full path to an object file is 250
    characters (see CMAKE_OBJECT_PATH_MAX).  Object file

      MachineIndependent/preprocessor/PpContext.cpp.obj

    cannot be safely placed under this directory.  The build may not work
    correctly.


  CMake Warning in rife-ncnn-vulkan/src/ncnn/glslang/glslang/CMakeLists.txt:
    The object file directory

      C:/Users/Aaron/AppData/Local/Temp/pip-install-a1my1s33/rife-ncnn-vulkan-python_8861ce3bafba40479c5ef3bdc5d5ee30/build/temp.win-amd64-cpython-39/Release_rife-ncnn-vulkan-python/rife-ncnn-vulkan/src/ncnn/glslang/glslang/CMakeFiles/glslang.dir/./

    has 243 characters.  The maximum full path to an object file is 250
    characters (see CMAKE_OBJECT_PATH_MAX).  Object file

      CInterface/glslang_c_interface.cpp.obj

    cannot be safely placed under this directory.  The build may not work
    correctly.


  CMake Warning in rife-ncnn-vulkan/src/ncnn/glslang/glslang/OSDependent/Windows/CMakeLists.txt:
    The object file directory

      C:/Users/Aaron/AppData/Local/Temp/pip-install-a1my1s33/rife-ncnn-vulkan-python_8861ce3bafba40479c5ef3bdc5d5ee30/build/temp.win-amd64-cpython-39/Release_rife-ncnn-vulkan-python/rife-ncnn-vulkan/src/ncnn/glslang/glslang/OSDependent/Windows/CMakeFiles/OSDependent.dir/./

    has 267 characters.  The maximum full path to an object file is 250
    characters (see CMAKE_OBJECT_PATH_MAX).  Object file

      ossource.cpp.obj

    cannot be safely placed under this directory.  The build may not work
    correctly.


  CMake Warning in rife-ncnn-vulkan/src/ncnn/glslang/OGLCompilersDLL/CMakeLists.txt:
    The object file directory

      C:/Users/Aaron/AppData/Local/Temp/pip-install-a1my1s33/rife-ncnn-vulkan-python_8861ce3bafba40479c5ef3bdc5d5ee30/build/temp.win-amd64-cpython-39/Release_rife-ncnn-vulkan-python/rife-ncnn-vulkan/src/ncnn/glslang/OGLCompilersDLL/CMakeFiles/OGLCompiler.dir/./

    has 255 characters.  The maximum full path to an object file is 250
    characters (see CMAKE_OBJECT_PATH_MAX).  Object file

      InitializeDll.cpp.obj

    cannot be safely placed under this directory.  The build may not work
    correctly.


  CMake Warning in rife-ncnn-vulkan/src/ncnn/glslang/SPIRV/CMakeLists.txt:
    The object file directory

      C:/Users/Aaron/AppData/Local/Temp/pip-install-a1my1s33/rife-ncnn-vulkan-python_8861ce3bafba40479c5ef3bdc5d5ee30/build/temp.win-amd64-cpython-39/Release_rife-ncnn-vulkan-python/rife-ncnn-vulkan/src/ncnn/glslang/SPIRV/CMakeFiles/SPIRV.dir/./

    has 239 characters.  The maximum full path to an object file is 250
    characters (see CMAKE_OBJECT_PATH_MAX).  Object file

      SpvBuilder.cpp.obj

    cannot be safely placed under this directory.  The build may not work
    correctly.


  CMake Warning in rife-ncnn-vulkan/src/ncnn/src/CMakeLists.txt:
    The object file directory

      C:/Users/Aaron/AppData/Local/Temp/pip-install-a1my1s33/rife-ncnn-vulkan-python_8861ce3bafba40479c5ef3bdc5d5ee30/build/temp.win-amd64-cpython-39/Release_rife-ncnn-vulkan-python/rife-ncnn-vulkan/src/ncnn/src/CMakeFiles/ncnn.dir/./

    has 228 characters.  The maximum full path to an object file is 250
    characters (see CMAKE_OBJECT_PATH_MAX).  Object file

      layer/x86/deconvolution_x86_fma.cpp.obj

    cannot be safely placed under this directory.  The build may not work
    correctly.


  -- Generating done
  -- Build files have been written to: C:/Users/Aaron/AppData/Local/Temp/pip-install-a1my1s33/rife-ncnn-vulkan-python_8861ce3bafba40479c5ef3bdc5d5ee30/build/temp.win-amd64-cpython-39/Release_rife-ncnn-vulkan-python
  **_ninja: error: Stat(C:/Users/Aaron/AppData/Local/Temp/pip-install-a1my1s33/rife-ncnn-vulkan-python_8861ce3bafba40479c5ef3bdc5d5ee30/build/temp.win-amd64-cpython-39/Release_rife-ncnn-vulkan-python/rife-ncnn-vulkan/src/ncnn/src/convolution_3x3s1d1_winograd23_transform_input.comp.hex.h): Filename longer than 260 characters_**

  ==> Configuring:
  $ cmake -S C:\Users\Aaron\AppData\Local\Temp\pip-install-a1my1s33\rife-ncnn-vulkan-python_8861ce3bafba40479c5ef3bdc5d5ee30\rife_ncnn_vulkan_python -B C:\Users\Aaron\AppData\Local\Temp\pip-install-a1my1s33\rife-ncnn-vulkan-python_8861ce3bafba40479c5ef3bdc5d5ee30\build\temp.win-amd64-cpython-39\Release_rife-ncnn-vulkan-python -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=C:\Users\Aaron\AppData\Local\Temp\pip-install-a1my1s33\rife-ncnn-vulkan-python_8861ce3bafba40479c5ef3bdc5d5ee30\build\lib.win-amd64-cpython-39\rife_ncnn_vulkan_python -DCMAKE_MAKE_PROGRAM=C:\Users\Aaron\AppData\Local\Temp\pip-build-env-4_4jfuv0\overlay\Scripts\ninja.EXE -DBUILD_SHARED_LIBS:BOOL=OFF -DCALL_FROM_SETUP_PY:BOOL=ON

  ==> Building:
  $ cmake --build C:\Users\Aaron\AppData\Local\Temp\pip-install-a1my1s33\rife-ncnn-vulkan-python_8861ce3bafba40479c5ef3bdc5d5ee30\build\temp.win-amd64-cpython-39\Release_rife-ncnn-vulkan-python --config Release

  ==> Installing:
  $ cmake --install C:\Users\Aaron\AppData\Local\Temp\pip-install-a1my1s33\rife-ncnn-vulkan-python_8861ce3bafba40479c5ef3bdc5d5ee30\build\temp.win-amd64-cpython-39\Release_rife-ncnn-vulkan-python

  Traceback (most recent call last):
    File "C:\Python\Python39\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 363, in <module>
      main()
    File "C:\Python\Python39\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 345, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "C:\Python\Python39\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 261, in build_wheel
      return _build_backend().build_wheel(wheel_directory, config_settings,
    File "C:\Users\Aaron\AppData\Local\Temp\pip-build-env-4_4jfuv0\overlay\Lib\site-packages\setuptools\build_meta.py", line 412, in build_wheel
      return self._build_with_temp_dir(['bdist_wheel'], '.whl',
    File "C:\Users\Aaron\AppData\Local\Temp\pip-build-env-4_4jfuv0\overlay\Lib\site-packages\setuptools\build_meta.py", line 397, in _build_with_temp_dir
      self.run_setup()
    File "C:\Users\Aaron\AppData\Local\Temp\pip-build-env-4_4jfuv0\overlay\Lib\site-packages\setuptools\build_meta.py", line 335, in run_setup
      exec(code, locals())
    File "<string>", line 98, in <module>
    File "C:\Users\Aaron\AppData\Local\Temp\pip-build-env-4_4jfuv0\overlay\Lib\site-packages\setuptools\__init__.py", line 87, in setup
      return distutils.core.setup(**attrs)
    File "C:\Users\Aaron\AppData\Local\Temp\pip-build-env-4_4jfuv0\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 185, in setup
      return run_commands(dist)
    File "C:\Users\Aaron\AppData\Local\Temp\pip-build-env-4_4jfuv0\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 201, in run_commands
      dist.run_commands()
    File "C:\Users\Aaron\AppData\Local\Temp\pip-build-env-4_4jfuv0\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 973, in run_commands
      self.run_command(cmd)
    File "C:\Users\Aaron\AppData\Local\Temp\pip-build-env-4_4jfuv0\overlay\Lib\site-packages\setuptools\dist.py", line 1217, in run_command
      super().run_command(command)
    File "C:\Users\Aaron\AppData\Local\Temp\pip-build-env-4_4jfuv0\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 992, in run_command
      cmd_obj.run()
    File "C:\Users\Aaron\AppData\Local\Temp\pip-build-env-4_4jfuv0\overlay\Lib\site-packages\wheel\bdist_wheel.py", line 299, in run
      self.run_command('build')
    File "C:\Users\Aaron\AppData\Local\Temp\pip-build-env-4_4jfuv0\overlay\Lib\site-packages\setuptools\_distutils\cmd.py", line 319, in run_command
      self.distribution.run_command(command)
    File "C:\Users\Aaron\AppData\Local\Temp\pip-build-env-4_4jfuv0\overlay\Lib\site-packages\setuptools\dist.py", line 1217, in run_command
      super().run_command(command)
    File "C:\Users\Aaron\AppData\Local\Temp\pip-build-env-4_4jfuv0\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 992, in run_command
      cmd_obj.run()
    File "C:\Users\Aaron\AppData\Local\Temp\pip-build-env-4_4jfuv0\overlay\Lib\site-packages\setuptools\_distutils\command\build.py", line 132, in run
      self.run_command(cmd_name)
    File "C:\Users\Aaron\AppData\Local\Temp\pip-build-env-4_4jfuv0\overlay\Lib\site-packages\setuptools\_distutils\cmd.py", line 319, in run_command
      self.distribution.run_command(command)
    File "C:\Users\Aaron\AppData\Local\Temp\pip-build-env-4_4jfuv0\overlay\Lib\site-packages\setuptools\dist.py", line 1217, in run_command
      super().run_command(command)
    File "C:\Users\Aaron\AppData\Local\Temp\pip-build-env-4_4jfuv0\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 992, in run_command
      cmd_obj.run()
    File "C:\Users\Aaron\AppData\Local\Temp\pip-build-env-4_4jfuv0\overlay\Lib\site-packages\cmake_build_extension\build_extension.py", line 113, in run
      self.build_extension(ext)
    File "C:\Users\Aaron\AppData\Local\Temp\pip-build-env-4_4jfuv0\overlay\Lib\site-packages\cmake_build_extension\build_extension.py", line 230, in build_extension
      subprocess.check_call(build_command)
    File "C:\Python\Python39\lib\subprocess.py", line 373, in check_call
      raise CalledProcessError(retcode, cmd)
  subprocess.CalledProcessError: Command '['cmake', '--build', 'C:\\Users\\Aaron\\AppData\\Local\\Temp\\pip-install-a1my1s33\\rife-ncnn-vulkan-python_8861ce3bafba40479c5ef3bdc5d5ee30\\build\\temp.win-amd64-cpython-39\\Release_rife-ncnn-vulkan-python', '--config', 'Release']' returned non-zero exit status 1.
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for rife-ncnn-vulkan-python
Failed to build rife-ncnn-vulkan-python
ERROR: Could not build wheels for rife-ncnn-vulkan-python, which is required to install pyproject.toml-based projects`

palette png图片的图像透明数据块tRNS不能被正确处理的问题

大佬,我又发现一个问题,就是palette png图片的图像透明数据块tRNS放大后透明信息丢失,变成黑色,而且边缘锯齿明显,导致在游戏内不能正常显示,如下图(这个问题在waifu2x-ncnn和real-esrgnn-ncnn中也有出现,亲测将带有tRNS块的palette png图片预处理为RGBA再放大能够解决这个问题):
Snipaste_2022-03-26_16-32-24
Snipaste_2022-03-26_16-33-05
Snipaste_2022-03-26_16-30-15
Snipaste_2022-03-26_16-31-20

Security Address

Hello!

I may have found a security issue in latest version of realcugan-ncnn-vulkan . Following responsible disclosure, is there an email or other private channel where I could share the details?
Thank you

编译报错

realcugan-ncnn-vulkan/src/ncnn/src/gpu.cpp:3006:47: error: ‘PFN_vkDestroySamplerYcbcrConversionKHR’ was not declared in this scope
vkDestroySamplerYcbcrConversionKHR = (PFN_vkDestroySamplerYcbcrConversionKHR)vkGetDeviceProcAddr(d->device, "vkDestroySamplerYcbcrConversionKHR");
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ncnn/src/CMakeFiles/ncnn.dir/build.make:509: recipe for target 'ncnn/src/CMakeFiles/ncnn.dir/gpu.cpp.o' failed

ncnn:git上最新版本
cmake:3.22

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.