Manual Installation
Are you in the right place?
Section titled “Are you in the right place?”Walkthrough
Section titled “Walkthrough”We’ll use uv to install python and create a virtual environment, then install the invokeai package. uv is a modern, very fast alternative to pip.
The following commands vary depending on the version of Invoke being installed and the system onto which it is being installed.
-
Install
uvas described in its docs. We suggest using the standalone installer method.Run
uv --versionto confirm thatuvis installed and working. After installation, you may need to restart your terminal to get access touv. -
Create a directory for your installation, typically in your home directory (e.g.
~/invokeaior$Home/invokeai):Terminal window mkdir $Home/invokeaicd $Home/invokeaiTerminal window mkdir ~/invokeaicd ~/invokeai -
Create a virtual environment in that directory:
Terminal window uv venv --relocatable --prompt invoke --python 3.12 --python-preference only-managed .venvThis command creates a portable virtual environment at
.venvcomplete with a portable python 3.12. It doesn’t matter if your system has no python installed, or has a different version -uvwill handle everything. -
Activate the virtual environment:
Terminal window .venv\Scripts\activateTerminal window source .venv/bin/activate -
Choose a version to install.
View Releases
-
Determine the package specifier to use when installing. This is a performance optimization.
- If you have an Nvidia 16xx or 20xx series GPU, use
invokeai[xformers]. - If you have an Nvidia 30xx series GPU or newer, or do not have an Nvidia GPU, use
invokeai.
- If you have an Nvidia 16xx or 20xx series GPU, use
-
Determine the torch backend to use for installation, if any. This is necessary to get the right version of torch installed. This is achieved by using UV’s built in torch support.
Use:
Terminal window --torch-backend=cu130Use:
Terminal window --torch-backend=xpuDo not use a torch backend. AMD publishes its ROCm wheels on its own index, with the GPU kernels in a separate package per GPU target. In the next step, pin them for your GPU’s target and point
uvat that index instead:Terminal window uv pip install <PACKAGE_SPECIFIER>==<VERSION> "torch[device-<TARGET>]==2.13.0+rocm10.0.0" "torchvision[device-<TARGET>]==0.28.0+rocm10.0.0" --index https://stable.repo.amd.com/rocm/whl-next/ --index-strategy unsafe-best-match --python 3.12 --python-preference only-managed --force-reinstall<TARGET>isgfx1201for the RX 9070 series and Radeon AI PRO R9700,gfx1200for the RX 9060 series,gfx1100for the RX 7900 series,gfx1101for the RX 7700 and 7800 series,gfx1102for the RX 7600 series, andgfx1151for Ryzen AI Max. For other GPUs, see AMD’s GPU target table.Do not use a torch backend.
Use:
Terminal window --torch-backend=cu130On
x86_64, use:Terminal window --torch-backend=cpuOn ARM64 (
aarch64, e.g. Raspberry Pi 5), do not use a torch backend. The default PyPI wheels are CPU-only on ARM64 and work out of the box.Do not use a torch backend. Install AMD’s ROCm 10 wheels from AMD’s index, as the launcher does, with the GPU kernels pinned for your GPU’s target:
Terminal window uv pip install <PACKAGE_SPECIFIER>==<VERSION> "torch[device-<TARGET>]==2.13.0+rocm10.0.0" "torchvision[device-<TARGET>]==0.28.0+rocm10.0.0" --index https://stable.repo.amd.com/rocm/whl-next/ --index-strategy unsafe-best-match --python 3.12 --python-preference only-managed --force-reinstall<TARGET>isgfx1201for the RX 9070 series and Radeon AI PRO R9700,gfx1200for the RX 9060 series,gfx1100for the RX 7900 series,gfx1101for the RX 7700 and 7800 series,gfx1102for the RX 7600 series, andgfx1151for Ryzen AI Max. For other GPUs, see AMD’s GPU target table.ROCm 10 has no kernels for Vega-based cards (gfx900/gfx906). For those, use PyTorch’s ROCm 7.2 build instead:
Terminal window --torch-backend=rocm7.2Use:
Terminal window --torch-backend=xpuDo not use a torch backend.
-
Install the
invokeaipackage. Substitute the package specifier and version.Terminal window uv pip install <PACKAGE_SPECIFIER>==<VERSION> --python 3.12 --python-preference only-managed --force-reinstallTerminal window uv pip install <PACKAGE_SPECIFIER>==<VERSION> --python 3.12 --python-preference only-managed --torch-backend=<VERSION> --force-reinstall -
Deactivate and reactivate your venv so that the invokeai-specific commands become available in the environment:
Terminal window deactivate.venv\Scripts\activateTerminal window deactivate && source .venv/bin/activate -
Run the application, specifying the directory you created earlier as the root directory:
Terminal window invokeai-web --root ~/invokeaiTerminal window invokeai-web --root ~/invokeai
If you run Invoke on a headless server, you might want to install and run Invoke on the command line.
We do not plan to maintain scripts to do this moving forward, instead focusing our dev resources on the GUI launcher.
You can create your own scripts for this by copying the handful of commands in this guide. uv’s pip interface docs may be useful.