Commit Graph

2551 Commits

Author SHA1 Message Date
Lincoln Stein
6bc11bfd3f
Test installer (#1618)
* test linux install

* try removing http from parsed requirements

* pip install confirmed working on linux

* ready for linux testing

- rebuilt py3.10-linux-x86_64-cuda-reqs.txt to include pypatchmatch
  dependency.
- point install.sh and install.bat to test-installer branch.

* Updates MPS reqs

* detect broken readline history files

* fix download.pytorch.org URL

* Test installer (Win 11) (#1620)

Co-authored-by: Cyrus Chan <cyruswkc@hku.hk>

* Test installer (MacOS 13.0.1 w/ torch==1.12.0) (#1621)

* Test installer (Win 11)

* Test installer (MacOS 13.0.1 w/ torch==1.12.0)

Co-authored-by: Cyrus Chan <cyruswkc@hku.hk>

* change sourceball to development for testing

* Test installer (MacOS 13.0.1 w/ torch==1.12.1 & torchvision==1.13.1) (#1622)

* Test installer (Win 11)

* Test installer (MacOS 13.0.1 w/ torch==1.12.0)

* Test installer (MacOS 13.0.1 w/ torch==1.12.1 & torchvision==1.13.1)

Co-authored-by: Cyrus Chan <cyruswkc@hku.hk>

Co-authored-by: psychedelicious <4822129+psychedelicious@users.noreply.github.com>
Co-authored-by: Cyrus Chan <82143712+cyruschan360@users.noreply.github.com>
Co-authored-by: Cyrus Chan <cyruswkc@hku.hk>
2022-11-29 15:05:43 -05:00
Matthias Wild
5897e511f1
Debloat-docker (#1612)
* debloat Dockerfile
- less options more but more userfriendly
- better Entrypoint to simulate CLI usage
- without command the container still starts the web-host

* debloat build.sh

* better syntax in run.sh

* update Docker docs
- fix description of VOLUMENAME
- update run script example to reflect new entrypoint
2022-11-29 10:04:03 -05:00
Matthias Wild
f43b767b87
update index.md (#1609)
- comment out non existing link
- fix indention
- add seperator between feature categories
2022-11-29 10:02:55 -05:00
psychedelicious
61cc41aa3f
Fixes for #1604 (#1605)
* Converts ESRGAN image input to RGB

- Also adds typing for image input.
- Partially resolves #1604

* ensure there are unmasked pixels before color matching

Co-authored-by: Kyle Schouviller <kyle0654@hotmail.com>
2022-11-29 09:34:38 -05:00
Lincoln Stein
40c3ab0181
revert to older version of list_models() (#1611)
This restores the correct behavior of list_models() and quenches
the bug of list_models() returning a single model entry named "name".

I have not investigated what was wrong with the new version, but I
think it may have to do with changes to the behavior in dict.update()
2022-11-29 08:54:39 -05:00
Damian Stewart
8999a5564b
make concepts library work with Web UI (#1608)
## The concepts library now works with the Web UI

This PR makes it possible to include a Hugging Face concepts library
<style-or-subject-trigger> in the WebUI prompts. The metadata seems to
be correctly handled.
2022-11-29 12:20:05 +01:00
Lincoln Stein
8423be539b
tweak setup and environment files for linux & pypatchmatch (#1580)
* tweak setup and environment files for linux & pypatchmatch

- Downgrade python requirements to 3.9 because 3.10 is not supported
  on Ubuntu 20.04 LTS (widely-used distro)
- Use our github pypatchmatch 0.1.3 in order to install Makefile
  where it needs to be.
- Restored "-e ." as the last install step on pip installs. Hopefully
  this will not trigger the high-CPU hang we've previously experienced.

* keep windows on basicsr 1.4.1

* keep windows on basicsr 1.4.1

* bump pypatchmatch requirement to 0.1.4

- This brings in a version of pypatchmatch that will gracefully
  handle internet connection not available at startup time.
- Also refactors and simplifies the handling of gfpgan's basicsr requirement
  across various platforms.
2022-11-28 20:22:31 -05:00
Lincoln Stein
6cc56043e2
documentation enhancements (#1603)
- Add documentation for the Hugging Face concepts library and TI embedding.

- Fixup index.md to point to each of the feature documentation files,
  including ones that are pending.
2022-11-28 18:48:56 -05:00
Lincoln Stein
62cda009dd make concepts library work with Web UI
This PR makes it possible to include a Hugging Face concepts library
<style-or-subject-trigger> in the WebUI prompt. The metadata seems
to be correctly handled.
2022-11-28 23:44:41 +00:00
Damian Stewart
45e51bac9a
Fix #1599 by relaxing the match_trigger regex (#1601)
* Fix #1599 by relaxing the `match_trigger` regex

Also simplify logic and reduce duplication.

* restrict trigger regex again (but not so far)
2022-11-28 17:58:52 -05:00
Lincoln Stein
a514f9b236
add a --no-patchmatch option to disable patchmatch loading (#1598)
This feature was added to prevent the CI Macintosh tests from erroring
out when patchmatch is unable to retrieve its shared library from
github assets.
2022-11-28 16:29:52 -05:00
psychedelicious
90b21db86c
Adds psychedelicious to statement of values signature (#1602) 2022-11-28 15:49:04 -05:00
Damian Stewart
bc44ab786c
Bug Fix: Model import fixes (#1566)
These bug fixes address issues #1546 and #1547 .
2022-11-28 21:46:27 +01:00
Damian Stewart
281a2e3ecb
make the docstring more readable and improve the list_models logic (fixes #1539) (#1594) 2022-11-28 21:20:56 +01:00
Lincoln Stein
84cd96decf set readline root to ROOTDIR for model import 2022-11-28 18:34:42 +00:00
Lincoln Stein
a3121b8137 !model_import autocompletes in ROOTDIR 2022-11-28 17:44:32 +00:00
Matthias Wild
3f6d0fb7da
update dockerfile (#1551)
* update dockerfile

* remove not existing file from .dockerignore

* remove bloat and unecesary step
also use --no-cache-dir for pip install
image is now close to 2GB

* make Dockerfile a variable

* set base image to `ubuntu:22.10`

* add build-essential

* link outputs folder for persistence

* update tag variable

* update docs

* fix not customizeable build args, add reqs output
2022-11-28 18:20:25 +01:00
Lincoln Stein
08ef4d62e9
add statement of values (#1584)
* this adds the Statement of Values

Google doc source = https://docs.google.com/document/d/1-PrUKDJcxy8OyNGc8CyiHhv2VgLvjt7LRGlEpbg1nmQ/edit?usp=sharing

* Fix heading

* Update InvokeAI_Statement_of_Values.md

* Update InvokeAI_Statement_of_Values.md

* Update InvokeAI_Statement_of_Values.md

* Update InvokeAI_Statement_of_Values.md

* Update InvokeAI_Statement_of_Values.md

* add keturn and mauwii to the team member list

* Fix punctuation

* this adds the Statement of Values

Google doc source = https://docs.google.com/document/d/1-PrUKDJcxy8OyNGc8CyiHhv2VgLvjt7LRGlEpbg1nmQ/edit?usp=sharing

* add keturn and mauwii to the team member list

* fix formating
- make sub bullets use * (decide to all use - or *)
- indent sub bullets
Sorry, first only looked at the code version and found this only after
looking at the markdown rendered version

* use multiparagraph numbered sections

* Break up Statement Of Values as per comments on #1584

* remove duplicated word, reduce vagueness

it's important not to overstate how many artists we are consulting.

* fix typo (sorry blessedcoolant)

Co-authored-by: mauwii <Mauwii@outlook.de>
Co-authored-by: damian <git@damianstewart.com>
2022-11-28 11:00:43 -05:00
Lincoln Stein
81cb7fd1b7
Merge branch 'development' into model-import-fixes 2022-11-28 09:28:14 -05:00
devops117
7c658c6d76
model_cache.py: fix list_models
Signed-off-by: devops117 <55235206+devops117@users.noreply.github.com>
2022-11-28 19:20:38 +05:30
DevOps117
495104e941
Merge branch 'invoke-ai:development' into development 2022-11-28 19:14:31 +05:30
Lincoln Stein
1e1f871ee1
Embedding merging (#1526)
* add whole <style token> to vocab for concept library embeddings

* add ability to load multiple concept .bin files

* make --log_tokenization respect custom tokens

* start working on concept downloading system

* preliminary support for dynamic loading and merging of multiple embedded models

- The embedding_manager is now enhanced with ldm.invoke.concepts_lib,
  which handles dynamic downloading and caching of embedded models from
  the Hugging Face concepts library (https://huggingface.co/sd-concepts-library)

- Downloading of a embedded model is triggered by the presence of one or more
  <concept> tags in the prompt.

- Once the embedded model is downloaded, its trigger phrase will be loaded
  into the embedding manager and the prompt's <concept> tag will be replaced
  with the <trigger_phrase>

- The downloaded model stays on disk for fast loading later.

- The CLI autocomplete will complete partial <concept> tags for you. Type a
  '<' and hit tab to get all ~700 concepts.

BUGS AND LIMITATIONS:

- MODEL NAME VS TRIGGER PHRASE

  You must use the name of the concept embed model from the SD
  library, and not the trigger phrase itself. Usually these are the
  same, but not always. For example, the model named "hoi4-leaders"
  corresponds to the trigger "<HOI4-Leader>"

  One reason for this design choice is that there is no apparent
  constraint on the uniqueness of the trigger phrases and one trigger
  phrase may map onto multiple models. So we use the model name
  instead.

  The second reason is that there is no way I know of to search
  Hugging Face for models with certain trigger phrases. So we'd have
  to download all 700 models to index the phrases.

  The problem this presents is that this may confuse users, who will
  want to reuse prompts from distributions that use the trigger phrase
  directly. Usually this will work, but not always.

- WON'T WORK ON A FIREWALLED SYSTEM

  If the host running IAI has no internet connection, it can't
  download the concept libraries. I will add a script that allows
  users to preload a list of concept models.

- BUG IN PROMPT REPLACEMENT WHEN MODEL NOT FOUND

  There's a small bug that occurs when the user provides an invalid
  model name. The <concept> gets replaced with <None> in the prompt.

* fix loading .pt embeddings; allow multi-vector embeddings; warn on dupes

* simplify replacement logic and remove cuda assumption

* download list of concepts from hugging face

* remove misleading customization of '*' placeholder

the existing code as-is did not do anything; unclear what it was supposed to do.

the obvious alternative -- setting using 'placeholder_strings' instead of
'placeholder_tokens' to match model.params.personalization_config.params.placeholder_strings --
caused a crash. i think this is because the passed string also needed to be handed over
on init of the PersonalizedBase as the 'placeholder_token' argument.
this is weird config dict magic and i don't want to touch it. put a
breakpoint in personalzied.py line 116 (top of PersonalizedBase.__init__) if
you want to have a crack at it yourself.

* address all the issues raised by damian0815 in review of PR #1526

* actually resize the token_embeddings

* multiple improvements to the concept loader based on code reviews

1. Activated the --embedding_directory option (alias --embedding_path)
   to load a single embedding or an entire directory of embeddings at
   startup time.

2. Can turn off automatic loading of embeddings using --no-embeddings.

3. Embedding checkpoints are scanned with the pickle scanner.

4. More informative error messages when a concept can't be loaded due
   either to a 404 not found error or a network error.

* autocomplete terms end with ">" now

* fix startup error and network unreachable

1. If the .invokeai file does not contain the --root and --outdir options,
  invoke.py will now fix it.

2. Catch and handle network problems when downloading hugging face textual
   inversion concepts.

* fix misformatted error string

Co-authored-by: Damian Stewart <d@damianstewart.com>
2022-11-28 02:40:24 -05:00
Lincoln Stein
30c5a0b067
Interactive configuration (#1517)
* Update scripts/configure_invokeai.py

prevent crash if output exists

Co-authored-by: psychedelicious <4822129+psychedelicious@users.noreply.github.com>

* implement changes requested by reviews

* default to correct root and output directory on Windows systems

- Previously the script was relying on the readline buffer editing
  feature to set up the correct default. But this feature doesn't
  exist on windows.

- This commit detects when user typed return with an empty directory
  value and replaces with the default directory.

* improved readability of directory choices

* Update scripts/configure_invokeai.py

Co-authored-by: psychedelicious <4822129+psychedelicious@users.noreply.github.com>

* better error reporting at startup

- If user tries to run the script outside of the repo or runtime directory,
  a more informative message will appear explaining the problem.

Co-authored-by: psychedelicious <4822129+psychedelicious@users.noreply.github.com>
2022-11-27 21:29:56 -05:00
Kyle Schouviller
9f02595ef2 Fixes outpainting with resized inpaint size 2022-11-27 22:24:15 +13:00
Matthias Wild
b101334b4e
Merge branch 'development' into model-import-fixes 2022-11-27 08:26:05 +01:00
Matthias Wild
0608d259dd
move requirements-mkdocs.txt to docs folder (#1575)
* move requirements-mkdocs.txt to docs folder

* update copyright
2022-11-27 07:59:56 +01:00
Matthias Wild
12eff0dd42
Update-requirements and test-invoke-pip workflow (#1574)
* update requirements files

* update test-invoke-pip workflow
2022-11-27 03:43:04 +01:00
Matthias Wild
939164eaa7
Merge branch 'development' into model-import-fixes 2022-11-27 01:30:43 +01:00
mauwii
f2d2a49977 disable checks for python 3.9 2022-11-26 17:43:09 -05:00
mauwii
37535f5897 fix output path for Archive results 2022-11-26 17:43:09 -05:00
mauwii
e5646dee27 also set fail-fast to it's default (true)
in this way the whole action fails if one job fails
this should unblock the runners!!!
2022-11-26 17:43:09 -05:00
mauwii
d5011efaa1 fix model cache path 2022-11-26 17:43:09 -05:00
Lincoln Stein
74487a95a9
Merge branch 'development' into model-import-fixes 2022-11-26 16:54:21 -05:00
Lincoln Stein
a50f4da9d1
install frontend/dist into package directory (#1554)
- When invokeai installed with `pip install .`, the frontend will be in
the venv directory under invokeai.
- When invokeai installed with `pip install -e .`, the frontend will be
in the source repo. -invoke_ai_web_sever.py will look in both places
using relative
  addressing.
2022-11-26 16:21:00 -05:00
Lincoln Stein
4ae1df5b5e
Merge branch 'development' into backend-can-find-frontend 2022-11-26 14:01:23 -05:00
Lincoln Stein
7f3ba16cd2 Revert "make the docstring more readable and improve the list_models logic"
This reverts commit 248068fe5d.
2022-11-26 13:38:20 -05:00
Lincoln Stein
7a0438586c
Merge branch 'development' into model-import-fixes 2022-11-26 10:18:49 -05:00
Lincoln Stein
9adaf8f8ad prevent "!switch state gets confused if model switching fails"
- If !switch were to fail on a particular model, then generate got
  confused and wouldn't try again until you switch to a different working
  model and back again.

- This commit fixes and closes #1547
2022-11-26 15:15:10 +00:00
Lincoln Stein
a341297b0c stop crash on !import_models call on model inside rootdir
- addresses bug report #1546
2022-11-26 14:58:22 +00:00
psychedelicious
9e0504abe5 Builds fresh bundle 2022-11-27 03:35:49 +13:00
psychedelicious
3131edb255 Fixes canvas dimensions not setting on first load 2022-11-27 03:35:49 +13:00
blessedcoolant
b0697bc4ff Fix desktop mode being broken with new versions of flaskwebgui 2022-11-27 03:35:49 +13:00
psychedelicious
1e9121c8d6 Builds fresh bundle 2022-11-27 03:35:49 +13:00
psychedelicious
916e795c26 Adds gallery drag and drop to img2img/canvas 2022-11-27 03:35:49 +13:00
psychedelicious
3aebe754fa Fixes unnecessary canvas scaling 2022-11-27 03:35:49 +13:00
psychedelicious
3f0cfaac4a Builds fresh bundle 2022-11-27 03:35:49 +13:00
psychedelicious
a3a0a87f55 Fixes canvas failing to scale on first run 2022-11-27 03:35:49 +13:00
psychedelicious
f5e8ffe7b4 Builds fresh bundle 2022-11-27 03:35:49 +13:00
psychedelicious
404d81f6fd Fixes shouldShowStagingImage not resetting to true on commit 2022-11-27 03:35:49 +13:00
psychedelicious
c7864f8a6d Fixes bug with clear mask and history 2022-11-27 03:35:49 +13:00