* docs: adds docs tool, material for mkdocs, along with more fleshed out docstrings.
this includes ability to serve up a local docs website.
---------
Co-authored-by: Bryce <github20210803@accounts.brycedrennan.com>
- recording timing and memory usage of various steps
- re-use logging context for composition images
- load sdxl weights in a more VRAM efficient way
- switch to diffusers weights for default weights for sd15
- adds support for (SDXL)[https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0]
- adds sliced encoding/decoding to refiners sdxl pipeline
- doesn't support inpainting, controlnets
- monkeypatches self_attention_guidance to use sliced attention
- adds a bunch of model weight translation utilities and weightmaps
- add [opendalle 1.1](https://huggingface.co/dataautogpt3/OpenDalleV1.1)
- change default model to opendalle
- fix: better handle special characters in path inputs on command line
**todo**
- add tests
- 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.
- fix colorize cmd. add test
- fix describe cmd. add test
- fix model-list cmd. add test
- fix stable studio
- hide stack grace for ValueErrors in cli
- set controlnet scale
- fix negative prompt to allow emptystring instead of replacing it with default
- adjust edit-demo parameters
- arg scheduler that works at click level (but disable it). works but not ideal experience.
added `init-image-strength` and `model` so they can be fully displayed on png info inspectors or stable diffusion browsers such as https://breadboard.me
just running `aimg --help` or `aimg --version` was very slow due to all the imports being brought in eagerly
Before changes `aimg --help`
`2.24s user 4.05s system 184% cpu 3.416 total`
After changes:
`0.04s user 0.02s system 8% cpu 0.625 total`
Used `PYTHONPROFILEIMPORTTIME=1 aimg --help` to find time consuming imports.
Also switched to using `scripts` instead of `entrypoints` since the scripts are much faster.
Made duplicate SAMPLER_TYPE_OPTIONS that can be loaded without loading all the samplers themselves.
Likely a breaking change - not sure.
- feature: finetuning your own image models
- feature: image prep command. crops to face or other interesting parts of photo
- fix: back-compat for hf_hub_download
- feature: add prune-ckpt command
- feature: allow specification of model config file
- feature: negative prompting. `--negative-prompt` or `ImaginePrompt(..., negative_prompt="ugly, deformed, extra arms, etc")`
- feature: a default negative prompt is added to all generations. Images in SD-2.0 don't look bad anymore. Images in 1.5 look improved as well.