- Loader is renamed `configure_invokeai.py`, but `preload_models.py` is retained
(as a shell) for backward compatibility
- At startup, if no runtime root directory exists and no `.invokeai` startup file is
present, user will be prompted to select the runtime and outputs directories.
- Also expanded the number of initial models offered to the user to include the
most "liked" ones from HuggingFace, including the two trinart models, the
PaperCut model, and the VoxelArt model.
- Created a configuration file for initial models to be offered to the user, at
configs/INITIAL_MODELS.yaml
- dangling debug messages in several files, introduced during
testing of the external root directory
- these need to be removed before they are interpreted as errors by users
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>
- '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>
- 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.
- 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.
- 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.
- 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.
- Under some circumstances, the image resizer was fitting
the wrong dimension to the user-provided bounding box
when an init image provided.
- Closes#1470.
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.