update 020_INSTALL_MANUAL.md

- some formatting changes / fixes
- updates venv creation commands
- remove extra index from Mac Installations
This commit is contained in:
mauwii 2023-02-10 17:29:12 +01:00
parent 13a4666a6e
commit 4cf43b858d
No known key found for this signature in database
GPG Key ID: D923DB04ADB3F5AB

View File

@ -30,25 +30,35 @@ Installation](010_INSTALL_AUTOMATED.md), and in many cases will
already be installed (if, for example, you have used your system for already be installed (if, for example, you have used your system for
gaming): gaming):
* **Python** version 3.9 or 3.10 (3.11 is not recommended). * **Python**
* **CUDA Tools** For those with _NVidia GPUs_, you will need to version 3.9 or 3.10 (3.11 is not recommended).
install the [CUDA toolkit and optionally the XFormers library](070_INSTALL_XFORMERS.md).
* **ROCm Tools** For _Linux users with AMD GPUs_, you will need * **CUDA Tools**
to install the [ROCm toolkit](./030_INSTALL_CUDA_AND_ROCM.md). Note that
InvokeAI does not support AMD GPUs on Windows systems due to
lack of a Windows ROCm library.
* **Visual C++ Libraries** _Windows users_ must install the free For those with _NVidia GPUs_, you will need to
[Visual C++ libraries from Microsoft](https://learn.microsoft.com/en-US/cpp/windows/latest-supported-vc-redist?view=msvc-170) install the [CUDA toolkit and optionally the XFormers library](070_INSTALL_XFORMERS.md).
* **The Xcode command line tools** for _Macintosh users_. Instructions are * **ROCm Tools**
available at [Free Code Camp](https://www.freecodecamp.org/news/install-xcode-command-line-tools/)
* _Macintosh users_ may also need to run the `Install Certificates` command For _Linux users with AMD GPUs_, you will need
if model downloads give lots of certificate errors. Run: to install the [ROCm toolkit](./030_INSTALL_CUDA_AND_ROCM.md). Note that
`/Applications/Python\ 3.10/Install\ Certificates.command` InvokeAI does not support AMD GPUs on Windows systems due to
lack of a Windows ROCm library.
* **Visual C++ Libraries**
_Windows users_ must install the free
[Visual C++ libraries from Microsoft](https://learn.microsoft.com/en-US/cpp/windows/latest-supported-vc-redist?view=msvc-170)
* **The Xcode command line tools**
for _Macintosh users_. Instructions are available at
[Free Code Camp](https://www.freecodecamp.org/news/install-xcode-command-line-tools/)
* _Macintosh users_ may also need to run the `Install Certificates` command
if model downloads give lots of certificate errors. Run:
`/Applications/Python\ 3.10/Install\ Certificates.command`
### Installation Walkthrough ### Installation Walkthrough
@ -75,7 +85,7 @@ manager, please follow these steps:
=== "Linux/Mac" === "Linux/Mac"
```bash ```bash
export INVOKEAI_ROOT="~/invokeai" export INVOKEAI_ROOT=~/invokeai
mkdir $INVOKEAI_ROOT mkdir $INVOKEAI_ROOT
``` ```
@ -99,35 +109,30 @@ manager, please follow these steps:
Windows environment variable using the Advanced System Settings dialogue. Windows environment variable using the Advanced System Settings dialogue.
Refer to your operating system documentation for details. Refer to your operating system documentation for details.
```terminal
=== "Linux/Mac" cd $INVOKEAI_ROOT
```bash python -m venv .venv --prompt InvokeAI
cd $INVOKEAI_ROOT ```
python -m venv create .venv
```
=== "Windows"
```bash
cd $INVOKEAI_ROOT
python -m venv create .venv
```
4. Activate the new environment: 4. Activate the new environment:
=== "Linux/Mac" === "Linux/Mac"
```bash
```bash
source .venv/bin/activate source .venv/bin/activate
``` ```
=== "Windows" === "Windows"
```bash
.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 ```ps
.venv\script\activate
```
If you get a permissions error at this point, run this command and try again
`Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser`
The command-line prompt should change to to show `(InvokeAI)` at the
beginning of the prompt. Note that all the following steps should be beginning of the prompt. Note that all the following steps should be
run while inside the INVOKEAI_ROOT directory run while inside the INVOKEAI_ROOT directory
@ -137,38 +142,45 @@ manager, please follow these steps:
python -m pip install --upgrade pip python -m pip install --upgrade pip
``` ```
6. Install the InvokeAI Package. The `--extra-index-url` option is used to select among CUDA, ROCm and CPU/MPS drivers as shown below: 6. Install the InvokeAI Package. The `--extra-index-url` option is used to select among
CUDA, ROCm and CPU/MPS drivers as shown below:
=== "CUDA (NVidia)" === "CUDA (NVidia)"
```bash ```bash
pip install InvokeAI[xformers] --use-pep517 --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 --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 --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 --extra-index-url https://download.pytorch.org/whl/cpu pip install InvokeAI --use-pep517
``` ```
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
become available in the environment become available in the environment
=== "Linux/Macintosh" === "Linux/Macintosh"
```bash ```bash
deactivate && source .venv/bin/activate deactivate && source .venv/bin/activate
``` ```
=== "Windows" === "Windows"
```bash
```ps
deactivate deactivate
.venv\Scripts\activate .venv\Scripts\activate
``` ```
@ -179,7 +191,7 @@ manager, please follow these steps:
models, model config files, directory for textual inversion embeddings, and models, model config files, directory for textual inversion embeddings, and
your outputs. your outputs.
```bash ```terminal
invokeai-configure invokeai-configure
``` ```
@ -314,7 +326,7 @@ installation protocol (important!)
=== "MPS (M1 and M2 Macs)" === "MPS (M1 and M2 Macs)"
```bash ```bash
pip install -e . --use-pep517 --extra-index-url https://download.pytorch.org/whl/cpu pip install -e . --use-pep517
``` ```
Be sure to pass `-e` (for an editable install) and don't forget the Be sure to pass `-e` (for an editable install) and don't forget the
@ -355,4 +367,4 @@ with other platforms/GPU combinations. If you don't wish to pass the
environment variable INVOKEAI_ROOT to point to the installation directory. environment variable INVOKEAI_ROOT to point to the installation directory.
Note that if you run into problems with the Conda installation, the InvokeAI Note that if you run into problems with the Conda installation, the InvokeAI
staff will **not** be able to help you out. Caveat Emptor! staff will **not** be able to help you out. Caveat Emptor!