Commit Graph

251 Commits

Author SHA1 Message Date
Bryce
a449fbd5e2 feature: remove tiling message for upscaler 2023-02-28 21:04:00 -08:00
Bryce
40da2b0357 tests: fix tests 2023-02-28 21:04:00 -08:00
Bryce
dbc6a249a6 fix: k-diff samplers made more stable by skipping second to last step
https://github.com/crowsonkb/k-diffusion/issues/43#issuecomment-1305195666

See discussion here as well: https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/3483
2023-02-28 21:04:00 -08:00
Bryce
70c58467c0 fix: img2img was broken for all samplers except ddim,plms
img2img was broken for all samplers except plms and ddim when init image strength was >~0.25.  Been this way for a while. whoops
2023-02-28 21:04:00 -08:00
Bryce
28c294554b fix: specify name of imagine command 2023-02-26 17:13:47 -08:00
Bryce
8273ab2c26 feature: add --fix-faces options to aimg upscale command 2023-02-25 14:29:55 -08:00
Bryce
d14c8f98f4 feature: aimg model-list command lists included models 2023-02-25 14:29:55 -08:00
Bryce
e3b23584ed refactor: split up command line tool 2023-02-25 14:29:55 -08:00
Bryce
c0fad5b2a3 fix: add missing alias 2023-02-25 14:29:55 -08:00
Bryce
d5cff45bff feature: allow input of raw control images 2023-02-25 14:29:55 -08:00
Bryce
8f56e14dc7 feature: add system memory to debug output 2023-02-25 14:29:55 -08:00
Bryce
d7e494241c fix: composition images were too blurry 2023-02-25 14:29:55 -08:00
cocktailpeanut
be7f8f3c2a
feature: support additional metadata attributes (#271)
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
2023-02-24 20:44:26 -08:00
Bryce
9831d8a24a feature: aimg colorize attempts to use controlnet to colorize images 2023-02-23 01:46:37 -08:00
Bryce
b261c62d4e docs: update docs 2023-02-22 23:38:47 -08:00
Bryce
54c3ad51d6 feature: controlnet 2023-02-22 23:38:47 -08:00
Bryce
bcd761b8a6 tests: better coverage of cli commands
add "empty" model that just uses empty state for models
2023-02-20 11:06:54 -08:00
Bryce
1563e0b871 test: add some autoencoder tests
the fold-unfold encoding/decoding looks like it's slower and has worse seams than the sliced feathering approach
2023-02-18 15:36:34 -08:00
Bryce
929eff353e fix: edit was broken by recent changes 2023-02-17 13:43:56 -08:00
Bryce
5b1cded94f fix: compose phase for edits probably doesn't make sense 2023-02-17 13:43:56 -08:00
Bryce
6f749ac4b6 fix: create compilations dir as needed 2023-02-17 10:08:12 -08:00
Bryce
882cc7e0f1 feature: generate large images with coherent composition 2023-02-16 13:09:14 -08:00
Bryce
c3a88c44cd perf: tiled encoding of images
The fold/unfold/split_input_params images didn't look good
2023-02-16 13:09:14 -08:00
Bryce
2aef6089e0 feature: generate large images
Added a composition stage so large images are more coherent
2023-02-16 13:09:14 -08:00
Bryce
b93b6a4d7c perf: use silu instead of nonlinearity for speedup 2023-02-15 14:22:00 -08:00
Bryce
68e7fd73c5 perf: add xformers dependency 2023-02-15 14:22:00 -08:00
Bryce
003a512dc8 perf: mps perf improvement
attention slicing wasn't working
2023-02-15 14:22:00 -08:00
Bryce
66b28c80fc fix: images came out wrong if processed on mps 2023-02-15 14:22:00 -08:00
Bryce
8db73707ff perf: load model to gpu after making it "half" 2023-02-15 14:22:00 -08:00
Bryce
1c8893cecc fix: fix image gen retry 2023-02-15 14:22:00 -08:00
Bryce
ea1d4baafe refactor: cleanup image generation code 2023-02-15 14:22:00 -08:00
Bryce
8a97213622 feature: sliced latent decoding
allows generation of bigger images. tile seams can be noticeable occasionally despite the feathering
2023-02-12 01:41:57 -08:00
Bryce
da70b310d5 fix: edit interface was broken 2023-02-05 21:16:09 -08:00
Bryce
eeb80f81aa docs: update changelog 2023-02-05 12:41:54 -05:00
Bryce
76d40560ef style: lintfix 2023-02-05 12:41:54 -05:00
Bryce
6c1e3b2ae7 feature: allow specifying output format
closes #228
2023-02-05 12:41:54 -05:00
Bryce
d220819377 feature: accept multiple input images to allow batch editing
- move "surprise me" to "edit-demo"
2023-02-05 12:41:54 -05:00
Bryce
63f32846bb docs: no mps training; how change cache dir 2023-02-05 12:41:54 -05:00
Bryce
d9a70a55c6 feature/docs: cleanup cli
- add colors to help text
- add suggestion to use `aimg` shell
- lazy imports for faster response time
2023-02-05 12:41:54 -05:00
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
Bryce
19444d8e22 fix: first frame should be the interesting one 2023-01-28 21:32:56 -08:00
Bryce Drennan
e619dc2867
fix: init image strength (#225) 2023-01-28 19:34:25 -08:00
Bryce Drennan
9ee09ac842
feature: add compilation animations (#224)
- add generation/compare gifs
2023-01-28 17:16:47 -08:00
Bryce Drennan
a67683d318
feature: add upscale command line function (#222) 2023-01-27 23:57:31 -08:00
Bryce Drennan
542e4fbd55
fix: tile mode was broken since latest perf improvements (#220) 2023-01-27 22:56:46 -08:00
Pavel Yakovlev
e1c9f14489 feature: add openjourney models 2023-01-27 22:52:19 -08:00
Bryce Drennan
9e06013ade
feature: save gifs that show image generation process (#218) 2023-01-27 17:18:42 -08:00
Bryce Drennan
6d733ed3ff
feature: added aimg system-info command to help debug issues (#216) 2023-01-26 21:41:52 -08:00
Bryce Drennan
7bdde559cc
performance: memory management improvements (#210)
- tile mode made more efficient. especially when not being used
- add script to iteratively make bigger images
2023-01-26 03:14:02 -08:00
Jiaming Sun
a338902ab5
fix: add png handling for LazyLoadingImage (#203)
Loading png images for captioning will cause the following error since PIL loads png images in RGBA mode.

```python
  File "./miniconda3/lib/python3.8/site-packages/torchvision/transforms/functional_tensor.py", line 940, in normalize
    return tensor.sub_(mean).div_(std)
RuntimeError: The size of tensor a (4) must match the size of tensor b (3) at non-singleton dimension 0
```
2023-01-25 22:20:31 -08:00
Mahmoud Al-Qudsi
0b7692df07
fix: make model cached paths compatible with windows (#205)
If a model has a remote filename with characters that might not be supported on
the local cache filesystem, replace them during translation of URL to cached
file path.

Closes #202.
2023-01-25 22:05:07 -08:00
Bryce
92baff890e feature: surprise me improvements 2023-01-25 21:24:32 -08:00
Bryce
c7ed86a36f feature: auto-retry generation unsafe image is created 2023-01-25 21:24:32 -08:00
Bryce
f60fa880a7 feature: less visually confusing shell output 2023-01-25 21:24:32 -08:00
Bryce
16cef16c3e feature: facilitate references to previous image generation 2023-01-25 21:24:32 -08:00
Bryce
248679d8de feature: image sizes can now be multiples of 8 instead of 64
from https://github.com/CompVis/stable-diffusion/issues/60#issuecomment-1240294667
2023-01-23 22:31:25 -08:00
Bryce
9212f0227c fix: bypass hf cache retrieval bug
If one uses `hf_hub_download` only referencing specific commits the `refs` folder will not be created even though data will be cached via `snapshots` and `blobs`.  Subsequent calls to `try_to_load_from_cache` will return None even though the desired data was in the cache.

Example:

```python
# download something
hf_hub_download(repo_id=repo, revision=commit_hash, filename=filepath, token=token)
# returns None
try_to_load_from_cache(repo_id=repo, revision=commit_hash, filename=filepath)
```

https://github.com/huggingface/huggingface_hub/pull/1306
2023-01-23 20:22:33 -08:00
Bryce
290b0a318e fix: MacOS MPS background can't handle large slices
per
- https://github.com/brycedrennan/imaginAIry/issues/175
- https://github.com/invoke-ai/InvokeAI/issues/1244
2023-01-23 06:54:11 -08: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
097e763887 fix: hf_hub_download signature compat
instead of (incorrectly) trying to detect the function signature of the old version, just catch the error and try the old signature
2023-01-22 11:28:34 -08:00
mebelz
2571097087 fix: spelling typo
leave references to misspelled files- don't want to break any existing links
2023-01-22 08:49:14 -08:00
Bryce
00408d176f performance: use tiling for upscaling for better use of memory 2023-01-22 08:46:37 -08:00
Bryce
2fca01b911 fix: not so old 2023-01-21 17:55:17 -08:00
Bryce
7c05c3aae2 feature: image edit gifs and demo-reels 2023-01-21 17:50:31 -08:00
Bryce
2a3e19f5a1 feature: 🎉 Edit Images with Instructions alone! 2023-01-21 13:34:26 -08:00
Bryce
7285644909 feature: prune-ckpt command can prune to just the ema 2023-01-21 13:34:26 -08:00
Bryce
5b56f05da7 feature: print version
- fix: default config wasn't being selected for custom models
2023-01-18 12:04:07 -08:00
Bryce
9b1d130f93 feature: ability to load safetensors 2023-01-17 22:56:16 -08:00
Bryce
81f294216b feature: 🎉 outpainting 2023-01-17 00:31:01 -08:00
Bryce
02af4c37b9 fix: gracefully fail if older pytorch-lightning installed 2023-01-16 15:14:11 -08:00
Bryce
24e10f9e5f fix: don't report a safety issue when a black image is generated 2023-01-16 14:51:31 -08:00
Bryce
fad7f17790 feature: run face enhancement on the GPU
Should run 10x faster
2023-01-16 12:49:14 -08:00
Bryce
85c084099c fix: incorrect config files being used for non-1.0 models 2023-01-16 03:09:28 -08:00
Bryce
5cc73f6087 feature: finetuning
- 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
2023-01-16 01:35:59 -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
e9a3e1a99b build: unpin dependencies 2023-01-08 22:20:22 -08:00
Bryce
4bc940ddf4 feature: remove more randomness 2023-01-02 14:11:36 -08:00
Bryce
1381c7fed4 lint: new ruff linter 2023-01-02 14:11:36 -08:00
Bryce
da0f1e1ee6 fix: make sure randomness is generated on cpu for consistency 2022-12-21 09:33:46 -08:00
Bryce
239b235140 feature: depth-based image-to-image generations (and inpainting) 2022-12-20 09:03:55 -08:00
Bryce
ad0b9e8ab8 feature: tile in a single dimension ("x" or "y") 2022-12-19 21:37:59 -08:00
Bryce
1f7403155e fix: more thorough cleaning of memory when switching models
also cleanup up some test failures
2022-12-18 22:00:29 -08:00
Bryce Drennan
ccf9749df5
fix: performance improvement. disable ema (#139)
A configuration `use_ema: False` was became necessary in the newer Stable Diffusion code but was missing from the 1.5 config.
2022-12-18 00:00:38 -08:00
Paul Mestemaker
ad5e467042
feat: include negative prompts in logs and exif metadata (#135) 2022-12-13 10:05:24 -08:00
Paul Mestemaker
68791cf236
feat: better handling for default model names (#134)
* feat: better handling for default model names

Addresses #124
2022-12-09 01:14:47 -08:00
Bryce
f30823e0b5 feature: Stable Diffusion 2.1 2022-12-07 10:41:36 -08:00
Bryce
2f8edc1530 feature: negative prompting
- 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.
2022-12-02 02:03:13 -08:00
Bryce
257752887d perf: add back memory efficiency improvements
Removed these in a rush to get SD-2.0 out.
2022-11-28 00:32:53 -08:00
Bryce
e0af5d0089 fix: version metadata was broken
Fixes #114
2022-11-27 14:46:01 -08:00
Bryce
4610d7f01d feature: xformers support
add more upscaling code (that doesn't yet work)
2022-11-26 22:55:51 -08:00
Bryce
9c153a8d2d feature: support k-sampler methods for SD-2.0-v (768) 2022-11-26 16:18:08 -08:00
Bryce
015088507f feature/refactor/fix: better defaults. correct version in metadata
- feature: use different default steps and image sizes depending on sampler and model selceted
- fix: #110 use proper version in image metadata
- refactor: samplers all have their own class that inherits from ImageSampler
2022-11-26 16:18:08 -08:00
Kian-Meng Ang
3d04df4dee Fix typos
Found via `codespell -S ./imaginairy/vendored`
2022-11-25 19:23:06 -08:00
Bryce
58c2897dd1 refactor: fix lint issues 2022-11-25 14:39:20 -08:00
Maxime Mouchet
40ab571fc1 cli: show defaults and cleanup help text 2022-11-25 07:46:40 -08:00
Bryce
e67341223b feature: Stable Diffusion 2.0
working: CUDA and MacOS
working: 512p model with all samplers
working: inpainting with all samplers
working: 768p model with ddim sampler
2022-11-24 00:50:57 -08:00
Bryce
893b041a8f feature: progress image callback 2022-11-15 18:06:03 -08:00
Bryce
095a905d72 fix: cpu generation doesn't use autocast
autocast not supported on CPU
https://github.com/pytorch/pytorch/issues/55374
https://github.com/invoke-ai/InvokeAI/pull/518
2022-11-13 14:42:19 -08:00
Bryce
b8a88370de fix: lower memory reqs for attention on M1s 2022-11-13 13:40:37 -08:00