(config) rename all mentions of scripts/configure_invokeai.py to the new invokeai-configure command

This commit is contained in:
Eugene Brodsky 2023-01-28 17:23:44 -05:00
parent abe4e1ea91
commit 34e0d7aaa8
12 changed files with 37 additions and 42 deletions

View File

@ -136,7 +136,7 @@ mixture of both using any of the accepted command switch formats:
# InvokeAI initialization file # InvokeAI initialization file
# This is the InvokeAI initialization file, which contains command-line default values. # This is the InvokeAI initialization file, which contains command-line default values.
# Feel free to edit. If anything goes wrong, you can re-initialize this file by deleting # Feel free to edit. If anything goes wrong, you can re-initialize this file by deleting
# or renaming it and then running configure_invokeai.py again. # or renaming it and then running invokeai-configure again.
# The --root option below points to the folder in which InvokeAI stores its models, configs and outputs. # The --root option below points to the folder in which InvokeAI stores its models, configs and outputs.
--root="/Users/mauwii/invokeai" --root="/Users/mauwii/invokeai"

View File

@ -51,7 +51,7 @@ You can also combine styles and concepts:
If you used an installer to install InvokeAI, you may have already set a HuggingFace token. If you used an installer to install InvokeAI, you may have already set a HuggingFace token.
If you skipped this step, you can: If you skipped this step, you can:
- run the InvokeAI configuration script again (if you used a manual installer): `scripts/configure_invokeai.py` - run the InvokeAI configuration script again (if you used a manual installer): `invokeai-configure`
- set one of the `HUGGINGFACE_TOKEN` or `HUGGING_FACE_HUB_TOKEN` environment variables to contain your token - set one of the `HUGGINGFACE_TOKEN` or `HUGGING_FACE_HUB_TOKEN` environment variables to contain your token
Finally, if you already used any HuggingFace library on your computer, you might already have a token Finally, if you already used any HuggingFace library on your computer, you might already have a token

View File

@ -120,7 +120,7 @@ A number of caveats:
(`--iterations`) argument. (`--iterations`) argument.
3. Your results will be _much_ better if you use the `inpaint-1.5` model 3. Your results will be _much_ better if you use the `inpaint-1.5` model
released by runwayML and installed by default by `scripts/configure_invokeai.py`. released by runwayML and installed by default by `invokeai-configure`.
This model was trained specifically to harmoniously fill in image gaps. The This model was trained specifically to harmoniously fill in image gaps. The
standard model will work as well, but you may notice color discontinuities at standard model will work as well, but you may notice color discontinuities at
the border. the border.

View File

