Commit Graph

1214 Commits

Author SHA1 Message Date
Lincoln Stein
916f5bfbb2 gracefully recover from failed model load 2022-10-13 12:27:04 -04:00
Lincoln Stein
1c102c71fc final fixups to memory_cache
- fixed backwards calculation of minimum available memory
- only execute m.padding adjustment code once upon load
2022-10-12 15:56:06 -04:00
Lincoln Stein
aa6aa68753 proposed fix to work on mps systems 2022-10-12 11:08:27 -04:00
Lincoln Stein
b537e92789 move tokenizer into cpu cache as well 2022-10-12 03:03:29 -04:00
Lincoln Stein
7c06849c4d Merge branch 'model-switching' of github.com:invoke-ai/InvokeAI into model-switching 2022-10-12 02:39:57 -04:00
Lincoln Stein
488334710b enable fast switching between models in invoke.py
- This PR enables two new commands in the invoke.py script

 !models         -- list the available models and their cache status
 !switch <model> -- switch to the indicated model

Example:

 invoke> !models
   laion400m            not loaded  Latent Diffusion LAION400M model
   stable-diffusion-1.4     active  Stable Diffusion inference model version 1.4
   waifu-1.3                cached  Waifu anime model version 1.3
 invoke> !switch waifu-1.3
   >> Caching model stable-diffusion-1.4 in system RAM
   >> Retrieving model waifu-1.3 from system RAM cache

The name and descriptions of the models are taken from
`config/models.yaml`. A future enhancement to `model_cache.py` will be
to enable new model stanzas to be added to the file
programmatically. This will be useful for the WebGUI.

More details:

- Use fast switching algorithm described in PR #948
- Models are selected using their configuration stanza name
  given in models.yaml.
- To avoid filling up CPU RAM with cached models, this PR
  implements an LRU cache that monitors available CPU RAM.
- The caching code allows the minimum value of available RAM
  to be adjusted, but invoke.py does not currently have a
  command-line argument that allows you to set it. The
  minimum free RAM is arbitrarily set to 2 GB.
- Add optional description field to configs/models.yaml

Unrelated fixes:
- Added ">>" to CompViz model loading messages in order to make user experience
  more consistent.
- When generating an image greater than defaults, will only warn about possible
  VRAM filling the first time.
- Fixed bug that was causing help message to be printed twice. This involved
  moving the import line for the web backend into the section where it is
  called.

Coauthored by: @ArDiouscuros
2022-10-12 02:37:42 -04:00
Lincoln Stein
19341e95a6 enable fast switching between models in invoke.py
- This PR enables two new commands in the invoke.py script

 !models         -- list the available models and their cache status
 !switch <model> -- switch to the indicated model

Example:

 invoke> !models
   laion400m            not loaded  Latent Diffusion LAION400M model
   stable-diffusion-1.4     active  Stable Diffusion inference model version 1.4
   waifu-1.3                cached  Waifu anime model version 1.3
 invoke> !switch waifu-1.3
   >> Caching model stable-diffusion-1.4 in system RAM
   >> Retrieving model waifu-1.3 from system RAM cache

More details:

- Use fast switching algorithm described in PR #948
- Models are selected using their configuration stanza name
  given in models.yaml.
- To avoid filling up CPU RAM with cached models, this PR
  implements an LRU cache that monitors available CPU RAM.
- The caching code allows the minimum value of available RAM
  to be adjusted, but invoke.py does not currently have a
  command-line argument that allows you to set it. The
  minimum free RAM is arbitrarily set to 2 GB.
- Add optional description field to configs/models.yaml

Unrelated fixes:
- Added ">>" to CompViz model loading messages in order to make user experience
  more consistent.
- When generating an image greater than defaults, will only warn about possible
  VRAM filling the first time.
- Fixed bug that was causing help message to be printed twice. This involved
  moving the import line for the web backend into the section where it is
  called.
