Yep.
Fix gfpgan_model_arch requirement(s).
Add Upscaler base class, move from images.
Add a lot of methods to Upscaler.
Re-work all the child upscalers to be proper classes.
Add BSRGAN scaler.
Add ldsr_model_arch class, removing the dependency for another repo that just uses regular latent-diffusion stuff.
Add one universal method that will always find and load new upscaler models without having to add new "setup_model" calls. Still need to add command line params, but that could probably be automated.
Add a "self.scale" property to all Upscalers so the scalers themselves can do "things" in response to the requested upscaling size.
Ensure LDSR doesn't get stuck in a longer loop of "upscale/downscale/upscale" as we try to reach the target upscale size.
Add typehints for IDE sanity.
PEP-8 improvements.
Moar.
The following file patterns are invalid on Windows.
- Begin or end with the ASCII Space (0x20)
- End with the ASCII Period (0x2E)
For example, if `[prompt_spaces]` is specified as the directory name pattern, sometimes file saving may fail.
* fix for odd error only in webp files whereby piexif.insert inserts the bytes correctly, but image.save inserts extra "Exif" in the image metadata which results in an error on reading
Fixes an issue where it's still possible to write to arbitrary directories through careful use of \.. or /.. in directory patterns
...and fix the regex to work better
reeeegex
* UserComment needs an ID code at the start of the tag area. This is provided by piexif.helper.UserComment, otherwise an "Warning Invalid EXIF text encoding for UserComment" is thrown upon reading the exif data