Commit Graph

125 Commits

Author SHA1 Message Date
Bryce Drennan
c5402949c4
Update README.md 2022-11-24 01:50:34 -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
1a866c48e1 version: 5.1.0 2022-11-15 18:22:23 -08:00
Bryce
893b041a8f feature: progress image callback 2022-11-15 18:06:03 -08:00
Bryce
411f359f4e version: 5.0.1 2022-11-13 14:58:21 -08:00
Bryce
d499ca307b fix: use inpainting source that doesn't require login 2022-11-12 21:13:25 -08:00
Bryce
584e0d9df0 feature: change default sampler to k_dpmpp_2m, which is more than twice as fast 2022-11-12 20:56:38 -08:00
Bryce
0f02fc587c fix: k_dpm_fast on MPS platform
fixes #75

As discussed here: https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/2446#issuecomment-1279733739
2022-11-12 20:19:23 -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
17399e7702 docs: update about inpainting 2022-10-25 20:07:35 -07:00
Bryce
94c0aeab12 feature: switch between models without restarting python instance 2022-10-23 22:55:28 -07:00
Bryce
97682da9ed version: 4.0.0 2022-10-22 02:25:54 -07:00
Bryce
8332593fed feature: dilation and erosion of masks
Previously the `+` and `-` characters in a mask (example: `face{+0.1}`) added to the grayscale value of any masked areas. This wasn't very useful. The new behavior is that the mask will expand or contract by the number of pixel specified. The technical terms for this are dilation and erosion.  This allows much greater control over the masked area.
2022-10-17 23:47:26 -07:00
Bryce
6f1455e912 docs: update readme 2022-10-16 22:10:54 -07:00
Bryce
4ba1965db8 feature: k-diff sampler img2img and masking 2022-10-14 03:23:16 -07:00
Bryce
497dc81d9e fix: k-sampler methods were broken 2022-10-12 20:35:45 -07:00
Bryce
6a80759016 feature: improved safety filter
- provides more informative logs
- provides a detailed safety score object
- adds non-bypassable filter for extreme content
2022-10-10 03:32:19 -05:00
Bryce
83db4ad795 docs: fix prompt expansion description
thanks to @Cybergate9 for identifying the mistakes

