source installer improvements and documentation

- Source installer provides more context for what it is doing, and
  sends user to help/troubleshooting pages when something goes wrong.

- install.sh and install.bat are renamed to install.sh.in and install.bat.in
  to discourage users from running them from within the

- Documentation updated
This commit is contained in:
Lincoln Stein 2022-12-01 19:35:32 +00:00
parent eba31e7caf
commit 1b743f7d9b
22 changed files with 144 additions and 24 deletions

View File

@ -55,7 +55,7 @@ off the process.
named `install.bat` on Windows systems and `install.sh` on Linux and
Macintosh systems.
4. Alternatively, form the command line, run the shell script or .bat file:
4. Alternatively, from the command line, run the shell script or .bat file:
```cmd
C:\Documents\Linco> cd invokeAI
@ -66,6 +66,15 @@ off the process.
requirements including Conda, Git and Python, then download the current
InvokeAI code and install it along with its dependencies.
Be aware that some of the library download and install steps take a long time.
In particular, the `pytorch` package is quite large and often appears to get
"stuck" at 99.9%. Similarly, the `pip installing requirements` step may
appear to hang. Have patience and the installation step will eventually
resume. However, there are occasions when the library install does
legitimately get stuck. If you have been waiting for more than ten 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.
6. After installation completes, the installer will launch a script called
`configure_invokeai.py`, which will guide you through the first-time process of
selecting one or more Stable Diffusion model weights files, downloading and
@ -110,6 +119,71 @@ python scripts/invoke.py --web --max_load_models=3 \
These options are described in detail in the
[Command-Line Interface](../features/CLI.md) documentation.
## Troubleshooting
_Package dependency conflicts_ If you have previously installed
InvokeAI or another Stable Diffusion package, the installer may
occasionally pick up outdated libraries and either the installer or
`invoke` will fail with complaints out library conflicts. There are
two steps you can take to clear this problem. Both of these are done
from within the "developer's console", which you can get to by
launching `invoke.sh` (or `invoke.bat`) and selecting launch option
#3:
1. Remove the previous `invokeai` environment completely. From within
the developer's console, give the command `conda env remove -n
invokeai`. This will delete previous files installed by `invoke`.
Then exit from the developer's console and launch the script
`update.sh` (or `update.bat`). This will download the most recent
InvokeAI (including bug fixes) and reinstall the environment.
You should then be able to run `invoke.sh`/`invoke.bat`.
2. If this doesn't work, you can try cleaning your system's conda
cache. This is slightly more extreme, but won't interfere with
any other python-based programs installed on your computer.
From the developer's console, run the command `conda clean -a`
and answer "yes" to all prompts.
After this is done, run `update.sh` and try again as before.
_"Corrupted configuration file."__ Everything seems to install ok, but
`invoke` complains of a corrupted configuration file and goes calls
`configure_invokeai.py` to fix, but this doesn't fix the problem.
This issue is often caused by a misconfigured configuration directive
in the `.invokeai` initialization file that contains startup settings.
This can be corrected by fixing the offending line.
First find `.invokeai`. It is a small text file located in your home
directory, `~/.invokeai` on Mac and Linux systems, and `C:\Users\*your
name*\.invokeai` on Windows systems. Open it with a text editor
(e.g. Notepad on Windows, TextEdit on Macs, or `nano` on Linux)
and look for the lines starting with `--root` and `--outdir`.
An example is here:
```cmd
--root="/home/lstein/invokeai"
--outdir="/home/lstein/invokeai/outputs"
```
There should not be whitespace before or after the directory paths,
and the paths should not end with slashes:
```cmd
--root="/home/lstein/invokeai " # wrong! no whitespace here
--root="/home\lstein\invokeai\" # wrong! shouldn't end in a slash
```
Fix the problem with your text editor and save as a **plain text**
file. This should clear the issue.
_If none of these maneuvers fixes the problem_ then please report the
problem to the [InvokeAI
Issues](https://github.com/invoke-ai/InvokeAI/issues) section, or
visit our [Discord Server](https://discord.gg/ZmtBAhwWhy) for interactive assistance.
## Updating to newer versions
This section describes how to update InvokeAI to new versions of the software.

View File

@ -5,7 +5,31 @@ title: Overview
We offer several ways to install InvokeAI, each one suited to your
experience and preferences.
1. [Source code installer](INSTALL_SOURCE.md)
1. [InvokeAI binary installer](INSTALL_INVOKE.md)
This is a installer script that installs InvokeAI and all the
third party libraries it depends on. It includes access to a
"developer console" which will help us debug problems with you and
give you to access experimental features.
When a new InvokeAI release is available, you will run an `update`
script to download and install the new version. Intermediate versions
that contain experimental and possibly unstable features will not be
available.
This installer is designed for people who want the system to "just
work", don't have an interest in tinkering with it, and do not
care about upgrading to unreleased experimental features.
**Important Caveats**
- This script does not support AMD GPUs. For Linux AMD support,
please use the manual or source code installer methods.
- The tab autocomplete feature of the command-line client,
which completes commonly used filenames and commands, will
not work in this version. All Web UI functions are fully
operational, however.
2. [InvokeAI source code installer](INSTALL_SOURCE.md)
This is a script that will install Python, the Anaconda ("conda")
package manager, all of InvokeAI's its essential third party
@ -13,8 +37,17 @@ experience and preferences.
console" which will help us debug problems with you and give you
to access experimental features.
This method is recommended for individuals who are installing
InvokeAI for the first time.
When a new InvokeAI feature is available, even between releases,
you will be able to upgrade and try it out by running an `update`
script. This method is recommended for individuals who wish to
stay on the cutting edge of InvokeAI development and are not
afraid of occasional breakage.
**Important Caveats**
- This script is a bit cranky and occasionally hangs or times out,
forcing you to cancel and restart the script (it will pick up where
it left off). It also takes noticeably longer to run than the
binary installer.
2. [Manual Installation](INSTALL_MANUAL.md)

Binary file not shown.

View File

@ -5,7 +5,8 @@ cd "$(dirname "${BASH_SOURCE[0]}")"
# make the installer zip for linux and mac
rm -rf invokeAI
mkdir -p invokeAI
cp install.sh invokeAI
cp install.sh.in invokeAI/install.sh
chmod a+x invokeAI/install.sh
cp readme.txt invokeAI
zip -r invokeAI-src-installer-linux.zip invokeAI
@ -14,10 +15,11 @@ zip -r invokeAI-src-installer-mac.zip invokeAI
# make the installer zip for windows
rm -rf invokeAI
mkdir -p invokeAI
cp install.bat invokeAI
cp install.bat.in invokeAI/install.bat
cp readme.txt invokeAI
cp WinLongPathsEnabled.reg invokeAI
zip -r invokeAI-src-installer-windows.zip invokeAI
rm -rf invokeAI
echo "The installer zips are ready to be distributed.."

View File

@ -9,8 +9,13 @@
@rem This enables a user to install this project without manually installing conda and git.
echo "Installing InvokeAI.."
echo.
echo "InvokeAI source installer..."
echo ""
echo "Some of the installation steps take a long time to run. Please be patient."
echo "If the script appears to hang for more than 10 minutes, please interrupt with control-C and retry."
echo "<Press any key to start the install process>"
pause
echo ""
@rem config
set MAMBA_ROOT_PREFIX=%cd%\installer_files\mamba
@ -84,16 +89,16 @@ copy environments-and-requirements\environment-win-cuda.yml environment.yml
call conda env create
if "%ERRORLEVEL%" NEQ "0" (
echo ""
echo "Something went wrong while installing Python libraries and cannot continue.
echo "Please visit https://invoke-ai.github.io/InvokeAI/#installation for alternative"
echo "installation methods."
echo "Press any key to continue"
echo "Something went wrong while installing Python libraries and cannot continue."
echo "See https://invoke-ai.github.io/InvokeAI/INSTALL_SOURCE#troubleshooting for troubleshooting"
echo "tips, or visit https://invoke-ai.github.io/InvokeAI/#installation for alternative"
echo "installation methods"
pause
exit /b
)
copy source_installer\invoke.bat invoke.bat
copy source_installer\update.bat update.bat
copy source_installer\invoke.bat.in .\invoke.bat
copy source_installer\update.bat.in .\update.bat
call conda activate invokeai
@rem preload the models
@ -114,5 +119,6 @@ echo "* InvokeAI installed successfully *"
echo "You can now start generating images by double-clicking the 'invoke.bat' file (inside this folder)
echo "Press any key to continue"
pause
exit 0
exit /b

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# This script will install git and conda (if not found on the PATH variable)
# using micromamba (an 8mb static-linked single-file binary, conda replacement).
@ -11,7 +11,11 @@
cd "$(dirname "${BASH_SOURCE[0]}")"
echo "Installing InvokeAI.."
echo "InvokeAI source installer..."
echo ""
echo "Some of the installation steps take a long time to run. Please be patient."
echo "If the script appears to hang for more than 10 minutes, please interrupt with control-C and retry."
read -n 1 -s -r -p "<Press any key to start the install>"
echo ""
OS_NAME=$(uname -s)
@ -112,21 +116,22 @@ status=$?
if test $status -ne 0
then
echo "Something went wrong while installing Python libraries and cannot continue."
echo "Please visit https://invoke-ai.github.io/InvokeAI/#installation for alternative"
echo "installation methods"
echo "Something went wrong while installing Python libraries and cannot continue."
echo "See https://invoke-ai.github.io/InvokeAI/INSTALL_SOURCE#troubleshooting for troubleshooting"
echo "tips, or visit https://invoke-ai.github.io/InvokeAI/#installation for alternative"
echo "installation methods"
else
ln -sf ./source_installer/invoke.sh .
ln -sf ./source_installer/update.sh .
ln -sf ./source_installer/invoke.sh.in ./invoke.sh
ln -sf ./source_installer/update.sh.in ./update.sh
conda activate invokeai
# preload the models
echo "Calling the preload_models.py script"
python scripts/preload_models.py
python scripts/configure_invokeai.py
status=$?
if test $status -ne 0
then
echo "The preload_models.py script crashed or was cancelled."
echo "The configure_invoke.py script crashed or was cancelled."
echo "InvokeAI is not ready to run. Try again by running"
echo "update.sh in this directory."
else