chaiNNer-org / chaiNNer

A node-based image processing GUI aimed at making chaining image processing tasks easy and customizable. Born as an AI upscaling application, chaiNNer has grown into an extremely flexible and powerful programmatic image processing application.
https://chaiNNer.app
GNU General Public License v3.0
4.42k stars 275 forks source link

Add Upscale Face / Remove Background nodes in NCNN (for older AMD GPU) #3001

Open Disonantemus opened 1 month ago

Disonantemus commented 1 month ago

Motivation

Description

Alternatives

I don't know of any alternative, maybe:


I'm very happy and grateful with the things that you can do in ChaiNNer (without dependency hell or knowing python).

joeyballentine commented 1 month ago

The face models cannot be converted to NCNN as far as I'm aware. Not sure about the background removal ones though

Disonantemus commented 1 month ago

I found those same models in ONNX format within ChaiNNer, but there is no "Upscale Face" in the ONNX section.

I did found today RestoreFormerPlusPlus in .ckpt that didn't work in ChaiNNer. Later I found an ONNX version, but not a .pth, then because ONNX section doesn't have "Upscale Face", then, I can't test it.

But it doesn't help either, because my GPU doesn't work in ONNX mode, only CPU.

Efenstor commented 4 weeks ago

For face upscale with NCNN there is a half-abandoned project: https://github.com/onuralpszr/GFPGAN-ncnn-vulkan. A couple of years ago I tried it and it worked. It uses a somewhat outdated model GFPGANCleanv1-NoCE-C2. Still it cannot be loaded into chaiNNer as is.

Disonantemus commented 3 days ago

For face upscale with NCNN there is a half-abandoned project: https://github.com/onuralpszr/GFPGAN-ncnn-vulkan. A couple of years ago I tried it and it worked. It uses a somewhat outdated model GFPGANCleanv1-NoCE-C2. Still it cannot be loaded into chaiNNer as is.

I was able to compile it, as it is, has some quirks:

Is better than nothing.


There is a fork, but got worst experience:

- import os,sys,aifc
- l=3
+ import os,sys,errno
+ d=9