Commit Graph

2320 Commits

Author SHA1 Message Date
Kent Keirsey
4eed06903c Adding model edits (unstable/WIP) 2022-12-29 08:33:27 +13:00
blessedcoolant
79d577bff9 Model Manager Frontend Rebased 2022-12-29 08:33:27 +13:00
blessedcoolant
3521557541 Model Manager Backend Implementation 2022-12-29 08:33:27 +13:00
Artur
e66b1a685c
Update README.md (#2115)
Copyright (c) 2020 -> 2022

Co-authored-by: Lincoln Stein <lincoln.stein@gmail.com>
2022-12-25 16:41:11 +00:00
tomosuto
c351aa19eb
Update 020_INSTALL_MANUAL.md (#2093)
Fixed a description that was overflowing from the warning box
2022-12-25 02:02:50 +00:00
Artur
aa1f46820f
Update 020_INSTALL_MANUAL.md (#2114)
«git clone» step added for pip

Co-authored-by: Lincoln Stein <lincoln.stein@gmail.com>
2022-12-24 21:11:51 +00:00
blessedcoolant
1d34405f4f
[WebUI] Localization Support (#2050)
* Initial Localization Implementation

* Fix Initial Spinner

* Language Picker Dropdown

* RU Localization Update

Co-Authored-By: Artur <83028930+netsvetaev@users.noreply.github.com>

* Fixed localization breaking themes

* useUpdateTranslation Hook

To force trigger translations for data objects

* Localize Tab Data

* Localize Prompt Input & Current Image Buttons

* Localize Gallery & Bug FIxes

Fix a bug where the delete image from the context menu wasn't working. Removed tooltips that were broken as they don't work in context menu.

* Fix localization breaking in production

* Add Toast Localization Support

* Localize Unified Canvas

* Localize WIP Tabs

* Localize Hotkeys

* Localize Settings

* RU Localization Update

Co-Authored-By: Artur <83028930+netsvetaev@users.noreply.github.com>

* Add Support for Italian and Portuguese

* Localize Toasts

* Fix width of language picker items

* Localize Backend Messages

* Disable Debug Messages

* Add Support for French

* Fix missing localization for a string in the SettingsModal

* Disable French

* Styling updates to normalize text and accommodate other langs

* Add Portuguese Brazilian

* Fix Hotkey headers not being localized.

* Fix styling issue on models tag in Settings

* Fix Slider Styling to accommodate different languages

* Fix slider styling in light mode.

* Add German

* Add Italian

* Add Polish

* Update Italian

* Localized Frontend Build

* Updated RU Translations

* Fresh Build with updated RU changes

* Bug Fixes and Loc Updates

* Updated Frontend Build

* Fresh Build

Co-authored-by: Artur <83028930+netsvetaev@users.noreply.github.com>
2022-12-24 18:23:21 +00:00
Matthias Wild
f961e865f5
use uname -m instead of arch (#2110)
addressing #2105

Co-authored-by: Lincoln Stein <lincoln.stein@gmail.com>
2022-12-24 16:55:19 +00:00
Kent Keirsey
9eba6acb7f
Fix of Hires Fix on Img2Img tab (#2096)
* Fix of Hires Fix on Img2Img tab

Fixed linting issues

* Attempting to fix prettier workflow issues

* More Prettier Attempts

* Finally Fixed Prettier Issues

* Fix of Hires Fix on Img2Img tab

Fixed linting issues

* Attempting to fix prettier workflow issues

* More Prettier Attempts

* Finally Fixed Prettier Issues

* updated with useEffect

* Update to fix Prettier

* Update useEffect dependencies

* Fix dispatch dependency error from prettier

Co-authored-by: Lincoln Stein <lincoln.stein@gmail.com>
2022-12-24 10:56:40 -05:00
Lincoln Stein
e32dd1d703
[docs] Provide an example of reading prompts from a script (#2087)
* add example of using -from_file to read from a script

Addresses #1654, #473, #566, #1008 at least partially.

* fix bug in code example

* improve docs for !fetch and !replay

* enable rendering of images in GH WebUI
also fix indention in some bullet lists

Co-authored-by: mauwii <Mauwii@outlook.de>
2022-12-23 14:06:59 +00:00
tomosuto
bbbfea488d
Update 020_INSTALL_MANUAL.md (#2092)
The file name should be configure_invokeai.py
2022-12-23 04:58:40 +00:00
Lincoln Stein
c8a9848ad6
correct a crash in img2img under particular circumstances (#2088)
When using the inpainting model, the following sequence of events
would cause a predictable crash:

1. Use unified canvas to outcrop a portion of the image.
2. Accept outcropped image and import into img2img
3. Try any img2img operation

This closes #1596.

The crash was:

```
operands could not be broadcast together with shapes (320,512) (512,576)

Traceback (most recent call last):
  File "/data/lstein/InvokeAI/backend/invoke_ai_web_server.py", line 1125, in generate_images
    self.generate.prompt2image(
  File "/data/lstein/InvokeAI/ldm/generate.py", line 492, in prompt2image
    results = generator.generate(
  File "/data/lstein/InvokeAI/ldm/invoke/generator/base.py", line 98, in generate
    image = make_image(x_T)
  File "/data/lstein/InvokeAI/ldm/invoke/generator/omnibus.py", line 138, in make_image
    return self.sample_to_image(samples)
  File "/data/lstein/InvokeAI/ldm/invoke/generator/omnibus.py", line 173, in sample_to_image
    corrected_result = super(Img2Img, self).repaste_and_color_correct(gen_result, self.pil_image, self.pil_mask, self.mask_blur_radius)
  File "/data/lstein/InvokeAI/ldm/invoke/generator/base.py", line 148, in repaste_and_color_correct
    mask_pixels = init_a_pixels * init_mask_pixels > 0
ValueError: operands could not be broadcast together with shapes (320,512) (512,576)
```

This error was caused by the image and its mask not being of identical
size due to the outcropping operation. The ultimate cause of this
error has something to do with different code paths being followed in
the `inpaint` vs the `omnibus` modules.

Since omnibus will be obsoleted by diffusers, I have chosen just to
work around the problem rather than track it down to its source. The
only ill effect is that color correction will not be applied to the
first image created by `img2img` after applying the outcrop and
immediately importing into the img2img canvas. Since the inpainting
model has less of a color drift problem than the standard model, this
is unlikely to be problematic.
2022-12-22 14:53:23 +00:00
Eugene Brodsky
e88e274bf2
Add @ebr to Contributors (#2095)
* (docs) @ebr signs Statement of Values

* (docs) add @ebr to Contributors page
2022-12-21 14:33:08 -05:00
Lincoln Stein
cca8d14c79
defer patchmatch loading (#2039)
* defer patchmatch loading

Because of the way that patchmatch was loaded early at import time, it
was impossible to turn off the attempted loading with --no-patchmatch.

In addition, the patchmatch loading messages appear early on during
initialization, interfering with ability to print out the version
cleanly when --version provided to invoke script.

This commit creates a thin wrapper class for patch_match that is only
loaded when needed, solving both problems.

* create a singleton patchmatch object for use in inpainting

This creates a thin wrapper to patchmatch which loads the module
on demand, respecting the global "trypatchmatch" option.

* address 2d round of issues in PR 2039 comments

* Patchmatch->PatchMatch and misc cleanup
2022-12-20 15:32:35 -08:00
Kent Keirsey
464aafa862
Correct asset link (#2081)
* Correct asset link

Minor documentation fix to correct linked asset.

* fix switched graphics
also:
- add blanks before/after figure tag
  (makes the screenshot also appear in github)
- use a table in inpainting example to have the pics side by side

Co-authored-by: mauwii <Mauwii@outlook.de>
2022-12-20 17:29:54 +00:00
Lincoln Stein
6e98b5535d
add --version to invoke.py arguments (#2038)
* add --version to invoke.py arguments

This commit allows invoke.py to print out its name and version
number when given the --version argument. I had to move some
status messages around in order to make the output clean.

There is still an early message about initializing patchmatch
that interferes with a clean print of the version, and in fact the
--no-patchmatch argument is not doing anything. This will be the
subject of a subsequent PR.

* export APP_ID and APP_VERSION

Needed to support the web backend.
2022-12-20 15:14:28 +00:00
Eugene Brodsky
ab2972f320
Fix the configure script crash when no TTY is allocated (e.g. a container) (#2080)
* (config) avoid failure when huggingface token is not set

it is not required for model download, and we are handling the
saving of the token during huggingface authentication phase elsewhere.

* (config) safely print to non-tty terminals where width can not be determined
2022-12-20 03:52:58 +01:00
Matthias Wild
1ba40db361
optimize Dockerfile (#2036)
* remove build-essentials after opencv is built
also remo unecesarry python3-opencv dependencie (its already in venv)

* use branch name as tag

* leave pip and setuptools on the preinstalled vers.

* Rename Argument from WORKDIR to APPDIR

Co-authored-by: Lincoln Stein <lincoln.stein@gmail.com>
2022-12-19 23:53:19 +01:00
Damian Stewart
f69fc68e06
Revert "Don't crash CLI on exceptions (#2066)" (#2078)
This reverts commit 147834e99c.
2022-12-20 08:56:04 +13:00
Scott Lahteine
7d8d4bcafb
Global replace [ \t]+$, add "GB" (#1751)
* "GB"

* Replace [ \t]+$ global

Co-authored-by: Lincoln Stein <lincoln.stein@gmail.com>
2022-12-19 16:36:39 +00:00
Lincoln Stein
4fd97ceddd
remove redundant code line (#2068)
* remove redundant code line

install.bat was copying the requirements file into the install folder
twice, causing an error message on the second try. This fixes the
issue.

* add further improvements to installer

- Windows version will unzip to have requirements.txt already in
  the right location, to prevent problems when users try to run
  the .bat script from within a mounted read-only zip file manager.

- Do not assume that "pip" is on the path in either the .bat or shell
  versions of the update script.
2022-12-19 14:57:41 +00:00
Eugene Brodsky
ded49523cd (docs) update installer links as per some Discord reports 2022-12-18 22:32:33 -05:00
Eugene Brodsky
914e5fc4f8 (docs) update python install instructions for Ubuntu. Add documentation for installing OpenGL libraries on Linux. Fixes #1987 2022-12-18 22:32:33 -05:00
Eugene Brodsky
ab4d391a3a (docs) call out that the root volume needs at least 6GB of free space for pip cache. Fixes #2056 2022-12-18 22:32:33 -05:00
Matthias Wild
82f59829b8
set workflow PR triggers to filter PR-types (#2065)
* set workflow PR triggers to filter PR-types
- `review_requested`
- `ready_for_review`

* fail tests if draft pr

* add more types to test pr triggers

* remove unneeded condition

* readd condition

* leave PR-types default, only verify PRs to main
and fail for draft-PRs

* set types to cancel when converted to draft
2022-12-18 20:54:07 +00:00
Damian Stewart
147834e99c
Don't crash CLI on exceptions (#2066) 2022-12-18 16:28:47 +01:00
Eugene Brodsky
f41da11d66
Relax Huggingface login requirement during setup (#2046)
* (config) handle huggingface token more gracefully

* (docs) document HuggingFace token requirement for Concepts

* (cli) deprecate the --(no)-interactive CLI flag

It was previously only used to skip the SD weights download, and therefore
the prompt for Huggingface token (the "interactive" part).

Now that we don't need a Huggingface token
to download the SD weights at all, we can replace this flag with
"--skip-sd-weights", to clearly describe its purpose

The `--(no)-interactive` flag still functions the same, but shows a deprecation message

* (cli) fix emergency_model_reconfigure argument parsing

* (config) fix installation issues on systems with non-UTF8 locale

Co-authored-by: Matthias Wild <40327258+mauwii@users.noreply.github.com>
2022-12-18 10:44:50 +01:00
Eugene Brodsky
5c5454e4a5
(docs) add redirects for moved pages (#2063) 2022-12-18 08:04:58 +00:00
Shapor Naghibzadeh
dedbdeeafc Update scripts/configure_invokeai.py
Co-authored-by: Eugene Brodsky <ebr@users.noreply.github.com>
2022-12-18 01:21:47 -05:00
Shapor Naghibzadeh
d1770bff37 Accept --root_dir in addition to --root in configure_ivokeai.py to be consistent with the documentation in 020_INSTALL_MANUAL. 2022-12-18 01:21:47 -05:00
JPPhoto
20652620d9 Added compiled TS changes 2022-12-17 20:56:42 -05:00
Jonathan
51613525a4
Updated to pull threshold from an existing image even if 0 (#2051)
Addresses #2049 but not other cases where the stored value is 0 (e.g. perlin noise). This should be investigated more throughly.
2022-12-17 19:03:09 -05:00
blessedcoolant
dc39f8d6a7
Fix broken embedding variants (#2037) 2022-12-17 03:07:05 +00:00
Lincoln Stein
f1748d7017
avoid leaking data to HuggingFace (#2021)
Before making a concept download request to HuggingFace, the concepts
library module now checks the concept name against a downloaded list
of all the concepts currently known to HuggingFace.  If the requested
concept is not on the list, then no download request is made.
2022-12-16 16:50:02 +00:00
Lincoln Stein
de7abce464
add an argument that lets user specify folders to scan for weights (#1977)
* add an argument that lets user specify folders to scan for weights

This PR adds a `--weight_folders` argument to invoke.py. Using
argparse, it adds a "weight_folders" attribute to the Args object, and
can be used like this:

```
'''test.py'''
from ldm.invoke.args import Args

args = Args().parse_args()

for folder in args.weight_folders:
    print(folder)
```

Example output:

```
python test.py --weight_folders /tmp/weights /home/fred/invokeai/weights "./my folder with spaces/weight files"
/tmp/weights
/home/fred/invokeai/weights
./my folder with spaces/weight files
```

* change --weight_folders to --weight_dirs
2022-12-16 15:14:49 +00:00
Kaspar Emanuel
2aa5bb6aad
Auto-format frontend (#2009)
* Auto-format frontend

* Update lint-frontend GA workflow node and checkout

* Fix linter error in ThemeChanger

* Add a `on: pull_request` to lint-frontend workflow

Co-authored-by: Lincoln Stein <lincoln.stein@gmail.com>
2022-12-16 13:56:39 +01:00
Matthias Wild
c0c4d7ca69
update (docker-)build scripts, .dockerignore and add patchmatch (#1970)
* update build scripts and dockerignore
updates to build and run script:
- read repository name
- include flavor in container name
- read arch via arch command
- use latest tag instead of arch
- don't bindmount `$HOME/.huggingface`
- make sure HUGGINGFACE_TOKEN is set

updates to .dockerignore
- include environment-and-requirements
- exclude binary_installer
- exclude docker-build
- exclude docs

* disable push and pr triggers of cloud image
also disable pushing.

This was decided since:
- it is not multiarch useable
- the default image is already cloud aproved

* integrate patchmatch in container

* pin verisons of recently introduced dependencies

* remove now unecesarry part from build.sh
move huggingface token to run script, so it can download missing models

* move GPU_FLAGS to run script
since not needed at build time

* update env.sh

- read REPOSITORY_NAME from env if available
- add comment to explain the intension of this file
- remove unecesarry exports

* get rid of repository_name_lc

* capitalize variables

* update INSTALL_DOCKER with new variables

* add comments pointing to the docs

Co-authored-by: Lincoln Stein <lincoln.stein@gmail.com>
2022-12-16 13:53:37 +01:00
Eugene Brodsky
7d09d9da49
delete old 'server' package and the dependency_injector requirement (#2032)
fixes #1944
2022-12-16 06:28:16 -05:00
blessedcoolant
ffa54f4a35 Fix --config arg not being recognized 2022-12-16 18:29:47 +13:00
blessedcoolant
69cc0993f8
Add Embedding Parsing (#1973)
* Add Embedding Parsing

* Add Embedding Parsing

* Return token_dim in embedding_info

* fixes to handle other variants

1. Handle the case of a .bin file being mislabeled .pt (seen in the
wild at https://cyberes.github.io/stable-diffusion-textual-inversion-models/)

2. Handle the "broken" .pt files reported by https://github.com/invoke-ai/InvokeAI/issues/1829

3. When token name is not available, use the basename of the pt or bin file rather than the
   whole path.

fixes #1829

* remove whitespace

Co-authored-by: Lincoln Stein <lincoln.stein@gmail.com>
2022-12-15 17:26:36 -05:00
mauwii
1050f2726a update links with new filenames 2022-12-16 10:26:02 +13:00
Lincoln Stein
f7170e4156 improve installation documentation
1. Added a big fat warning to the Windows installer to tell user
   to install Visual C++ redistributable.

2. Added a bit fat warning to the automated installer doc to
   tell user the same thing.

3. Reordered entries on the table-of-contents sidebar for installation
   to prioritize the most important docs.

4. Moved older installation documentation into deprecated folder.

5. Moved developer-specific installation documentation into the
   developers folder.
2022-12-16 10:26:02 +13:00
mauwii
bfa8fed568 update site_name 2022-12-16 10:24:03 +13:00
mauwii
2923dfaed1 update index and changelog 2022-12-16 10:24:03 +13:00
zeptofine
0932b4affa Replace latest link
The link still points to 2.2.3 .
2022-12-16 10:22:44 +13:00
Kaspar Emanuel
0b10835269 Fix initial theme setting 2022-12-16 10:20:26 +13:00
Kaspar Emanuel
6e0f3475b4 Reduce frontend eslint warnings to 0 2022-12-16 10:18:45 +13:00
Kaspar Emanuel
9b9e276491 Add lint-frontend github actions workflow 2022-12-16 10:16:01 +13:00
Kaspar Emanuel
392c0725f3 Remove circular dependencies in frontend 2022-12-16 10:16:01 +13:00
wfng92
2a2f38a016
Correct timestep for img2img initial noise addition (#1946)
* Correct timestep for img2img initial noise addition

* apply fix to inpaint and txt2img2img as well

Co-authored-by: Lincoln Stein <lincoln.stein@gmail.com>
2022-12-15 15:59:19 -05:00