Commit Graph

145 Commits (master)

Author SHA1 Message Date
Bryce 1faea372f9 fix: cleanup logging - remove unnecessary version checks 4 weeks ago
jaydrennan 964dd4ead7 feature: integrates spandrel for upscaling 4 weeks ago
Bryce 3a9a3974ce fix: allow referencing local paths for sdxl model weights
Addresses https://github.com/brycedrennan/imaginAIry/issues/484
4 weeks ago
Bryce Drennan df86aa6668
feature: densepose controlnet (#481) 1 month ago
Bryce 76b6fa8b65 tests: fix them 2 months ago
Bryce 9cdacd454f style: use latest ruff 2 months ago
Bryce a8acb451c5 ci: use `uv`
waiting for this issue to be resolved before using it for pip-compile

https://github.com/astral-sh/uv/issues/1624

and it didn't properly install the command line tools `aimg` and `imagine` so not using it for editable install on github either
2 months ago
Bryce cf8a44b317 feature: update refiners
better handles img2img (partial diffusion runs)
4 months ago
Bryce Drennan 601a112dc3
refactor: move download related functions to separate module (#453)
+ renames and typehints
4 months ago
Bryce d2609cb5cd fix: use smaller composition size 4 months ago
Bryce 5b3b04b877 build: remove pytorch lightning dependency 4 months ago
Bryce f50a1f5b0c fix: interrupted generations don't prevent more generations
fixes #424

- pref: improve memory usage when loading SD15.
- feature: clean up CLI output more
- feature: cuda memory tracking context manager
- feature: use safetensors fp16 for sd15
5 months ago
Bryce 9e3403df89 feature: clean up terminal output
- 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
5 months ago
Bryce Drennan 42a045e8e6
feature: support sdxl (#431)
- 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
5 months ago
jaydrennan 7eef3bf628 feature: replaces black formatter with ruff formatter 5 months ago
Bryce Drennan a2c38b3ec0
feature: support loading diffusers folder/based models from huggingface (#427) 5 months ago
Bryce 50e796a3b7 refactor: move code around 5 months ago
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.
5 months ago
Bryce d834e8b5b3 test: run non-gpu tests on github 5 months ago
jaydrennan d39486af54 fix: updates test marking to use nodeid instead of name 5 months ago
Bryce 0c03612d44 feature: large images now stay well-composed thanks to tile controlnet 5 months ago
Bryce 7880ee1389 feature: update midas (depth maps) 5 months ago
jaydrennan c99a169986 fix: configures test_set_gpu_full to run on a m1 mac. 5 months ago
Bryce Drennan 2144f26fa7
feature: add ability to dynamically make word images (#417) 5 months ago
jaydrennan 41a9d7007b
test: adds tests for stablestudio (#415) 5 months ago
jaydrennan e1e6f8037c
refactor: removes unused code and configurations (#405)
Co-authored-by: jaydrennan
5 months ago
Bryce 6d39d791b1 refactor: move safety to utils 5 months ago
Bryce ad561e8833 refactor: move model_manager to utils 5 months ago
Bryce d478771cc0 refactor: move a bunch of stuff to utils 5 months ago
jaydrennan e7b6fc40fa fix: adds default line ending for csv writing.
the csv library defaults to using CRLF line endings if not specified.
5 months ago
jaydrennan 3f3e080d39 feature: adds ability to use qrcode
feature: adds controlnet qrcode image generation.
feature: adds control net for qrcode image generation.
5 months ago
Bryce 62de446a92 ci: add mypy github action 5 months ago
Bryce 203747b14f refactor: simplify model_weights/architecture 5 months ago
Bryce 37ecd1e5e0 fix: videogen. track gpu tests 5 months ago
Bryce e898e3a799 fix: several cli commands, edit demo, negative prompt
- 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.
5 months ago
Bryce 9b95e8b0b6 perf: improve cli startup time
- do not provide automatically imported api functions and objects in `imaginairy` root module
- horrible hack to overcome horrible design choices by easy_install/setuptools

The hack modifies the installed script to remove the __import__ pkg_resources line

If we don't do this then the scripts will be slow to start up because of
pkg_resources.require() which is called by setuptools to ensure the
"correct" version of the package is installed.

before modification example:
```
__requires__ = 'imaginAIry==14.0.0b5'
__import__('pkg_resources').require('imaginAIry==14.0.0b5')
__file__ = '/home/user/projects/imaginairy/imaginairy/bin/aimg'
with open(__file__) as f:
    exec(compile(f.read(), __file__, 'exec'))
```
5 months ago
Bryce 2bd6cb264b feature: large refactor
- add type hints
- size parameter
- ControlNetInput => ControlInput
- simplify imagineresult
5 months ago
Bryce 24f4af3482 feature: better torch installation experience 5 months ago
Bryce 71d4992dca feature: added `--size` parameter to allow using named sizes 5 months ago
Bryce 6fcf0da331 test: try local runner 5 months ago
Bryce 0fe3733933 fix: memory management issue
the dtype being used as a cache key wasn't consistent. this caused the model to be loaded twice
5 months ago
Bryce b61d06651c tests: fix tests
- disable details mode. needs more work done to support
5 months ago
Bryce b5a0e65f35 fix: edit mode and some controlnet tests 6 months ago
Bryce f97f6a3b4b feature: use refiners library for generation
BREAKING CHANGE

  - stable diffusion 1.5 + inpainting working
  - self-attention guidance working. improves image generation quality
  - tile-mode working
  - inpainting self-attention guidance working

disable/broken features:
  - sd 1.4, 2.0, 2.1
  - most of the samplers
  - pix2pix edit
  - most of the controlnets
  - memory management
  - python 3.8 support

wip
6 months ago
Bryce 558d3388e5 style: speed up linting and autoformatting. fix lints 8 months ago
Bryce 8243ed616d fix: pydantic models for http server working now. Fixes #380 8 months ago
Bryce 7c2004bfcc feature/fix: migrate to pydantic 2.3
- test: add schema tests/fuzzer and fixes
 - fix default prompt. add tests
 - fix outpaint and controlnet defaults
 - fix init image strength defaults
8 months ago
Bryce 82d74c6b49 feature: switch to pydantic models
- allow prompt re-use by deferring random seed
12 months ago
Bryce 38ac0b7f54 tests: fix tests 1 year ago
Bryce df25936d6f feature: automatic use of inpainting
feature disabled since controlnet inpainting doesn't work great. Was disabled by setting `inpaint_method="finetune",`
1 year ago