Commit Graph

43 Commits

Author SHA1 Message Date
Bryce
82c30024c9 feature: DDIM now default sampler
better output quality
2023-12-03 09:13:01 -08:00
Bryce
b61d06651c tests: fix tests
- disable details mode. needs more work done to support
2023-12-03 09:13:01 -08:00
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
2023-11-22 13:22:00 -08:00
Bryce
3b777b98d8 fix: improved large images using composition 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
2a3e19f5a1 feature: 🎉 Edit Images with Instructions alone! 2023-01-21 13:34:26 -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
1381c7fed4 lint: new ruff linter 2023-01-02 14:11:36 -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
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
7af1ab66ca fix: add workaround for bug in k_diffusion on mps
As documented here: https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/4558#issuecomment-1310387114

- make image logs more consistent
- note which step the progress images belong to in the filename
2022-11-12 20:19:23 -08:00
Bryce
7fba2972e8 feature: added DPM++ 2S a and DPM++ 2M samplers
-fix: fix bug with `--show-work`
2022-11-11 10:52:48 -08:00
Bryce
021a0c540d feature: inpainting model support; improved model manager 2022-10-25 20:07:35 -07:00
Bryce
741a433c56 feature: update k_diffusion. add dpm_fast and dpm_addaptive samplers 2022-10-16 22:10:54 -07:00
Bryce
dcf953383e tests: support distributed test runs
- switch to expected images instead of hashes. allow fuzzy matches
feature: more consistent seeds
2022-10-16 20:22:16 -07:00
Bryce
4ba1965db8 feature: k-diff sampler img2img and masking 2022-10-14 03:23:16 -07:00
Bryce
281d23adf2 refactor: prep for supporting img2img in k-samplers 2022-10-13 07:04:37 -07:00
Bryce
e8bb3cf5fd refactor: consolidate masking logic 2022-10-13 07:04:37 -07:00
Bryce
72026c8c90 refactor: merge img2img and txt2img pipelines 2022-10-13 07:04:37 -07:00
Bryce
a105dadbc4 refactor: combine identical schedules 2022-10-13 07:04:37 -07:00
Bryce
8d4b5cb9e1 refactor: standardize samplers more 2022-10-13 07:04:37 -07:00
Bryce
153c259ee4 fix: k-sampler methods were broken 2022-10-12 20:30:49 -07:00
Bryce
b0123a8f43 refactor: remove unused parameters 2022-10-11 01:06:24 -05:00
Bryce
df3c752eb8 refactor: consolidate logging utils 2022-10-10 22:32:39 -05:00
Bryce
9ba302a5f4 refactor: begin to standardize samplers 2022-10-07 00:02:26 -05:00
Bryce
95a8fa31a9 fix: inpainting producing blurry images
while the previous version did produce much better blending it also makes images that lack detail for some reason.

tests: Added more tests to help catch this sort of thing earlies

fix: found that median blur is really slow, so I made sure we only do it on downsampled masks.  Was taking like 3 minutes to run on the large pearl girl picture on M1

- docs: update examples
2022-09-27 17:19:25 -07:00
Bryce
6cae290038 fix: inpainting now matches photo at high generation strength
- 🎉 fix: inpainted areas correlate with surrounding image, even at 100% generation strength.  Previously if the generation strength was high enough the generated image
would be uncorrelated to the rest of the surrounding image.  It created terrible looking images.
 - fix: mask boundaries are more accurate
2022-09-25 22:50:16 -07:00
Bryce
d832f15297 fix: masking now works properly at strengths 0 and 1 2022-09-24 23:31:03 -07:00
Bryce
69af07ab67 style: fix lint issues 2022-09-24 00:31:08 -07:00
Bryce
38c7f88950 feature: boolean logic masks
Specify advanced text based masks using boolean logic and strength modifiers. Mask descriptions must be lowercase. Keywords uppercase.
Valid symbols: `AND`, `OR`, `NOT`, `()`, and mask strength modifier `{*1.5}` where `+` can be any of `+ - * /`. Single-character boolean
operators also work.  When writing strength modifies know that pixel values are between 0 and 1.

 - feature: apply mask edits to original files
 - feature: auto-rotate images if exif data specifies to do so
 - fix: accept mask images in command line
2022-09-24 00:02:31 -07:00
Bryce
a3a0de08e9 autoformat 2022-09-23 14:41:15 -07:00
Jay Drennan
df28bf8805 refactor: implements changes to comply with pylama 2022-09-22 12:52:37 -06:00
Bryce
a46424c673 feature: img2img now supported with PLMS (instead of just DDIM)
Kinda hacky copy/pasting from ddim.  Need to cleanup
2022-09-20 08:42:00 -07:00
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
2022-09-19 21:19:22 -07:00
Bryce
930295d840 feature: txt2mask - automated text replacement
from https://github.com/timojl/clipseg
2022-09-18 06:07:47 -07:00
Bryce
6307a0daf5 refactor: cleanup ddim 2022-09-17 12:24:27 -07:00
Bryce
59648dbe61 test: add some tests/logging
add some experiments
2022-09-16 22:21:38 -07:00
Bryce
bb665b9eb6 fix: make k-diffusion samplers deterministic
- add test for hashes on mps.  images look same on CUDA but are slightly different.
2022-09-14 09:37:45 -07:00
Bryce
b4a3b8c2b3 feature: k-diffusion samplers
- improved image logging functionality. can just stick log_latent wherever you want
- improved some variable naming
- moved all the samplers together
- vendored k-diffusion library
2022-09-14 00:40:25 -07:00