Commit Graph

19 Commits (9cdacd454f3951e5c3393b83ca27fc67d323e626)

Author SHA1 Message Date
Bryce 9cdacd454f style: use latest ruff 3 months ago
Bryce 316114e660 docs: add docstrings
Wrote an openai script and custom prompt to generate them.
6 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'))
```
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 477d161c91 build: better communicate lack of support for Python 3.11 9 months ago
Bryce Drennan 9eacf5e7ed
perf: improve startup time by doing some imports lazily (#233)
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.
1 year ago
Bryce 5b56f05da7 feature: print version
- fix: default config wasn't being selected for custom models
1 year ago
Bryce 94c0aeab12 feature: switch between models without restarting python instance 2 years ago
Bryce 0fb03f2a1f fix/version: 2.0.1
quick fix for compatibility with Pillow < 9.1.0
https://stackoverflow.com/questions/71738218/module-pil-has-not-attribute-resampling
2 years ago
Bryce 4705d182d5 feature: generate captions for images
- add wip functionality for negative masks
- ci: add code linter that removes unused imports
- add instructions to install rust on osx
2 years ago
Bryce 7087c4a680 feature: automatic mask generation
mask generation working but not integrated
2 years ago
Bryce c7a822d701 feature: urls as init images
- --init-image accepts urls
- cleanup command line code
2 years ago
Bryce 967eb76365 refactor/test: logging suppression + hashed image test
- simpler logging suppression for `transformers` library
- suppress logging noise for running tests
- get test running for all samplers on mps and cuda platforms
- refactor safety model env variable to allow classification
2 years ago
Bryce 541ecb9701 feature: face enhancement and upscaling!! 2 years ago
Bryce 438c2868ad refactor: run import sorter 2 years ago
Bryce 3bdf2dc3ec feature: tile mode
from https://github.com/replicate/cog-stable-diffusion/compare/main...TomMoore515:material_stable_diffusion:main
2 years ago
Bryce f1b1e1c1c8 feature: add nsfw image filter 2 years ago
Bryce 7a33ee2480 feature: cleaned up logging
- cleans up all the logging. hide most of it
 - create better readme. show example images
 - save metadata into image
2 years ago
Bryce 0835b2db16 first commit 2 years ago