addresses #52
2022-10-09 13:28:56 -07:00
Bryce
26483ef128 version: 2.4.0 2022-10-08 18:38:43 -07:00
Bryce Drennan
31c2160e21
feature: prompt expansion (#51)
You can use `{}` to randomly pull values from lists.  A list of values separated by `|` and enclosed in `{ }` will be randomly drawn from in a non-repeating fashion. Values that are surrounded by `_ _` will pull from a phrase list of the same name.   Folders containing .txt phraselist files may be specified via
`--prompt_library_path`. The option may be specified multiple times.  Built-in categories:

      3d-term, adj-architecture, adj-beauty, adj-detailed, adj-emotion, adj-general, adj-horror, animal, art-movement,
      art-site, artist, artist-botanical, artist-surreal, aspect-ratio, bird, body-of-water, body-pose, camera-brand,
      camera-model, color, cosmic-galaxy, cosmic-nebula, cosmic-star, cosmic-term, dinosaur, eyecolor, f-stop,
      fantasy-creature, fantasy-setting, fish, flower, focal-length, food, fruit, games, gen-modifier, hair, hd,
      iso-stop, landscape-type, national-park, nationality, neg-weight, noun-beauty, noun-fantasy, noun-general,
      noun-horror, occupation, photo-term, pop-culture, pop-location, punk-style, quantity, rpg-item, scenario-desc,
      skin-color, spaceship, style, tree-species, trippy, world-heritage-site

   Examples:

   `imagine "a {red|black} dog" -r 2 --seed 0` will generate both "a red dog" and "a black dog"

   `imagine "a {_color_} dog" -r 4 --seed 0` will generate four, different colored dogs. The colors will eb pulled from an included
   phraselist of colors.

   `imagine "a {_spaceship_|_fruit_|hot air balloon}. low-poly" -r 4 --seed 0` will generate images of spaceships or fruits or a hot air balloon

   Credit to [noodle-soup-prompts](https://github.com/WASasquatch/noodle-soup-prompts/) where most, but not all, of the wordlists originate.
2022-10-08 18:34:35 -07:00
Bryce
0244d4151f version: 2.3.1 2022-10-06 17:26:00 -07:00
Bryce
5cc19c460c version: 2.3.0 2022-10-05 23:35:05 -07:00
Bryce
00fff23fdf docs: update macos installation instructions 2022-10-06 01:24:21 -05:00
Bryce
282fbc19b5 version: 2.2.1 2022-10-04 06:21:37 -07:00
Bryce
302845f35a docs: update feature plans 2022-10-04 06:18:46 -07:00
Bryce
da0b983622 version: 2.2.0 2022-10-03 16:35:57 -07:00
Bryce
9fe3cf79c2 feature: better masking segmentation from clipseg 2022-09-27 23:42:42 -07:00
Bryce
f21c979f08 feature: better masking segmentation from clipseg 2022-09-27 23:35:06 -07:00
Bryce
c92e5c443f version: 2.0.3 2022-09-27 21:52:45 -07: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
d563e0c7fb refactor: image version management
- mask_modify_original is now a prompt attribute
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
b69b4c770e feature: interactive prompt
- add quiet flag
- add mask-modify-original flag
2022-09-24 23:31:03 -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
8e844f2eae version: 1.6.2 2022-09-22 10:34:34 -07:00
Bryce
cc014685bd fix: leave sample in float32 for all final processing 2022-09-22 10:33:35 -07:00
Bryce
09f00f9652 version: 1.6.1 2022-09-22 08:26:55 -07:00
Bryce
9614a82f12 fix: use float32 at image render time for wider cpu compatibility
If the x_sample was a bfloat on the gpu but the cpu doesn't support bfloat, that can cause a TypeError
```
  File "/home/stdiff/.local/lib/python3.10/site-packages/imaginairy/api.py", line 292, in imagine
    x_sample.cpu().numpy(), "c h w -> h w c"

TypeError: Got unsupported ScalarType BFloat16`
```
2022-09-22 08:25:06 -07:00
Bryce
a275d9c9cd version: 1.6.0 + docs 2022-09-21 22:44:49 -07:00
Bryce
ff7fc0dab7 feature: tile mode can now be specified per-prompt 2022-09-20 22:57:03 -07:00
Bryce
83c809e2b7 version 1.5.3
bugfix missing config file
2022-09-20 17:05:11 -07:00
Bryce
3d64867e1f version 1.5.2
bugfix missing config file
2022-09-20 17:03:33 -07: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
3a10a2eb80 docs: osx => macOS 2022-09-20 07:17:04 -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
f040e3bffe feature: allow multiple additive targets for text masking targets 2022-09-18 15:24:31 -07:00
Bryce
be85133070 version: 1.3.0 2022-09-18 06:11:56 -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
19d0b563ac style: lint fixes. remove unused code 2022-09-16 09:24:24 -07:00
Bryce
793df6e9dc docs update 2022-09-16 08:35:38 -07:00
Bryce
c7a822d701 feature: urls as init images
- --init-image accepts urls
- cleanup command line code
2022-09-15 23:06:59 -07:00
Bryce
a1675fa599 docs: add dockerfile example 2022-09-14 21:24:45 -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
Bryce
bb7eaa47f6 docs: small doc updates 2022-09-13 09:12:47 -07:00
Bryce
ff7455034d docs and lint 2022-09-13 00:46:37 -07:00
Bryce
541ecb9701 feature: face enhancement and upscaling!! 2022-09-13 00:27:53 -07:00
Bryce
6fa776053f docs: update image links 2022-09-11 22:29:29 -07:00
Bryce
a20f56dfda docs: rearrange images 2022-09-11 21:42:07 -07:00
Bryce
c982c9a38f docs: rearrange images 2022-09-11 21:39:06 -07:00
Bryce
b568ec576f docs: rearrange images 2022-09-11 21:37:44 -07:00
Bryce
6ac3d40009 docs: update readme. add docs to package
Clean up logging some more
2022-09-11 21:36:14 -07:00
Bryce
b9c00dd8de fix: util functions in wrong place
add tile example in readme
2022-09-11 18:20:58 -07:00
Bryce
84a73cb5a2 feature: (wip) better image to image
I tried it with the DDIM sampler and it didn't work.

Probably need to use the k-diffusion sampler with it
from a846393251/find_noise.py

needs https://github.com/crowsonkb/k-diffusion
2022-09-11 18:00:40 -07:00
Bryce
3bdf2dc3ec feature: tile mode
from https://github.com/replicate/cog-stable-diffusion/compare/main...TomMoore515:material_stable_diffusion:main
2022-09-11 13:56:41 -07:00
Bryce
0bb5b6b345 perf: performance optimizations from Doggettx
https://github.com/CompVis/stable-diffusion/compare/main...Doggettx:stable-diffusion:autocast-improvements#
https://www.reddit.com/r/StableDiffusion/comments/xalaws/test_update_for_less_memory_usage_and_higher/
2022-09-11 03:08:51 -07:00
Bryce
910b7b4180 refactor: simplify structure 2022-09-11 00:59:03 -07:00
Bryce
f1b1e1c1c8 feature: add nsfw image filter 2022-09-11 00:35:57 -07:00
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
2022-09-10 23:27:22 -07:00
Bryce
f782fac570 feature: image prompts 2022-09-08 21:30:20 -07:00
Bryce
0835b2db16 first commit 2022-09-07 20:59:30 -07:00