Before we begin, you might notice chaiNNer has a new home! This repository now lives in an organization (chaiNNer-org) rather than my personal GitHub account. This means that the URL to the repository is now https://github.com/chaiNNer-org/chaiNNer. The old one should still redirect here though, but you should update any links you have (in descriptions, tutorials, etc) just in case.
This update brings a long-awaited addition: GFPGAN support! Luckily, we were able to add this without much hassle. However, it does not support the first v1 GFPGAN model (but it does support v1.2+). This is because GFPGAN v1 requires compiled CUDA extensions, which is not simple to support at this time. The good news is, the later models are much better anyway, so you are better off using those to begin with. GFPGAN support does require installing a new dependency package from the dependency manager, facexlib (as part of the PyTorch package collection), so make sure you do that!
To use GFPGAN with chaiNNer, there is now a new node: Face Upscale. You pass the loaded model into this node, and can optionally pass in an upscaled version of the background as well. This allows you to fully customize the background upscale, unlike the official GFPGAN code which only allows you to upscale with RealESRGAN at a fixed scale.
Speaking of scale, I did add an additional scale option for the GFPGAN output. While GFPGAN internally always does an 8x upscale, the official code as well as existing GUIs have included an output scale option (which just downscales the result). To ease confusion from people expecting this, I just decided to implement this as well. Unlike these other implementations though, the scale can be any number between 1 and 8, instead of just powers of 2. The important thing to keep in mind here is that adjusting the scale DOES NOT make it actually process with lower VRAM or anything like that.
Another important note: The first time you use GFPGAN, facexlib will automatically download some necessary models to /chaiNNer/python/gfpgan. This only happens for the first use, and depending on your internet speed might take a while. Just let it download and once finished everything should work fine.
For everything else about this release, see this full changelog:
New Features
- GFPGAN (Face Upscaling/Restoration) support (#999) (#1018)
- GFPGAN (as well as RestoreFormer) have been added to chaiNNer. Once loaded just like regular models, these models can be used with the Face Upscale node.
- Dependency Manager improvements (#990)
- The dependency manager now shows exactly which packages are installed, missing, and out of date.
- Each dependency now has a description associated with it.
- TGA saving support (#1033) (thanks (redacted))
New Nodes
- Pass Through Node (#968)
- This node simply passes the input value through to the output.
- This is useful if you want to have one output connection go to multiple inputs, but also want to be able to easily swap what node gives that input.
- Create Edges Node (#1009)
- Like a cross between Create Border and Crop (Edges), this node creates a border around the image, but using adjustable numbers for each side.
- Face Upscale (#999)
- Used for processing with GFPGAN and RestoreFormer.
Other Changes
- Removed Discord Rich-Presence (#1038)
- This will eventually be added back, but for now it has been removed. It has come to our attention that it sometimes causes chaiNNer to not start up, and when it does work it leaks the name of chain files. While we work on resolving these issues, the feature has been temporarily removed.
- Blend Image optimizations (#989)
- Should see significantly better performance with this node, under certain circumstances.
- Added timer support for iterators (#1021)
- Various crop node improvements (#1013)
- Changed input name for converted ONNX models to allow them to be compatible with VSGAN-tensorrt-docker (#1006)
- Rename "relative path" to "subdirectory path" to make its use-case more obvious (#1022)
Bug Fixes:
- Drastically fixed NCNN performance in iterators by only loading model once (#1023)
- Fixed FPS values for videos (via the Video Frame Iterator) getting rounded in the output (#987)
- Fixed Fill Alpha node (#992)
- Fixed Canny Edge Detection node (#1010)
- Fixed image iterator sorting (#1004)
- Fixed output type of Text Pattern node (#1012)
- Fixed output type of Crop (Border) node (#1013)
- Fixed Linux bug due to missing qt environment variable (#1016)
- Fixed pixelunshuffle ESRGAN models (RealESRGANx2 mainly) erroring due to uneven image sizes (#1017)
- Show correct install size when only some packages are installed in the dependency manager (#1030)
Thanks to @RunDevelopment and @theflyingzamboni for their various contributions as always.