nihui / waifu2x-ncnn-vulkan

waifu2x converter ncnn version, runs fast on intel / amd / nvidia / apple-silicon GPU with vulkan
MIT License
3.01k stars 210 forks source link

Weirdly colored blocky output with nvidia #180

Closed Toasterbirb closed 2 years ago

Toasterbirb commented 2 years ago

I'll let the output image explain the problem

Original lain

Upscaled with waifu2x-ncnn-vulkan -g 0 -i lain.png -o upscaled.png upscaled

I also have an AMD iGPU and that works fine. When using the nvidia gpu though, the output appears blocky and weirdly colored.

GPU in question: NVIDIA GeForce RTX 3060 Driver version: 515.57 CUDA Version: 11.7 Kernel: 5.18.11-gentoo waifu2x-ncnn-vulkan version: 20220419 (latest one from the gentoo repos)

vincent-hugot commented 2 years ago

I have similarly bizarre output on an Arch-based system when using the package waifu2x-ncnn-vulkan 20220728-1, but not when using the executable waifu2x-ncnn-vulkan-20220728-ubuntu downloaded from this git, on the same input file.

Kernel: 5.18.14-arch1-1 arch: x86_64 bits: 64
Distro: EndeavourOS
12-core AMD Ryzen 9 5900X 
NVIDIA GA104 [GeForce RTX 3070 Lite Hash Rate] driver: nvidia v: 515.57

(note: the packaged version works fine, though slowly, with the CPU)

nihui commented 2 years ago

I've confirmed that there is a computational bug on nvidia graphics cards and released a new version of ncnn today that fixes it.

https://github.com/Tencent/ncnn/releases/tag/20220729

Should be resolved when the archlinux package is updated

sorry for the annoyance

Toasterbirb commented 2 years ago

Can confirm that its fixed. Thanks for your efforts :+1: