Commit Graph

14 Commits

Author SHA1 Message Date
brkirch f4a488f585 Set device for facelib/facexlib and gfpgan
* FaceXLib/FaceLib doesn't pass the device argument to RetinaFace but instead chooses one itself and sets it to a global - in order to use a device other than its internally chosen default it is necessary to manually replace the default value
* The GFPGAN constructor needs the device argument to work with MPS or a CUDA device ID that differs from the default
2022-11-12 03:34:13 -05:00
brkirch e9e2a7ec9a
Merge branch 'master' into cpu-cmdline-opt 2022-10-04 07:42:53 -04:00
AUTOMATIC 6c6ae28bf5 send all three of GFPGAN's and codeformer's models to CPU memory instead of just one for #1283 2022-10-04 12:32:22 +03:00
brkirch b88e4ea7d6
Merge branch 'master' into master 2022-10-04 01:04:19 -04:00
AUTOMATIC 6491b09c24 use existing function for gfpgan 2022-10-03 08:53:52 +03:00
brkirch bdaa36c844 When device is MPS, use CPU for GFPGAN instead
GFPGAN will not work if the device is MPS, so default to CPU instead.
2022-09-30 23:53:25 -04:00
AUTOMATIC d1f098540a remove unwanted formatting/functionality from the PR 2022-09-30 11:42:40 +03:00
d8ahazard 0dce0df1ee Holy $hit.
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.
2022-09-29 17:46:23 -05:00
d8ahazard 740070ea9c Re-implement universal model loading 2022-09-26 09:29:50 -05:00
AUTOMATIC d4205e66fa gfpgan: just download the damn model 2022-09-23 10:26:00 +03:00
AUTOMATIC 843b2b64fc Instance of CUDA out of memory on a low-res batch, even with --opt-split-attention-v1 (found cause) #255 2022-09-12 18:40:06 +03:00
AUTOMATIC 6a9b33c848 codeformer support 2022-09-07 12:32:28 +03:00
AUTOMATIC 595c827bd3 option to unload GFPGAN after using 2022-09-03 17:28:30 +03:00
AUTOMATIC 345028099d split codebase into multiple files; to anyone this affects negatively: sorry 2022-09-03 12:08:45 +03:00