Commit Graph

2521 Commits

Author SHA1 Message Date
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
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
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
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
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
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
psychedelicious
9568ac66e0 Improves scaled bbox display logic 2022-11-27 03:35:49 +13:00
psychedelicious
d4280bbaaa Adds auto-scaling for inpaint size 2022-11-27 03:35:49 +13:00
psychedelicious
46a5fd67ed Adds inpaint size (as scale bounding box) to UI 2022-11-27 03:35:49 +13:00
psychedelicious
b93336dbf9 Bug fix for inpaint size 2022-11-27 03:35:49 +13:00
psychedelicious
9fe9301762 Add inpaint size options to inpaint at a larger size than the actual inpaint image, then scale back down for recombination 2022-11-27 03:35:49 +13:00
psychedelicious
7f1b95fbda Removes force_outpaint param 2022-11-27 03:35:49 +13:00
psychedelicious
52c79fa097 Lints 2022-11-27 03:35:49 +13:00
psychedelicious
62ac725ba9 Adds brush color alpha hotkey 2022-11-27 03:35:49 +13:00
psychedelicious
db188cd3c3 Color picker does not overwrite user-selected alpha 2022-11-27 03:35:49 +13:00
psychedelicious
e67ef4aec2 Committing color picker color changes tool to brush 2022-11-27 03:35:49 +13:00
psychedelicious
473869b8ed Fixes mask brush preview color 2022-11-27 03:35:49 +13:00
psychedelicious
c8c1b3e217 Simplifies Accordion
Prep for adding reset buttons for each section
2022-11-27 03:35:49 +13:00
psychedelicious
fcd3ef1f98 Fixes invoke hotkey not working in input fields 2022-11-27 03:35:49 +13:00
psychedelicious
a7f11a8c09 Fixes variation params not set correctly when recalled 2022-11-27 03:35:49 +13:00
psychedelicious
318426b67a Changes color picker preview to circles 2022-11-27 03:35:49 +13:00
psychedelicious
6f3e99efc3 Un-floors cursor position 2022-11-27 03:35:49 +13:00
psychedelicious
7515bcfe78 Fixes iterations being disabled when seed random & variations are off 2022-11-27 03:35:49 +13:00
psychedelicious
8d0ef022eb Lints & builds fresh bundle 2022-11-27 03:35:49 +13:00
psychedelicious
9f1c1cf2e6 Adds color picker 2022-11-27 03:35:49 +13:00
psychedelicious
d44112c209 Builds fresh bundle 2022-11-27 03:35:49 +13:00
psychedelicious
b31f90c0bd Fixes postprocessing not being disabled when clicking use all 2022-11-27 03:35:49 +13:00
psychedelicious
344cdf0ade Renames "Threshold" > "Noise Threshold" 2022-11-27 03:35:49 +13:00
psychedelicious
500bde5b0e Fixes missing threshold and perlin parameters in metadata viewer 2022-11-27 03:35:49 +13:00
psychedelicious
df03927ec6 Fixes img2img attempting inpaint when init image has transparency 2022-11-27 03:35:49 +13:00
psychedelicious
419f670f86 Updates npm dependencies 2022-11-27 03:35:49 +13:00
psychedelicious
30dc9220c1 Fixes crash on cancel with intermediates enabled, fixes #1416 2022-11-27 03:35:49 +13:00