@ -28,11 +28,11 @@ should "just work" without further intervention. Simply pass the `--upscale`
the popup in the Web GUI. the popup in the Web GUI.
**GFPGAN** requires a series of downloadable model files to work. These are **GFPGAN** requires a series of downloadable model files to work. These are
loaded when you run `scripts/configure_invokeai.py`. If GFPAN is failing with an loaded when you run `invokeai-configure`. If GFPAN is failing with an
error, please run the following from the InvokeAI directory: error, please run the following from the InvokeAI directory:
```bash ```bash
python scripts/configure_invokeai.py invokeai-configure
``` ```
If you do not run this script in advance, the GFPGAN module will attempt to If you do not run this script in advance, the GFPGAN module will attempt to
@ -106,7 +106,7 @@ This repo also allows you to perform face restoration using
[CodeFormer](https://github.com/sczhou/CodeFormer). [CodeFormer](https://github.com/sczhou/CodeFormer).
In order to setup CodeFormer to work, you need to download the models like with In order to setup CodeFormer to work, you need to download the models like with
GFPGAN. You can do this either by running `configure_invokeai.py` or by manually GFPGAN. You can do this either by running `invokeai-configure` or by manually
downloading the downloading the
[model file](https://github.com/sczhou/CodeFormer/releases/download/v0.1.0/codeformer.pth) [model file](https://github.com/sczhou/CodeFormer/releases/download/v0.1.0/codeformer.pth)
and saving it to `ldm/invoke/restoration/codeformer/weights` folder. and saving it to `ldm/invoke/restoration/codeformer/weights` folder.

View File

@ -177,8 +177,7 @@ version of InvokeAI with the option to upgrade to experimental versions later.
minutes and nothing is happening, you can interrupt the script with ^C. You minutes and nothing is happening, you can interrupt the script with ^C. You
may restart it and it will pick up where it left off. may restart it and it will pick up where it left off.
10. After installation completes, the installer will launch a script called 10. After installation completes, the installer will launch the configuration script, which will guide you through the first-time process
`configure_invokeai.py`, which will guide you through the first-time process
of selecting one or more Stable Diffusion model weights files, downloading of selecting one or more Stable Diffusion model weights files, downloading
and configuring them. We provide a list of popular models that InvokeAI and configuring them. We provide a list of popular models that InvokeAI
performs well with. However, you can add more weight files later on using performs well with. However, you can add more weight files later on using
@ -227,7 +226,7 @@ version of InvokeAI with the option to upgrade to experimental versions later.
`invokeai\invokeai.init`. It contains a variety of examples that you can `invokeai\invokeai.init`. It contains a variety of examples that you can
follow to add and modify launch options. follow to add and modify launch options.
!!! warning "The `invokeai` directory contains the `invoke` application, its !!! warning "The `invokeai` directory contains the `invokeai` application, its
configuration files, the model weight files, and outputs of image generation. configuration files, the model weight files, and outputs of image generation.
Once InvokeAI is installed, do not move or remove this directory." Once InvokeAI is installed, do not move or remove this directory."
@ -253,18 +252,18 @@ will bring InvokeAI up to date with the latest libraries.
### Corrupted configuration file ### Corrupted configuration file
Everything seems to install ok, but `invoke` complains of a corrupted Everything seems to install ok, but `invokeai` complains of a corrupted
configuration file and goes back into the configuration process (asking you to configuration file and goes back into the configuration process (asking you to
download models, etc), but this doesn't fix the problem. download models, etc), but this doesn't fix the problem.
This issue is often caused by a misconfigured configuration directive in the This issue is often caused by a misconfigured configuration directive in the
`invokeai\invokeai.init` initialization file that contains startup settings. The `invokeai\invokeai.init` initialization file that contains startup settings. The
easiest way to fix the problem is to move the file out of the way and re-run easiest way to fix the problem is to move the file out of the way and re-run
`configure_invokeai.py`. Enter the developer's console (option 3 of the launcher `invokeai-configure`. Enter the developer's console (option 3 of the launcher
script) and run this command: script) and run this command:
```cmd ```cmd
configure_invokeai.py --root=. invokeai-configure --root=.
``` ```
Note the dot (.) after `--root`. It is part of the command. Note the dot (.) after `--root`. It is part of the command.
@ -289,15 +288,15 @@ hours, and often much sooner.
This distribution is changing rapidly, and we add new features on a daily basis. This distribution is changing rapidly, and we add new features on a daily basis.
To update to the latest released version (recommended), run the `update.sh` To update to the latest released version (recommended), run the `update.sh`
(Linux/Mac) or `update.bat` (Windows) scripts. This will fetch the latest (Linux/Mac) or `update.bat` (Windows) scripts. This will fetch the latest
release and re-run the `configure_invokeai` script to download any updated release and re-run the `invokeai-configure` script to download any updated
models files that may be needed. You can also use this to add additional models models files that may be needed. You can also use this to add additional models
that you did not select at installation time. that you did not select at installation time.
You can now close the developer console and run `invoke` as before. If you get You can now close the developer console and run `invoke` as before. If you get
complaints about missing models, then you may need to do the additional step of complaints about missing models, then you may need to do the additional step of
running `configure_invokeai.py`. This happens relatively infrequently. To do running `invokeai-configure`. This happens relatively infrequently. To do
this, simply open up the developer's console again and type this, simply open up the developer's console again and type
`python scripts/configure_invokeai.py`. `invokeai-configure`.
You may also use the `update` script to install any selected version of You may also use the `update` script to install any selected version of
InvokeAI. From https://github.com/invoke-ai/InvokeAI, navigate to the zip file InvokeAI. From https://github.com/invoke-ai/InvokeAI, navigate to the zip file

View File

@ -135,10 +135,10 @@ manager, please follow these steps:
default to `invokeai` in your home directory. default to `invokeai` in your home directory.
```bash ```bash
configure_invokeai --root_dir ~/Programs/invokeai invokeai-configure --root_dir ~/Programs/invokeai
``` ```
The script `configure_invokeai.py` will interactively guide you through the The script `invokeai-configure` will interactively guide you through the
process of downloading and installing the weights files needed for InvokeAI. process of downloading and installing the weights files needed for InvokeAI.
Note that the main Stable Diffusion weights file is protected by a license Note that the main Stable Diffusion weights file is protected by a license
agreement that you have to agree to. The script will list the steps you need agreement that you have to agree to. The script will list the steps you need
@ -149,10 +149,10 @@ manager, please follow these steps:
If you get an error message about a module not being installed, check that If you get an error message about a module not being installed, check that
the `invokeai` environment is active and if not, repeat step 5. the `invokeai` environment is active and if not, repeat step 5.
Note that `configure_invokeai.py` and `invoke.py` should be installed Note that `invokeai-configure` and `invoke.py` should be installed
under your virtual environment directory and the system should find them under your virtual environment directory and the system should find them
on the PATH. If this isn't working on your system, you can call the on the PATH. If this isn't working on your system, you can call the
scripts directory using `python scripts/configure_invokeai.py` and scripts directory using `python scripts/invokeai-configure` and
`python scripts/invoke.py`. `python scripts/invoke.py`.
!!! tip !!! tip
@ -353,10 +353,10 @@ manager, please follow these steps:
default to `invokeai` in your home directory. default to `invokeai` in your home directory.
```bash ```bash
python scripts/configure_invokeai.py --root_dir ~/Programs/invokeai python scripts/invokeai-configure --root_dir ~/Programs/invokeai
``` ```
The script `configure_invokeai.py` will interactively guide you through the The script `invokeai-configure` will interactively guide you through the
process of downloading and installing the weights files needed for InvokeAI. process of downloading and installing the weights files needed for InvokeAI.
Note that the main Stable Diffusion weights file is protected by a license Note that the main Stable Diffusion weights file is protected by a license
agreement that you have to agree to. The script will list the steps you need agreement that you have to agree to. The script will list the steps you need
@ -367,7 +367,7 @@ manager, please follow these steps:
If you get an error message about a module not being installed, check that If you get an error message about a module not being installed, check that
the `invokeai` environment is active and if not, repeat step 5. the `invokeai` environment is active and if not, repeat step 5.
Note that `configure_invokeai.py` and `invoke.py` should be Note that `invokeai-configure` and `invoke.py` should be
installed under your conda directory and the system should find installed under your conda directory and the system should find
them automatically on the PATH. If this isn't working on your them automatically on the PATH. If this isn't working on your
system, you can call the scripts directory using `python system, you can call the scripts directory using `python
@ -468,7 +468,7 @@ greatest version, launch the Anaconda window, enter `InvokeAI` and type:
```bash ```bash
git pull git pull
conda env update conda env update
python scripts/configure_invokeai.py --skip-sd-weights #optional python scripts/invokeai-configure --skip-sd-weights #optional
``` ```
This will bring your local copy into sync with the remote one. The last step may This will bring your local copy into sync with the remote one. The last step may
@ -518,7 +518,7 @@ brew install llvm
If brew config has Clang installed, update to the latest llvm and try creating the environment again. If brew config has Clang installed, update to the latest llvm and try creating the environment again.
#### `configure_invokeai.py` or `invoke.py` crashes at an early stage #### `invokeai-configure` or `invoke.py` crashes at an early stage
This is usually due to an incomplete or corrupted Conda install. Make sure you This is usually due to an incomplete or corrupted Conda install. Make sure you
have linked to the correct environment file and run `conda update` again. have linked to the correct environment file and run `conda update` again.

View File

@ -56,7 +56,7 @@ unofficial Stable Diffusion models and where they can be obtained.
There are three ways to install weights files: There are three ways to install weights files:
1. During InvokeAI installation, the `configure_invokeai.py` script can download 1. During InvokeAI installation, the `invokeai-configure` script can download
them for you. them for you.
2. You can use the command-line interface (CLI) to import, configure and modify 2. You can use the command-line interface (CLI) to import, configure and modify
@ -65,13 +65,13 @@ There are three ways to install weights files:
3. You can download the files manually and add the appropriate entries to 3. You can download the files manually and add the appropriate entries to
`models.yaml`. `models.yaml`.
### Installation via `configure_invokeai.py` ### Installation via `invokeai-configure`
This is the most automatic way. Run `scripts/configure_invokeai.py` from the This is the most automatic way. Run `invokeai-configure` from the
console. It will ask you to select which models to download and lead you through console. It will ask you to select which models to download and lead you through
the steps of setting up a Hugging Face account if you haven't done so already. the steps of setting up a Hugging Face account if you haven't done so already.
To start, run `python scripts/configure_invokeai.py` from within the InvokeAI: To start, run `invokeai-configure` from within the InvokeAI:
directory directory
!!! example "" !!! example ""
@ -244,7 +244,7 @@ arabian-nights-1.0:
| arabian-nights-1.0 | This is the name of the model that you will refer to from within the CLI and the WebGUI when you need to load and use the model. | | arabian-nights-1.0 | This is the name of the model that you will refer to from within the CLI and the WebGUI when you need to load and use the model. |
| description | Any description that you want to add to the model to remind you what it is. | | description | Any description that you want to add to the model to remind you what it is. |
| weights | Relative path to the .ckpt weights file for this model. | | weights | Relative path to the .ckpt weights file for this model. |
| config | This is the confusingly-named configuration file for the model itself. Use `./configs/stable-diffusion/v1-inference.yaml` unless the model happens to need a custom configuration, in which case the place you downloaded it from will tell you what to use instead. For example, the runwayML custom inpainting model requires the file `configs/stable-diffusion/v1-inpainting-inference.yaml`. This is already inclued in the InvokeAI distribution and is configured automatically for you by the `configure_invokeai.py` script. | | config | This is the confusingly-named configuration file for the model itself. Use `./configs/stable-diffusion/v1-inference.yaml` unless the model happens to need a custom configuration, in which case the place you downloaded it from will tell you what to use instead. For example, the runwayML custom inpainting model requires the file `configs/stable-diffusion/v1-inpainting-inference.yaml`. This is already inclued in the InvokeAI distribution and is configured automatically for you by the `invokeai-configure` script. |
| vae | If you want to add a VAE file to the model, then enter its path here. | | vae | If you want to add a VAE file to the model, then enter its path here. |
| width, height | This is the width and height of the images used to train the model. Currently they are always 512 and 512. | | width, height | This is the width and height of the images used to train the model. Currently they are always 512 and 512. |

View File

@ -28,8 +28,8 @@ IF /I "%restore%" == "1" (
echo Starting model merging script.. echo Starting model merging script..
python .venv\Scripts\merge_models --gui %* python .venv\Scripts\merge_models --gui %*
) ELSE IF /I "%restore%" == "5" ( ) ELSE IF /I "%restore%" == "5" (
echo Running configure_invokeai.py... echo Running invokeai-configure...
python .venv\Scripts\configure_invokeai %* python .venv\Scripts\invokeai-configure %*
) ELSE IF /I "%restore%" == "6" ( ) ELSE IF /I "%restore%" == "6" (
echo Developer Console echo Developer Console
echo Python command is: echo Python command is:

View File

@ -24,7 +24,7 @@ if "%arg%" neq "" (
set INVOKE_AI_SRC="https://github.com/invoke-ai/InvokeAI/archive/!INVOKE_AI_VERSION!.zip" set INVOKE_AI_SRC="https://github.com/invoke-ai/InvokeAI/archive/!INVOKE_AI_VERSION!.zip"
set INVOKE_AI_DEP=https://raw.githubusercontent.com/invoke-ai/InvokeAI/!INVOKE_AI_VERSION!/environments-and-requirements/requirements-base.txt set INVOKE_AI_DEP=https://raw.githubusercontent.com/invoke-ai/InvokeAI/!INVOKE_AI_VERSION!/environments-and-requirements/requirements-base.txt
set INVOKE_AI_MODELS=https://raw.githubusercontent.com/invoke-ai/InvokeAI/$INVOKE_AI_VERSION/configs/INITIAL_MODELS.yaml set INVOKE_AI_MODELS=https://raw.githubusercontent.com/invoke-ai/InvokeAI/$INVOKE_AI_VERSION/configs/INITIAL_MODELS.yaml
call curl -I "%INVOKE_AI_DEP%" -fs >.tmp.out call curl -I "%INVOKE_AI_DEP%" -fs >.tmp.out
if %errorlevel% neq 0 ( if %errorlevel% neq 0 (
echo '!INVOKE_AI_VERSION!' is not a known branch name or tag. Please check the version and try again. echo '!INVOKE_AI_VERSION!' is not a known branch name or tag. Please check the version and try again.
@ -57,7 +57,7 @@ if %errorlevel% neq 0 (
exit /b exit /b
) )
@rem call .venv\Scripts\python .venv\Scripts\configure_invokeai.py --root=. @rem call .venv\Scripts\invokeai-configure --root=.
@rem if %errorlevel% neq 0 ( @rem if %errorlevel% neq 0 (
@rem echo Configuration InvokeAI failed. See https://invoke-ai.github.io/InvokeAI/installation/INSTALL_AUTOMATED/#troubleshooting for suggestions. @rem echo Configuration InvokeAI failed. See https://invoke-ai.github.io/InvokeAI/installation/INSTALL_AUTOMATED/#troubleshooting for suggestions.
@ -70,4 +70,3 @@ echo InvokeAI has been updated to '%INVOKE_AI_VERSION%'
echo "Press any key to continue" echo "Press any key to continue"
pause pause
endlocal endlocal

View File

@ -15,7 +15,7 @@ if [ $# -ge 1 ] && [ "${1:0:2}" == "-h" ]; then
fi fi
INVOKE_AI_VERSION=${1:-latest} INVOKE_AI_VERSION=${1:-latest}
INVOKE_AI_SRC="https://github.com/invoke-ai/InvokeAI/archive/$INVOKE_AI_VERSION.zip" INVOKE_AI_SRC="https://github.com/invoke-ai/InvokeAI/archive/$INVOKE_AI_VERSION.zip"
INVOKE_AI_DEP=https://raw.githubusercontent.com/invoke-ai/InvokeAI/$INVOKE_AI_VERSION/environments-and-requirements/requirements-base.txt INVOKE_AI_DEP=https://raw.githubusercontent.com/invoke-ai/InvokeAI/$INVOKE_AI_VERSION/environments-and-requirements/requirements-base.txt
INVOKE_AI_MODELS=https://raw.githubusercontent.com/invoke-ai/InvokeAI/$INVOKE_AI_VERSION/configs/INITIAL_MODELS.yaml INVOKE_AI_MODELS=https://raw.githubusercontent.com/invoke-ai/InvokeAI/$INVOKE_AI_VERSION/configs/INITIAL_MODELS.yaml
@ -56,6 +56,3 @@ _err_exit $? "The pip program failed to install InvokeAI's requirements."
_err_exit $? "The pip program failed to install InvokeAI." _err_exit $? "The pip program failed to install InvokeAI."
echo InvokeAI updated to \'$INVOKE_AI_VERSION\' echo InvokeAI updated to \'$INVOKE_AI_VERSION\'
# ./.venv/bin/python .venv/bin/configure_invokeai.py --root .
# _err_exit $? "The configure script failed to run successfully."

View File

@ -1103,11 +1103,11 @@ def write_commands(opt, file_path:str, outfilepath:str):
def report_model_error(opt:Namespace, e:Exception): def report_model_error(opt:Namespace, e:Exception):
print(f'** An error occurred while attempting to initialize the model: "{str(e)}"') print(f'** An error occurred while attempting to initialize the model: "{str(e)}"')
print('** This can be caused by a missing or corrupted models file, and can sometimes be fixed by (re)installing the models.') print('** This can be caused by a missing or corrupted models file, and can sometimes be fixed by (re)installing the models.')
response = input('Do you want to run configure_invokeai.py to select and/or reinstall models? [y] ') response = input('Do you want to run invokeai-configure script to select and/or reinstall models? [y] ')
if response.startswith(('n','N')): if response.startswith(('n','N')):
return return
print('configure_invokeai is launching....\n') print('invokeai-configure is launching....\n')
# Match arguments that were set on the CLI # Match arguments that were set on the CLI
# only the arguments accepted by the configuration script are parsed # only the arguments accepted by the configuration script are parsed
@ -1115,7 +1115,7 @@ def report_model_error(opt:Namespace, e:Exception):
config = ["--config", opt.conf] if opt.conf is not None else [] config = ["--config", opt.conf] if opt.conf is not None else []
yes_to_all = os.environ.get('INVOKE_MODEL_RECONFIGURE') yes_to_all = os.environ.get('INVOKE_MODEL_RECONFIGURE')
previous_args = sys.argv previous_args = sys.argv
sys.argv = [ 'configure_invokeai' ] sys.argv = [ 'invokeai-configure' ]
sys.argv.extend(root_dir) sys.argv.extend(root_dir)
sys.argv.extend(config) sys.argv.extend(config)
if yes_to_all is not None: if yes_to_all is not None:

View File

@ -752,7 +752,7 @@ def initialize_rootdir(root:str,yes_to_all:bool=False):
f.write(f'''# InvokeAI initialization file f.write(f'''# InvokeAI initialization file
# This is the InvokeAI initialization file, which contains command-line default values. # This is the InvokeAI initialization file, which contains command-line default values.
# Feel free to edit. If anything goes wrong, you can re-initialize this file by deleting # Feel free to edit. If anything goes wrong, you can re-initialize this file by deleting
# or renaming it and then running configure_invokeai.py again. # or renaming it and then running invokeai-configure again.
# the --outdir option controls the default location of image files. # the --outdir option controls the default location of image files.
--outdir="{outputs}" --outdir="{outputs}"