Commit Graph

19 Commits

Author SHA1 Message Date
Bryce Drennan
601a112dc3
refactor: move download related functions to separate module (#453)
+ renames and typehints
2024-01-14 16:50:17 -08:00
Bryce
7100d3f9ea perf: make upscaler use fp16 for better efficiency 2024-01-01 19:59:31 -08:00
Bryce Drennan
77c4b85037
perf: improve memory usage (#433)
add warning for corrupt weights files
2023-12-29 09:04:33 -08:00
Bryce
32b5175e0e feature: better upscaling
- use face enhancement in a smarter way that doesn't blur high-res images
- use a different upscale model for composition images

**Upscaling**
RealESRGAN is great but it blurs parts of images it doesn't understand

4xUltrasharp is a finetune of RealESRGan that isn't as good but doesn't have this blurry patch problem.  This makes it more suitable to use as part of the composition/upscale process.  We still use realesrgan for any last-step upscales since it does look better.

had to write a state dict translator to use the ultrasharp model

**Face Enhancement**

We no longer enhance faces that are larger than 512 pixels. They should already have enough details and the face enhancer doesn't produce faces at high enough resolution to look good at that size.
2023-12-21 05:48:02 -08:00
Bryce
ad561e8833 refactor: move model_manager to utils 2023-12-15 14:32:01 -08:00
Bryce
316114e660 docs: add docstrings
Wrote an openai script and custom prompt to generate them.
2023-12-15 14:32:01 -08:00
Bryce
926692ad03 tests: "prime" the controlnets
Trying to get things working on m1. doesn't fix everything
2023-05-20 13:09:00 -07:00
Bryce
fb19e34acc fix: allow use of upscaler on mps device 2023-05-20 13:09:00 -07:00
Bryce
4c77fd376b feature: improvements to memory management
not thoroughly tested on low-memory devices
2023-05-20 13:09:00 -07:00
Bryce
1c986d8644 fix: use py3.7 compat lru_cache
- disable lint fixer that updates to newer syntax
2023-01-22 18:24:57 -08:00
Bryce
00408d176f performance: use tiling for upscaling for better use of memory 2023-01-22 08:46:37 -08:00
Bryce
4bc78b9be5 build: vendorize realesrgan
Removes lots of dependencies including problematic `grpcio` and `tb-nightly`
2023-01-08 22:20:22 -08:00
Bryce
35ac8d64d7 build: vendorize parts of basicsr
Trying to get rid of tb-nightly dependency and any other unnecessary dependencies.
2023-01-08 22:20:22 -08:00
Bryce
1381c7fed4 lint: new ruff linter 2023-01-02 14:11:36 -08:00
Bryce
021a0c540d feature: inpainting model support; improved model manager 2022-10-25 20:07:35 -07:00
Bryce
930295d840 feature: txt2mask - automated text replacement
from https://github.com/timojl/clipseg
2022-09-18 06:07:47 -07:00
Bryce
8238e59067 tests: add more tests 2022-09-17 15:49:38 -07:00
Bryce
6307a0daf5 refactor: cleanup ddim 2022-09-17 12:24:27 -07:00
Bryce
541ecb9701 feature: face enhancement and upscaling!! 2022-09-13 00:27:53 -07:00