Commit Graph

2294 Commits

Author SHA1 Message Date
f33df25830 address all review comments; needs testing 2022-11-18 15:25:23 -05:00
3a5a8ceba5 Merge branch 'create-invokeai-run-directory' of github.com:/invoke-ai/InvokeAI into create-invokeai-run-directory 2022-11-18 19:35:45 +00:00
a1e5f17d1e realesrgan and facexlib now download models to correct directory
- fix issue in which both realesrgan and facexlib were downloading
  weight files to source directory

- cleaned up status reporting in load_models.py
2022-11-18 19:35:13 +00:00
303431be89 move CLI into its own module 2022-11-18 19:35:10 +00:00
8e9f80cc97 web server runs off runtime directory now 2022-11-18 19:34:28 +00:00
3ad598761c support for wheel building; webserver broken 2022-11-18 19:34:28 +00:00
b4eaf8b751 fix (unified installer): various fixes (#1506)
This list makes it look like there's lot going on for a single commit,
but the changes are actually pretty small

- 'install'/'invoke' scripts:
  - use venv's 'activate' script instead of hacking PATH
- 'deactivate' before exiting, so we don't leave a confusing environment
hanging around
- 'setup.py':
- make 'install_requires" an accurate list of our direct dependencies,
as it should be
  - add more info/details for eventual use in pypi
- 'invoke' scripts: "developer console" invocation simplified/better
logging (it's now *much* more obvious from inspection what the
"developer console" actually *is*)
- 'requirements.in':
- move 'clipseg' package out of installer and into requirements where it
should be
- bump/pin 'accelerate' package to 0.14.0 to bypass torch 1.13 SIGKILL
issue on Windows (prep for when we decide to upgrade)
- pin 'torch' as well as 'torchvision', to reduce pip-compile's
confusion
- notebooks: delete unused/deprecated notebook installer

Signed-off-by: Ben Alkov <ben.alkov@gmail.com>
2022-11-18 16:54:00 +01:00
fa608efa11 move CLI into its own module 2022-11-18 06:48:42 +00:00
e9d319bfde ensure web server works with legacy runtime directory 2022-11-18 06:48:14 +00:00
561721aef7 web server runs off runtime directory now 2022-11-18 06:10:52 +00:00
891c0f21d5 web server now observes --root option 2022-11-18 05:00:02 +00:00
8973ce7d47 support for wheel building; webserver broken 2022-11-18 03:21:07 +00:00
51c283ba56 fix(install): various fixes
- 'install'/'invoke' scripts: use venv 'activate' script
- 'setup.py':
  - make  'install_requires" accurate
  - add more details for eventual use in pypi
- 'invoke' scripts: "developer" console invocation simplified/better logging
- requirements:
  - move 'clipseg' package out of installer and into requirements where it should be
  - bump/pin 'accelerate' package to 0.14.0 to bypass torch 1.13 SIGKILL issue on Windows (prep for when we decide to upgrade)
- 'requirements.in': pin torch as well to reduce pip-compile's confusion
- notebooks: delete unused/deprecated notebook installer

Signed-off-by: Ben Alkov <ben.alkov@gmail.com>
2022-11-17 16:35:24 -05:00
7d262fc158 Fix macOS install.sh by patching sysconfig (#1488)
On macOS, patch python sysconfig just before creating the venv so that
extensions (greenlet & grpcio) can build.

Ref https://github.com/indygreg/python-build-standalone/issues/103, in
particular the solution from @alecthomas posted here:
https://github.com/indygreg/python-build-standalone/issues/103#issuecomment-1234942425

To use: checkout, cd into `installer`, run `create_installers.sh`, copy
`InvokeAI-mac.zip` into an empty folder outside of your existing
invokeAI install, unzip it and run `install.sh`.
2022-11-17 22:34:23 +01:00
fdb16000ab add module __init__ files for backend 2022-11-17 19:54:28 +00:00
f62cc7db9d add a ~/.invokeai file the first time we load
- If there is not already a `.invokeai` file in the user's home directory
  the first time invoke.py runs, it will create an empty one with comments
  showing how to customize it.
2022-11-17 10:15:05 -05:00
9fa3e28dd4 Fixed Google Colab requirements URL
Signed-off-by: slashtechno <77907286+slashtechno@users.noreply.github.com>
2022-11-17 10:14:43 -05:00
9200b26f21 Merge branch 'development' into create-invokeai-run-directory 2022-11-16 23:10:46 -05:00
d998b2f806 Add picklescan to env files 2022-11-16 23:02:35 -05:00
ac8a7ff70b Unpin picklescan req and cleanup 2022-11-16 23:02:35 -05:00
2d6e0baa87 Add Model Scanning 2022-11-16 23:02:35 -05:00
58f65d49b6 Fixed Google Colab requirements URL
Signed-off-by: slashtechno <77907286+slashtechno@users.noreply.github.com>
2022-11-16 22:31:18 -05:00
c212b74990 add code of conduct 2022-11-16 21:40:36 -05:00
0352979a8b Added documentation about --embiggen_strength 2022-11-16 11:55:45 -05:00
70bd61d616 Fixed opt.embiggen_strength again 2022-11-16 11:55:45 -05:00
f2a6985c78 Added --embiggen_strength option 2022-11-16 11:55:45 -05:00
fe5a581313 allow images to be saved into invokeai run directory
- This fixes an issue in which generated images were not being saved
  into the ~/invokeai/outputs directory, but were instead being stored
  to a relative './outputs/img_samples' path as before.

- Note that if you specify a relative directory in the --outdir argument,
  it will now be interpreted as relative to the invokeai run directory.
  You will need to provide an absolute pathname in order to save the
  outputs outside this directory.

- Also found and fixed a minor problem in which commands with syntax
  errors were not being stored to the CLI command history.
2022-11-15 20:33:58 +00:00
2ec9792f50 fix clipseg model loading
- This fixes the clipseg loading code so that it looks in the root directory
  for the model.

- It also adds several __init__.py files needed to allow InvokeAI to be
  installed without the -e (editable) flag. This lets you delete the
  source code directory after installation.
2022-11-15 19:17:14 +00:00
a4204abfce This commit separates the InvokeAI source code from end-user files
- preload_models.py has been renamed load_models.py. I've left a
  shell legacy version with the previous name to avoid breaking any
  code.

- The load_models.py script now takes an optional --root argument,
  which points to an install directory for the models, scripts, config
  files, and the default outputs directory. In the future, the
  embeddings manager directory will also be stored here.

- If no --root is provided, and no init file or environment variable
  is present, load_models.py will install to '.' by default, which is
  the current behavior. (This has *not* been tested thoroughly.)

- The location of the root directory is stored in the file .invokeai
  in the user's home directory ($HOME on Linux/Mac, or HOMEPATH on
  windows). The load_models.py script creates this file if it
  does not already exist.

- invoke.py and load_models.py use the following search path to find
  the install directory:

  1. Contents of the environment variable INVOKEAI_ROOT
  2. The --root=XXXXX option in ~/.invokeai
  3. The --root option passed on the script command line.
  4. As a last gasp, the currently working directory (".")

    Running `python scripts/load_models.py --root ~/invokeai`  will
    create a directory structured like this (shortened for clarity):

    ~/invokeai
    ├── configs
    │   ├── models.yaml
    │   └── stable-diffusion
    │       ├── v1-finetune.yaml
    │       ├── v1-finetune_style.yaml
    │       ├── v1-inference.yaml
    │       ├── v1-inpainting-inference.yaml
    │       └── v1-m1-finetune.yaml
    ├── models
    │   ├── CompVis
    │   ├── bert-base-uncased
    │   ├── clipseg
    │   ├── codeformer
    │   ├── gfpgan
    │   ├── ldm
    │   │   └── stable-diffusion-v1
    │   │       ├── sd-v1-5-inpainting.ckpt
    │   │       └── vae-ft-mse-840000-ema-pruned.ckpt
    │   └── openai
    ├── outputs
    └── scripts
	├── dream.py
	├── images2prompt.py
	├── invoke.py
	├── legacy_api.py
	├── load_models.py
	├── merge_embeddings.py
	├── orig_scripts
	│   ├── download_first_stages.sh
	│   ├── train_searcher.py
	│   └── txt2img.py
	├── preload_models.py
	└── sd-metadata.py

1. You can now run invoke.py anywhere! Just copy it to one of your
   bin directories, or put the ~/invokeai/scripts onto your PATH.

2. git pulls will no longer fight with you over models.yaml

3. It keeps end users out of the source code repo and will create
   a path for us to do installs from invokeai.tar.gz.
2022-11-15 18:39:31 +00:00
274b276133 model paths fixed, codeformer needs attention 2022-11-15 18:39:31 +00:00
7707bc7818 patch python sysconfig so that extensions (greenlet & grpcio) can build 2022-11-15 18:41:58 +01:00
e5edd025d6 Fixing Dead Link
I believe this is what you meant to link?
2022-11-14 17:34:51 -05:00
4c035ad4ae update test-tube version requirements to match yanl files, partitally fixes pip install build on macOS 2022-11-14 17:34:10 -05:00
e9090bca8f make @mauwii codeowner for the CI workflows 2022-11-14 12:45:15 -05:00
398a9bc0c6 fix incorrect bounding-box calculation in ImageResizer
- Under some circumstances, the image resizer was fitting
  the wrong dimension to the user-provided bounding box
  when an init image provided.
- Closes #1470.
2022-11-14 17:41:02 +00:00
38b9658c15 adding troubleshooting tips to the newer doc 2022-11-14 15:32:22 +00:00
29e229b409 adding troubleshooting tips to the newer doc 2022-11-14 10:31:19 -05:00
f04d1bab21 Merge branch 'development' into sync-dev-with-main 2022-11-13 21:51:17 +00:00
c23efb8e2b change installer download repo to main.tar.gz 2022-11-13 21:49:09 +00:00
5604d3c447 documentation hot fixes
- changes pointers to installation instructions from README
- Adds the changelog for the 2.1.3 release
2022-11-13 21:46:54 +00:00
93cdb476d9 change installer download repo to main.tar.gz v2.1.3p1 2022-11-13 16:44:21 -05:00
206101f59d revert initializer words for embeddings 2022-11-13 15:47:28 -05:00
1305e7a56c documentation hot fixes
- changes pointers to installation instructions from README
- Adds the changelog for the 2.1.3 release
2022-11-13 10:18:28 -05:00
58edf262e4 Fix CWD being removed from path again. Refixes #723 again
Weirdly, I'm not even on a Mac or using a special Python distro.  Just
plain old Debian stable and a plain old venv.
2022-11-13 09:58:42 -05:00
23348dcd3f sync dev to main 2022-11-13 13:47:26 +00:00
9bf6013fdd refactor(cross_attention_control): remove outer CrossAttentionControl class (#1459)
I was working on attention control in #1384, started making a few
changes to improve the typing and make it easier to work with. Then the
whitespace changes touched so many lines it seemed worth separating out
these refactoring operations to this PR so they don't get mixed up with
other functional changes.

It would be helpful to merge this to `development` before continuing
work on attention control in #1384

The github diff isn't good at showing these together since they changed
whitespace on so many lines. It may be easier to review by looking at
the individual commits, and/or toggling the "hide whitespace
differences" option in the view.
2022-11-13 14:20:18 +01:00
fd67df9447 Remove gfpgan_dir
+ Update GFPGAN Model Path Defaults
>  Update them to match the new file heirarchy
v2.1.3
2022-11-13 00:27:56 +00:00
1d11e06e6f Remove gfpgan_dir
+ Update GFPGAN Model Path Defaults
>  Update them to match the new file heirarchy
2022-11-12 19:24:11 -05:00
45e5053d06 added assets back 2022-11-13 00:23:51 +00:00
9c5999ede1 added caveats to use of installer script 2022-11-12 20:02:01 +00:00