2022-10-12 02:19:12 -04:00
Lincoln Stein
b9e910b5f4 add mostly functional model caching module 2022-10-11 17:24:10 -04:00
blessedcoolant
06f542ed7a Update .gitignore 2022-10-11 16:28:48 +13:00
Will
9eff9e5752 update mac instructions to use invokeai for env name 2022-10-10 17:45:18 -04:00
psychedelicious
12413b0be6 Fix safari display:grid lag 2022-10-10 03:13:56 +02:00
Lincoln Stein
789714b0b1 fix references from lstein/stable-diffusion to invoke-ai/InvokeAI
- as per #989
2022-10-09 15:38:22 -04:00
Lincoln Stein
bb7629d2b8 fix environment-mac.yml as per #964 2022-10-09 15:34:19 -04:00
Lincoln Stein
c5344acb25 run make_schedule() if it hasn't already been called
- fixes #984
2022-10-09 15:30:23 -04:00
Lincoln Stein
6e2fd2affe rebuild frontend 2022-10-09 14:52:00 -04:00
Lincoln Stein
8faa06fb15 Merge branch 'main' into development
- this syncs documentation and code
2022-10-09 14:47:27 -04:00
Lincoln Stein
ce8c238ac4
final tweak to embedded screenshots in WEB.md 2022-10-09 11:45:16 -04:00
Lincoln Stein
f6c37e46e1
make initial screenshot even larger 2022-10-09 11:43:42 -04:00
Lincoln Stein
2d69efccef
fixup image sizes in WEB.md 2022-10-09 11:42:59 -04:00
Lincoln Stein
f9d2aafaeb
fix image links in documentation 2022-10-09 11:42:03 -04:00
Kent Keirsey
22514aec2e Minor CSS & Link Updates
Also updated dist files with new CSS
2022-10-09 11:40:16 -04:00
Lincoln Stein
5a22a83f4c add missing doc files 2022-10-09 11:38:39 -04:00
Lincoln Stein
b1d43eae46 almost ready for public release
- merged release-candidate-2
- fix up documentation
- add web tutorial
2022-10-09 11:37:00 -04:00
Marco Labarile
0b8cdb6964 Fix markdown typo in WEB.md 2022-10-09 08:57:14 -04:00
psychedelicious
aed5ad22fb Updates INSTALL_MAC.md 2022-10-09 08:49:29 -04:00
Jim Hays
dc9c16b93d Update references to lstein/stable-diffusion to invoke-ai/InvokeAI 2022-10-09 08:48:23 -04:00
rpagliuca
f6e858a548 Update README.md
Small writing error
2022-10-09 08:45:55 -04:00
Lincoln Stein
4c2db171ca Update INPAINTING.md
Changed Gimp instructions to indicate that partial transparency is better than full transparency.
2022-10-09 08:45:33 -04:00
Lincoln Stein
1255127e49 rebuild frontend 2022-10-09 08:37:51 -04:00
blessedcoolant
1cb74a6357 [WebUI] Masonry Layout for Gallery 2022-10-09 08:36:28 -04:00
psychedelicious
5e2b250426 Images grow to fit space in gallery 2022-10-09 08:36:17 -04:00
blessedcoolant
ad190cfbb2 Smaller Gallery Images 2022-10-09 08:36:03 -04:00
blessedcoolant
542ceb051b Rework Gallery DIsplay 2022-10-09 08:34:57 -04:00
blessedcoolant
3473669458 WebUI Bug Fixes & Tweaks 2022-10-09 08:33:18 -04:00
blessedcoolant
3170c83d8d [WebUI] Masonry Layout for Gallery 2022-10-09 08:32:06 -04:00
psychedelicious
3046dabde2 Images grow to fit space in gallery 2022-10-09 08:32:06 -04:00
blessedcoolant
1b02074fea Smaller Gallery Images 2022-10-09 08:32:06 -04:00
blessedcoolant
f15fd2c3d3 Rework Gallery DIsplay 2022-10-09 08:32:06 -04:00
blessedcoolant
081271d6a1 WebUI Bug Fixes & Tweaks 2022-10-09 08:32:06 -04:00
Peter Baylies
27f62999c9 * Fix for Perlin noise issue for cuda as well. 2022-10-09 08:24:02 -04:00
Peter Baylies
89d130edf4 * Fix for Perlin noise issue for cuda as well. 2022-10-09 08:23:23 -04:00
Lincoln Stein
31869885d9 enhance the in-line -h command help text
- the prompt argument comes before the optional arguments
- usage statement shows 'invoke>' rather than 'invoke.py'
- use pydoc pager to help display long help message
2022-10-08 13:55:05 -04:00
Lincoln Stein
4c026d9d92 enhance the in-line -h command help text
- the prompt argument comes before the optional arguments
- usage statement shows 'invoke>' rather than 'invoke.py'
- use pydoc pager to help display long help message
2022-10-08 13:53:56 -04:00
Any-Winter-4079
435231ef08 Get for external TI .bin files to work
Issue referenced in https://github.com/invoke-ai/InvokeAI/issues/980#issuecomment-1272162880
Users whose embeddings are trained on a non-regular num_vectors_per_token (e.g. 6), should update this value in their local repo, to get that embedding to work.
2022-10-08 13:18:19 -04:00
Any-Winter-4079
19a79caf41 Get for external TI .bin files to work
Issue referenced in https://github.com/invoke-ai/InvokeAI/issues/980#issuecomment-1272162880
Users whose embeddings are trained on a non-regular num_vectors_per_token (e.g. 6), should update this value in their local repo, to get that embedding to work.
2022-10-08 13:17:44 -04:00
David Burnett
7b095f8f97 add realesrgan to requirements.txt, remove nightie for torch and torchvision due to performance issues 2022-10-08 12:01:45 -04:00
psychedelicious
f5dfd5b0dc Fixes CORS handling 2022-10-08 11:57:18 -04:00
psychedelicious
9579a401b5 Fixes CORS handling 2022-10-08 11:56:38 -04:00
Lincoln Stein
47a97f7e97 rebuild front end 2022-10-08 11:50:25 -04:00
blessedcoolant
3c146ebf9e Fix Gallery being open by default 2022-10-08 11:47:11 -04:00