इसे छोड़कर कंटेंट पर जाएं
Invoke

Manual Installation

यह कंटेंट अभी तक आपकी भाषा में उपलब्ध नहीं है।

Commands that differ by operating system or GPU are listed for every setup, each labeled with the setup it applies to.

Operating system
GPU

Showing commands for

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.

  1. Install uv as described in its docs. We suggest using the standalone installer method.

    Run uv --version to confirm that uv is installed and working. After installation, you may need to restart your terminal to get access to uv.

  2. Create a directory for your installation, typically in your home directory (e.g. ~/invokeai or $Home/invokeai):

    Windows

    Terminal window
    mkdir $Home/invokeai
    cd $Home/invokeai

    macOS, Linux

    Terminal window
    mkdir ~/invokeai
    cd ~/invokeai
  3. Create a virtual environment in that directory:

    Every setup except Windows · ARM64

    Terminal window
    uv venv --relocatable --prompt invoke --python 3.12 --python-preference only-managed .venv

    Windows · ARM64

    Terminal window
    uv venv --relocatable --prompt invoke `
    --python cpython-3.12-windows-aarch64-none --python-preference only-managed .venv

    This command creates a portable virtual environment at .venv complete with a portable python 3.12. It doesn’t matter if your system has no python installed, or has a different version - uv will handle everything.

    Windows · ARM64

  4. Activate the virtual environment:

    Windows

    Terminal window
    .venv\Scripts\activate

    macOS, Linux

    Terminal window
    source .venv/bin/activate
  5. Choose a version to install.

    View Releases

  6. Determine the package specifier to use when installing: invokeai, plus any of these extras in brackets, separated by commas.

    Windows, Linux · NVIDIA

    • cuda, if you use --torch-backend=cu130 in the next step (Nvidia GPU on Windows x64 or Linux x86_64). It installs the PyTorch build Invoke is tested with and, on Windows, Triton. Add it only for Invoke 7 or newer, and never with another torch backend: it pins PyTorch’s CUDA 13 build, which no other backend provides.
    • xformers, if you have an Nvidia 16xx or 20xx series GPU. This is a performance optimization.

    For example invokeai[cuda] for a 30xx series GPU or newer, or invokeai[cuda,xformers] for a 16xx or 20xx series GPU.

    Every setup except NVIDIA

    Use invokeai without extras. The cuda extra is only for --torch-backend=cu130 (Nvidia GPU on Windows x64 or Linux x86_64): it pins PyTorch’s CUDA 13 build, which no other backend provides. The xformers extra is only for Nvidia 16xx or 20xx series GPUs.

  7. 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.

    Windows, Linux · NVIDIA

    Use:

    Terminal window
    --torch-backend=cu130

    Windows, Linux · Intel Arc

    Use:

    Terminal window
    --torch-backend=xpu

    Windows · AMD

    Do 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 uv at that index instead.

    Linux · AMD

    Do not use a torch backend. In the next step, install AMD’s ROCm 10 wheels from AMD’s index, as the launcher does, with the GPU kernels pinned for your GPU’s target.

    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.2

    Windows · ARM64

    Do not use a torch backend. torch comes from NVIDIA’s own index, and three packages that have no ARM64 build on PyPI (OpenCV, blake3, tiktoken) come from wheels Invoke publishes. Use these two options instead of --torch-backend:

    Terminal window
    --index https://pypi.nvidia.com/nvtorch_oot/ --find-links https://github.com/invoke-ai/InvokeAI/releases/download/win-arm64-wheels-v1/index.html

    With or without an NVIDIA GPU: this is the only torch build for Windows ARM64. See the system requirements for the platform’s feature differences.

    Linux · None (CPU)

    On x86_64, use:

    Terminal window
    --torch-backend=cpu

    On 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.

    Windows · Other / none

    Do not use a torch backend.

    macOS

    Do not use a torch backend.

  8. Install the invokeai package. Substitute the package specifier and version.

    Windows · NVIDIA

    Terminal window
    uv pip install "<PACKAGE_SPECIFIER>==<VERSION>" `
    --python 3.12 --python-preference only-managed `
    --torch-backend=cu130 --force-reinstall

    Linux · NVIDIA

    Terminal window
    uv pip install "<PACKAGE_SPECIFIER>==<VERSION>" \
    --python 3.12 --python-preference only-managed \
    --torch-backend=cu130 --force-reinstall

    Windows · Intel Arc

    Terminal window
    uv pip install "<PACKAGE_SPECIFIER>==<VERSION>" `
    --python 3.12 --python-preference only-managed `
    --torch-backend=xpu --force-reinstall

    Linux · Intel Arc

    Terminal window
    uv pip install "<PACKAGE_SPECIFIER>==<VERSION>" \
    --python 3.12 --python-preference only-managed \
    --torch-backend=xpu --force-reinstall

    Windows · AMD

    Also substitute your GPU’s <TARGET> (see below).

    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

    Linux · AMD

    Also substitute your GPU’s <TARGET> (see below).

    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

    Windows · ARM64

    Terminal window
    uv pip install <PACKAGE_SPECIFIER>==<VERSION> `
    --python cpython-3.12-windows-aarch64-none --python-preference only-managed `
    --index https://pypi.nvidia.com/nvtorch_oot/ `
    --find-links https://github.com/invoke-ai/InvokeAI/releases/download/win-arm64-wheels-v1/index.html `
    --force-reinstall

    Linux · None (CPU)

    On x86_64:

    Terminal window
    uv pip install "<PACKAGE_SPECIFIER>==<VERSION>" \
    --python 3.12 --python-preference only-managed \
    --torch-backend=cpu --force-reinstall

    On ARM64 (aarch64), without a torch backend:

    Terminal window
    uv pip install <PACKAGE_SPECIFIER>==<VERSION> \
    --python 3.12 --python-preference only-managed \
    --force-reinstall

    Windows · Other / none

    Terminal window
    uv pip install <PACKAGE_SPECIFIER>==<VERSION> `
    --python 3.12 --python-preference only-managed `
    --force-reinstall

    macOS

    Terminal window
    uv pip install <PACKAGE_SPECIFIER>==<VERSION> \
    --python 3.12 --python-preference only-managed \
    --force-reinstall

    Windows, Linux · AMD

    <TARGET>GPUs
    gfx1201RX 9070 series and Radeon AI PRO R9700
    gfx1200RX 9060 series
    gfx1100RX 7900 series
    gfx1101RX 7700 and 7800 series
    gfx1102RX 7600 series
    gfx1151Ryzen AI Max

    For other GPUs, see AMD’s GPU target table.

    Linux · AMD

    For a Vega-based card (gfx900/gfx906), install PyTorch’s ROCm 7.2 build instead:

    Terminal window
    uv pip install "<PACKAGE_SPECIFIER>==<VERSION>" \
    --python 3.12 --python-preference only-managed \
    --torch-backend=rocm7.2 --force-reinstall
  9. Deactivate and reactivate your venv so that the invokeai-specific commands become available in the environment:

    Windows

    Terminal window
    deactivate
    .venv\Scripts\activate

    macOS, Linux

    Terminal window
    deactivate && source .venv/bin/activate
  10. Run the application, specifying the directory you created earlier as the root directory:

    Terminal window
    invokeai-web --root ~/invokeai

    To keep an existing install as it is, give v7 a directory of its own: see Run v7 alongside v6.

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.