Commit Graph

163 Commits

Author SHA1 Message Date
spezialspezial
e332529fbd Prevent outcrop error when no callback is supplied 2022-11-02 16:33:35 -04:00
damian0815
3f5bf7ac44 report full size for fast latents and update conversion matrix for v1.5 2022-11-01 22:39:27 -04:00
spezialspezial
b45e632f23 Option to directly invert the grayscale heatmap - fix 2022-11-01 22:18:00 -04:00
spezialspezial
2bdd738f03 Update txt2mask.py 2022-11-01 17:39:56 -04:00
spezialspezial
7782760541 Option to directly invert the grayscale heatmap
Theoretically less work inverting the image while it's small but I can't measure a significant difference. Though, handy option to have in some cases.
2022-11-01 17:39:56 -04:00
Lincoln Stein
942a202945 fix model_cache memory management issues 2022-11-01 17:22:48 -04:00
Lincoln Stein
89da42ad79 Merge branch 'pin-options-panel' of https://github.com/psychedelicious/stable-diffusion into psychedelicious-pin-options-panel
- from PR #1301
2022-10-31 09:37:13 -04:00
Damian at mba
ced9c83e96 various prompting fixes 2022-10-31 09:34:56 -04:00
Lincoln Stein
80f2cfe3e3 set default max_models to 2 internally as well as as arg 2022-10-31 09:05:38 -04:00
Lincoln Stein
dc556cb1a7 add max_load_models parameter for model cache control
- ldm.generate.Generator() now takes an argument named `max_load_models`.
  This is an integer that limits the model cache size. When the cache
  reaches the limit, it will start purging older models from cache.

- CLI takes an argument --max_load_models, default to 2. This will keep
  one model in GPU and the other in CPU and switch back and forth
  quickly.

- To not cache models at all, pass --max_load_models=1
2022-10-31 08:55:53 -04:00
Lincoln Stein
0c8f0e3386 add max_load_models parameter for model cache control
- ldm.generate.Generator() now takes an argument named `max_load_models`.
  This is an integer that limits the model cache size. When the cache
  reaches the limit, it will start purging older models from cache.

- CLI takes an argument --max_load_models, default to 2. This will keep
  one model in GPU and the other in CPU and switch back and forth
  quickly.

- To not cache models at all, pass --max_load_models=1
2022-10-31 08:53:16 -04:00
Lincoln Stein
98f03053ba hard-code strength to 0.9 during outcropping 2022-10-31 07:52:34 -04:00
Lincoln Stein
59ef2471e1 improve outcropping performance
- applied inpainting parameters recommended by @kyle0654
- results are aesthetically pleasing
- Closes #1319
2022-10-31 07:52:26 -04:00
Lincoln Stein
ce7651944d adapt outcrop.py to use new outpainting code
- unfortunately it does not look as good as the old code
  which just used plain inpainting.
2022-10-31 07:52:13 -04:00
Lincoln Stein
3cdfedc649 hard-code strength to 0.9 during outcropping 2022-10-31 01:54:32 -04:00
Lincoln Stein
531f596bd1 improve outcropping performance
- applied inpainting parameters recommended by @kyle0654
- results are aesthetically pleasing
- Closes #1319
2022-10-31 01:37:12 -04:00
Lincoln Stein
8683426041 add seamless to metadata 2022-10-31 00:40:30 -04:00
Lincoln Stein
582fee6c3a adapt outcrop.py to use new outpainting code
- unfortunately it does not look as good as the old code
  which just used plain inpainting.
2022-10-31 00:20:53 -04:00
Lincoln Stein
23d54ee69e fix mps crash with safety checker 2022-10-30 16:54:06 -04:00
Lincoln Stein
f70af7afb9 remove debug image gen from outcrop 2022-10-30 12:19:43 -04:00
Lincoln Stein
e7368d7231 preload_models interactively downloads sd model files 2022-10-30 12:19:05 -04:00
Lincoln Stein
13f26a99b8 documentation and usability fixes 2022-10-29 10:37:38 -04:00
Lincoln Stein
ef68a419f1 preload_models.py script downloads the weight files
- user can select which weight files to download using huggingface cache
- user must log in to huggingface, generate an access token, and accept
  license terms the very first time this is run. After that, everything
  works automatically.
- added placeholder for docs for installing models
- also got rid of unused config files. hopefully they weren't needed
  for textual inversion, but I don't think so.
