imaginAIry/imaginairy
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.
2023-02-02 21:43:04 -08:00
..
bin perf: improve startup time by doing some imports lazily (#233) 2023-02-02 21:43:04 -08:00
configs feature: 🎉 Edit Images with Instructions alone! 2023-01-21 13:34:26 -08:00
data feature: image edit gifs and demo-reels 2023-01-21 17:50:31 -08:00
enhancers fix: add png handling for LazyLoadingImage (#203) 2023-01-25 22:20:31 -08:00
modules fix: tile mode was broken since latest perf improvements (#220) 2023-01-27 22:56:46 -08:00
samplers feature: 🎉 Edit Images with Instructions alone! 2023-01-21 13:34:26 -08:00
training_tools feature: prune-ckpt command can prune to just the ema 2023-01-21 13:34:26 -08:00
vendored fix: use py3.7 compat lru_cache 2023-01-22 18:24:57 -08:00
__init__.py perf: improve startup time by doing some imports lazily (#233) 2023-02-02 21:43:04 -08:00
animations.py feature: add compilation animations (#224) 2023-01-28 17:16:47 -08:00
api.py perf: improve startup time by doing some imports lazily (#233) 2023-02-02 21:43:04 -08:00
cmds.py perf: improve startup time by doing some imports lazily (#233) 2023-02-02 21:43:04 -08:00
config.py perf: improve startup time by doing some imports lazily (#233) 2023-02-02 21:43:04 -08:00
debug_info.py perf: improve startup time by doing some imports lazily (#233) 2023-02-02 21:43:04 -08:00
img_utils.py feature: add compilation animations (#224) 2023-01-28 17:16:47 -08:00
log_utils.py perf: improve startup time by doing some imports lazily (#233) 2023-02-02 21:43:04 -08:00
lr_scheduler.py feature: finetuning 2023-01-16 01:35:59 -08:00
model_manager.py fix: make model cached paths compatible with windows (#205) 2023-01-25 22:05:07 -08:00
outpaint.py feature: image sizes can now be multiples of 8 instead of 64 2023-01-23 22:31:25 -08:00
paths.py feature: switch between models without restarting python instance 2022-10-23 22:55:28 -07:00
prompt_schedules.py feature: add compilation animations (#224) 2023-01-28 17:16:47 -08:00
roi_utils.py feature: finetuning 2023-01-16 01:35:59 -08:00
safety.py perf: improve startup time by doing some imports lazily (#233) 2023-02-02 21:43:04 -08:00
schema.py perf: improve startup time by doing some imports lazily (#233) 2023-02-02 21:43:04 -08:00
surprise_me.py feature: add compilation animations (#224) 2023-01-28 17:16:47 -08:00
train.py fix: gracefully fail if older pytorch-lightning installed 2023-01-16 15:14:11 -08:00
utils.py feature: add compilation animations (#224) 2023-01-28 17:16:47 -08:00
version.py perf: improve startup time by doing some imports lazily (#233) 2023-02-02 21:43:04 -08:00