mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
update manual install doc
This commit is contained in:
parent
d26abd7f01
commit
b9c8270ee6
@ -6,30 +6,39 @@ title: Installing with the Automated Installer
|
|||||||
|
|
||||||
## Introduction
|
## Introduction
|
||||||
|
|
||||||
The automated installer is a shell script that attempts to automate every step
|
The automated installer is a Python script that attempts to automate
|
||||||
needed to install and run InvokeAI on a stock computer running recent versions
|
every step needed to install and run InvokeAI on a stock computer
|
||||||
of Linux, MacOS or Windows. It will leave you with a version that runs a stable
|
running recent versions of Linux, MacOS or Windows. It will leave you
|
||||||
version of InvokeAI with the option to upgrade to experimental versions later.
|
with a version that runs a stable version of InvokeAI with the option
|
||||||
|
to upgrade to experimental versions later.
|
||||||
|
|
||||||
## Walk through
|
## Walk through
|
||||||
|
|
||||||
1. Make sure that your system meets the
|
1. Make sure that your system meets the [hardware
|
||||||
[hardware requirements](../index.md#hardware-requirements) and has the
|
requirements](../index.md#hardware-requirements) and has the
|
||||||
appropriate GPU drivers installed. In particular, if you are a Linux user
|
appropriate GPU drivers installed. In particular, if you are a
|
||||||
with an AMD GPU installed, you may need to install the
|
Linux user with an AMD GPU installed, you may need to install the
|
||||||
[ROCm driver](https://rocmdocs.amd.com/en/latest/Installation_Guide/Installation-Guide.html).
|
[ROCm driver](https://rocmdocs.amd.com/en/latest/Installation_Guide/Installation-Guide.html).
|
||||||
|
|
||||||
!!! info "Required Space"
|
!!! info "Required Space"
|
||||||
|
|
||||||
Installation requires roughly 18G of free disk space to load the libraries and
|
Installation requires roughly 18G of free disk space to load
|
||||||
recommended model weights files.
|
the libraries and recommended model weights files.
|
||||||
|
|
||||||
Regardless of your destination disk, your *system drive* (`C:\` on Windows, `/` on macOS/Linux) requires at least 6GB of free disk space to download and cache python dependencies. NOTE for Linux users: if your temporary directory is mounted as a `tmpfs`, ensure it has sufficient space.
|
Regardless of your destination disk, your *system drive*
|
||||||
|
(`C:\` on Windows, `/` on macOS/Linux) requires at least 6GB
|
||||||
|
of free disk space to download and cache python
|
||||||
|
dependencies.
|
||||||
|
|
||||||
2. Check that your system has an up-to-date Python installed. To do this, open
|
NOTE for Linux users: if your temporary directory is mounted
|
||||||
up a command-line window ("Terminal" on Linux and Macintosh, "Command" or
|
as a `tmpfs`, ensure it has sufficient space.
|
||||||
"Powershell" on Windows) and type `python --version`. If Python is
|
|
||||||
installed, it will print out the version number. If it is version `3.9.1` or `3.10.x`, you meet requirements.
|
2. Check that your system has an up-to-date Python installed. To do
|
||||||
|
this, open up a command-line window ("Terminal" on Linux and
|
||||||
|
Macintosh, "Command" or "Powershell" on Windows) and type `python
|
||||||
|
--version`. If Python is installed, it will print out the version
|
||||||
|
number. If it is version `3.9.1` or `3.10.x`, you meet
|
||||||
|
requirements.
|
||||||
|
|
||||||
!!! warning "At this time we do not recommend Python 3.11"
|
!!! warning "At this time we do not recommend Python 3.11"
|
||||||
|
|
||||||
@ -52,7 +61,10 @@ version of InvokeAI with the option to upgrade to experimental versions later.
|
|||||||
find python, then open the Python installer again and choose
|
find python, then open the Python installer again and choose
|
||||||
"Modify" existing installation.
|
"Modify" existing installation.
|
||||||
|
|
||||||
- Installation requires an up to date version of the Microsoft Visual C libraries. Please install the 2015-2022 libraries available here: https://learn.microsoft.com/en-US/cpp/windows/latest-supported-vc-redist?view=msvc-170
|
- Installation requires an up to date version of the Microsoft
|
||||||
|
Visual C libraries. Please install the 2015-2022 libraries
|
||||||
|
available here:
|
||||||
|
https://learn.microsoft.com/en-US/cpp/windows/latest-supported-vc-redist?view=msvc-170
|
||||||
|
|
||||||
=== "Mac users"
|
=== "Mac users"
|
||||||
|
|
||||||
@ -78,9 +90,8 @@ version of InvokeAI with the option to upgrade to experimental versions later.
|
|||||||
|
|
||||||
=== "Linux users"
|
=== "Linux users"
|
||||||
|
|
||||||
For reasons that are not entirely clear, installing the correct version of Python can be a bit of a challenge on Ubuntu, Linux Mint, Pop!_OS, and other Debian-derived distributions.
|
To install an appropriate version of Python On Ubuntu 22.04
|
||||||
|
and higher, run the following:
|
||||||
On Ubuntu 22.04 and higher, run the following:
|
|
||||||
|
|
||||||
```
|
```
|
||||||
sudo apt update
|
sudo apt update
|
||||||
@ -233,21 +244,46 @@ Once InvokeAI is installed, do not move or remove this directory."
|
|||||||
|
|
||||||
### _Package dependency conflicts_
|
### _Package dependency conflicts_
|
||||||
|
|
||||||
If you have previously installed InvokeAI or another Stable Diffusion package,
|
If you have previously installed InvokeAI or another Stable Diffusion
|
||||||
the installer may occasionally pick up outdated libraries and either the
|
package, the installer may occasionally pick up outdated libraries and
|
||||||
installer or `invoke` will fail with complaints about library conflicts. You can
|
either the installer or `invoke` will fail with complaints about
|
||||||
address this by entering the `invokeai` directory and running `update.sh`, which
|
library conflicts. In this case, run the `invoke.sh`/`invoke.bat`
|
||||||
will bring InvokeAI up to date with the latest libraries.
|
command and enter the Developer's Console by picking option (5). This
|
||||||
|
will take you to a command-line prompt.
|
||||||
|
|
||||||
### ldm from pypi
|
Then give this command:
|
||||||
|
|
||||||
!!! warning
|
`pip install InvokeAI --force-reinstall`
|
||||||
|
|
||||||
Some users have tried to correct dependency problems by installing
|
This should fix the issues.
|
||||||
the `ldm` package from PyPi.org. Unfortunately this is an unrelated package that
|
|
||||||
has nothing to do with the 'latent diffusion model' used by InvokeAI. Installing
|
### InvokeAI runs extremely slowly on Linux or Windows systems
|
||||||
ldm will make matters worse. If you've installed ldm, uninstall it with
|
|
||||||
`pip uninstall ldm`.
|
The most frequent cause of this problem is when the installation
|
||||||
|
process installed the CPU-only version of the torch machine-learning
|
||||||
|
library, rather than a version that takes advantage of GPU
|
||||||
|
acceleration. To confirm this issue, look at the InvokeAI startup
|
||||||
|
messages. If you see a message saying ">> Using device CPU", then
|
||||||
|
this is what happened.
|
||||||
|
|
||||||
|
To fix this problem, first determine whether you have an NVidia or an
|
||||||
|
AMD GPU. The former uses the CUDA driver, and the latter uses ROCm
|
||||||
|
(only available on Linux). Then run the `invoke.sh`/`invoke.bat`
|
||||||
|
command and enter the Developer's Console by picking option (5). This
|
||||||
|
will take you to a command-line prompt.
|
||||||
|
|
||||||
|
Then type the following commands:
|
||||||
|
|
||||||
|
=== "NVIDIA System"
|
||||||
|
```bash
|
||||||
|
pip install torch torchvision --force-reinstall --extra-index-url https://download.pytorch.org/whl/cu117
|
||||||
|
pip install xformers
|
||||||
|
```
|
||||||
|
|
||||||
|
=== "AMD System"
|
||||||
|
```bash
|
||||||
|
pip install torch torchvision --force-reinstall --extra-index-url https://download.pytorch.org/whl/rocm5.2
|
||||||
|
```
|
||||||
|
|
||||||
### Corrupted configuration file
|
### Corrupted configuration file
|
||||||
|
|
||||||
|
@ -68,7 +68,9 @@ manager, please follow these steps:
|
|||||||
|
|
||||||
Please keep in mind the disk space requirements - you will need at
|
Please keep in mind the disk space requirements - you will need at
|
||||||
least 20GB for the models and the virtual environment. From now
|
least 20GB for the models and the virtual environment. From now
|
||||||
on we will refer to this directory as `INVOKEAI_ROOT`.
|
on we will refer to this directory as `INVOKEAI_ROOT`. For convenience,
|
||||||
|
the steps below create a shell variable of that name which contains the
|
||||||
|
path to `HOME/invokeai`.
|
||||||
|
|
||||||
=== "Linux/Mac"
|
=== "Linux/Mac"
|
||||||
|
|
||||||
@ -80,7 +82,7 @@ manager, please follow these steps:
|
|||||||
=== "Windows (Powershell)"
|
=== "Windows (Powershell)"
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$INVOKEAI_ROOT=$Home/invokeai
|
Set-Variable -Name INVOKEAI_ROOT -Value $Home/invokeai
|
||||||
mkdir $INVOKEAI_ROOT
|
mkdir $INVOKEAI_ROOT
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -94,8 +96,8 @@ manager, please follow these steps:
|
|||||||
environment inside the root directory, then you **must** set the
|
environment inside the root directory, then you **must** set the
|
||||||
`INVOKEAI_ROOT` environment variable in your shell environment, for
|
`INVOKEAI_ROOT` environment variable in your shell environment, for
|
||||||
example, by editing `~/.bashrc` or `~/.zshrc` files, or setting the
|
example, by editing `~/.bashrc` or `~/.zshrc` files, or setting the
|
||||||
Windows environment variable. Refer to your operating system /
|
Windows environment variable using the Advanced System Settings dialogue.
|
||||||
shell documentation for the correct way of doing so.
|
Refer to your operating system documentation for details.
|
||||||
|
|
||||||
|
|
||||||
=== "Linux/Mac"
|
=== "Linux/Mac"
|
||||||
@ -114,16 +116,20 @@ manager, please follow these steps:
|
|||||||
|
|
||||||
=== "Linux/Mac"
|
=== "Linux/Mac"
|
||||||
```bash
|
```bash
|
||||||
source $INVOKEAI_ROOT/.venv/bin/activate
|
source .venv/bin/activate
|
||||||
```
|
```
|
||||||
|
|
||||||
=== "Windows"
|
=== "Windows"
|
||||||
```bash
|
```bash
|
||||||
$INVOKEAI_ROOT/.venv/scripts/activate
|
.venv\script\/activate
|
||||||
```
|
```
|
||||||
|
If you get a permissions error at this point, run the command
|
||||||
|
`Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope CurrentUser`
|
||||||
|
and try `activate` again.
|
||||||
|
|
||||||
The command-line prompt should change to to show `(.venv)` at the
|
The command-line prompt should change to to show `(.venv)` at the
|
||||||
beginning of the prompt.
|
beginning of the prompt. Note that all the following steps should be
|
||||||
|
run while inside the INVOKEAI_ROOT directory
|
||||||
|
|
||||||
5. Make sure that pip is installed in your virtual environment and up to date:
|
5. Make sure that pip is installed in your virtual environment and up to date:
|
||||||
|
|
||||||
@ -135,22 +141,22 @@ manager, please follow these steps:
|
|||||||
|
|
||||||
=== "CUDA (NVidia)"
|
=== "CUDA (NVidia)"
|
||||||
```bash
|
```bash
|
||||||
pip install InvokeAI --use-pep517 --upgrade --extra-index-url https://download.pytorch.org/whl/cu117
|
pip install InvokeAI[xformers] --use-pep517 --extra-index-url https://download.pytorch.org/whl/cu117
|
||||||
```
|
```
|
||||||
|
|
||||||
=== "ROCm (AMD)"
|
=== "ROCm (AMD)"
|
||||||
```bash
|
```bash
|
||||||
pip install InvokeAI --use-pep517 --upgrade --extra-index-url https://download.pytorch.org/whl/rocm5.2
|
pip install InvokeAI --use-pep517 --extra-index-url https://download.pytorch.org/whl/rocm5.2
|
||||||
```
|
```
|
||||||
|
|
||||||
=== "CPU (Intel Macs & non-GPU systems)"
|
=== "CPU (Intel Macs & non-GPU systems)"
|
||||||
```bash
|
```bash
|
||||||
pip install InvokeAI --use-pep517 --upgrade --extra-index-url https://download.pytorch.org/whl/cpu
|
pip install InvokeAI --use-pep517 --extra-index-url https://download.pytorch.org/whl/cpu
|
||||||
```
|
```
|
||||||
|
|
||||||
=== "MPS (M1 and M2 Macs)"
|
=== "MPS (M1 and M2 Macs)"
|
||||||
```bash
|
```bash
|
||||||
pip install InvokeAI --use-pep517 --upgrade --extra-index-url https://download.pytorch.org/whl/cpu
|
pip install InvokeAI --use-pep517 --extra-index-url https://download.pytorch.org/whl/cpu
|
||||||
```
|
```
|
||||||
|
|
||||||
7. Deactivate and reactivate your runtime directory so that the invokeai-specific commands
|
7. Deactivate and reactivate your runtime directory so that the invokeai-specific commands
|
||||||
@ -158,12 +164,13 @@ manager, please follow these steps:
|
|||||||
|
|
||||||
=== "Linux/Macintosh"
|
=== "Linux/Macintosh"
|
||||||
```bash
|
```bash
|
||||||
deactivate && source $INVOKEAI_ROOT/.venv/bin/activate
|
deactivate && source .venv/bin/activate
|
||||||
```
|
```
|
||||||
|
|
||||||
=== "Windows"
|
=== "Windows"
|
||||||
```bash
|
```bash
|
||||||
deactivate && $INVOKEAI_ROOT/.venv/Scripts/activate
|
deactivate
|
||||||
|
.venv\Scripts\activate
|
||||||
```
|
```
|
||||||
|
|
||||||
8. Set up the runtime directory
|
8. Set up the runtime directory
|
||||||
@ -196,31 +203,32 @@ manager, please follow these steps:
|
|||||||
|
|
||||||
9. Run the command-line- or the web- interface:
|
9. Run the command-line- or the web- interface:
|
||||||
|
|
||||||
Activate the environment (with `source .venv/bin/activate`), and then run
|
From within INVOKEAI_ROOT, activate the environment
|
||||||
the script `invokeai`. If you selected a non-default location for the
|
(with `source .venv/bin/activate` or `.venv\scripts\activate), and then run
|
||||||
runtime directory, please specify the path with the `--root_dir` option
|
the script `invokeai`. If the virtual environment you selected is NOT inside
|
||||||
(abbreviated below as `--root`):
|
INVOKEAI_ROOT, then you must specify the path to the root directory by adding
|
||||||
|
`--root_dir \path\to\invokeai` to the commands below:
|
||||||
|
|
||||||
!!! example ""
|
!!! example ""
|
||||||
|
|
||||||
!!! warning "Make sure that the virtual environment is activated, which should create `(invokeai)` in front of your prompt!"
|
!!! warning "Make sure that the virtual environment is activated, which should create `(.venv)` in front of your prompt!"
|
||||||
|
|
||||||
=== "CLI"
|
=== "CLI"
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
invokeai --root ~/invokeai
|
invokeai
|
||||||
```
|
```
|
||||||
|
|
||||||
=== "local Webserver"
|
=== "local Webserver"
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
invokeai --web --root ~/invokeai
|
invokeai --web
|
||||||
```
|
```
|
||||||
|
|
||||||
=== "Public Webserver"
|
=== "Public Webserver"
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
invokeai --web --host 0.0.0.0 --root ~/invokeai
|
invokeai --web --host 0.0.0.0
|
||||||
```
|
```
|
||||||
|
|
||||||
If you choose the run the web interface, point your browser at
|
If you choose the run the web interface, point your browser at
|
||||||
@ -228,14 +236,18 @@ manager, please follow these steps:
|
|||||||
|
|
||||||
!!! tip
|
!!! tip
|
||||||
|
|
||||||
You can permanently set the location of the runtime directory by setting the environment variable `INVOKEAI_ROOT` to the path of the directory. As mentioned previously, this is
|
You can permanently set the location of the runtime directory
|
||||||
**required** if your virtual environment is located outside of your runtime directory.
|
by setting the environment variable `INVOKEAI_ROOT` to the
|
||||||
|
path of the directory. As mentioned previously, this is
|
||||||
|
*highly recommended** if your virtual environment is located outside of
|
||||||
|
your runtime directory.
|
||||||
|
|
||||||
10. Render away!
|
10. Render away!
|
||||||
|
|
||||||
Browse the [features](../features/CLI.md) section to learn about all the
|
Browse the [features](../features/CLI.md) section to learn about all the
|
||||||
things you can do with InvokeAI.
|
things you can do with InvokeAI.
|
||||||
|
|
||||||
|
|
||||||
11. Subsequently, to relaunch the script, activate the virtual environment, and
|
11. Subsequently, to relaunch the script, activate the virtual environment, and
|
||||||
then launch `invokeai` command. If you forget to activate the virtual
|
then launch `invokeai` command. If you forget to activate the virtual
|
||||||
environment you will most likeley receive a `command not found` error.
|
environment you will most likeley receive a `command not found` error.
|
||||||
@ -243,3 +255,20 @@ manager, please follow these steps:
|
|||||||
!!! warning
|
!!! warning
|
||||||
|
|
||||||
Do not move the runtime directory after installation. The virtual environment will get confused if the directory is moved.
|
Do not move the runtime directory after installation. The virtual environment will get confused if the directory is moved.
|
||||||
|
|
||||||
|
12. Other scripts
|
||||||
|
|
||||||
|
The [Textual Inversion](../features/TEXTUAL_VERSION.md) script can be launched with the command:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
invokeai-ti --gui
|
||||||
|
```
|
||||||
|
|
||||||
|
Similarly, the [Model Merging](../features/MODEL_MERGING.md) script can be launched with the command:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
invokeai-merge --gui
|
||||||
|
```
|
||||||
|
|
||||||
|
Leave off the `--gui` option to run the script using command-line arguments. Pass the `--help` argument
|
||||||
|
to get usage instructions.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user