2022-10-29 01:02:45 -04:00
Kyle Schouviller
43de16cae4 Don't try to tile fill if image doesn't have an alpha layer 2022-10-29 04:25:27 +11:00
Damian at mba
864d080502 handle all unicode characters 2022-10-28 10:39:12 -04:00
Lincoln Stein
05b8de5300 fix --hires to support inpainting model 2022-10-27 23:12:21 -04:00
Lincoln Stein
387f796ebe
Merge branch 'development' into development 2022-10-27 23:04:04 -04:00
Lincoln Stein
362b234cd1 fix long-standing issue with metadata retrieval
The Args object would crap out when trying to retrieve metadata from
an image file that did not contain InvokeAI-generated metadata, such
as a JPG. This corrects that and returns dummy values (seed of zero,
prompt of '') to avoid downstream breakage.
2022-10-27 22:43:34 -04:00
Lincoln Stein
2115874587 resolve conflicts with outpainting implementation 2022-10-27 18:06:38 -04:00
Lincoln Stein
cd5141f3d1 fix issues with outpaint merge 2022-10-27 18:02:08 -04:00
Lincoln Stein
b815aa2130
Merge branch 'development' into outpaint 2022-10-27 17:17:34 -04:00
Lincoln Stein
1200fbd3bd add threshold for switchover from Karras to LDM noise schedule 2022-10-27 17:07:50 -04:00
Damian at mba
245cf606a3 be more forgiving about prompts with ((words)) 2022-10-27 22:36:33 +02:00
Damian at mba
e20108878c fix attention weight inside .swap() 2022-10-27 21:17:23 +02:00
Damian at mba
f73d349dfe refactor hybrid and cross attention control codepaths for readability 2022-10-27 19:40:37 +02:00
Damian at mba
dc86fc92ce fix crash parsing empty prompt "" 2022-10-27 19:01:54 +02:00
Lincoln Stein
aa785c3ef1 ready for merge after documentation added 2022-10-27 11:55:00 -04:00
Lincoln Stein
0eb07b7488 Merge branch 'outpaint' of https://github.com/Kyle0654/InvokeAI into Kyle0654-outpaint 2022-10-27 09:16:40 -04:00
Lincoln Stein
16e7cbdb38 tweaks to documentation and call signature for advanced prompting 2022-10-27 08:30:09 -04:00
Damian at mba
135c62f1a4 fix issue with hot-dog, improve () suppression 2022-10-27 07:37:48 -04:00
Lincoln Stein
799dc6d0df acceptable integration of new prompting system and inpainting
This was a difficult merge because both PR #1108 and #1243 made
changes to obscure parts of the diffusion code.

- prompt weighting, merging and cross-attention working
  - cross-attention does not work with runwayML inpainting
    model, but weighting and merging are tested and working
- CLI command parsing code rewritten in order to get embedded
  quotes right
- --hires now works with runwayML inpainting
- --embiggen does not work with runwayML and will give an error
- Added an --invert option to invert masks applied to inpainting
- Updated documentation
2022-10-27 01:51:35 -04:00
Lincoln Stein
2daf187bdb working with 1.4, 1.5, not with inpainting 1.5 2022-10-26 18:25:48 -04:00
Lincoln Stein
9b7159720f resolve conflicts between PR #1108 and #1243 2022-10-26 15:37:24 -04:00
Kyle Schouviller
d05373d35a Force RGB for img2img 2022-10-26 12:12:08 -07:00
Kyle Schouviller
bd8bb8c80b Adding outpainting implementation (as part of inpaint). 2022-10-26 12:12:08 -07:00
Kyle Schouviller
dac1ab0a05 Better inpainting color-correction 2022-10-26 12:12:08 -07:00
Lincoln Stein
2f1c1e7695 Merge branch 'fix-prompts' of https://github.com/damian0815/InvokeAI into merge-prompt-and-inpaint-model 2022-10-26 08:50:55 -04:00
Lincoln Stein
2b6d78e436 minor cleanups
- remove --fnformat from canonicalized dream prompt arguments
  (not needed for image reproducibility)
- add -tm to canonicalized dream prompt arguments
  (definitely needed for image reproducibility)
2022-10-26 08:32:54 -04:00
Lincoln Stein
b1da13a984 minor cleanups
- change default model back to 1.4
- remove --fnformat from canonicalized dream prompt arguments
  (not needed for image reproducibility)
- add -tm to canonicalized dream prompt arguments
  (definitely needed for image reproducibility)
2022-10-26 08:29:56 -04:00
Lincoln Stein
906dafe3cd make variations work with inpainting model 2022-10-26 00:18:31 -04:00