How do I run InvokeAI on a cloud GPU?

Cover: Run InvokeAI on a cloud GPU

Deploy a Raw GPU instance, create a Python 3.12 virtual environment with uv, install the invokeai package with --torch-backend=cu128, start invokeai-web --root ~/invokeai, and open the web UI on your own computer at http://127.0.0.1:9090 through an SSH tunnel.

Updated 2026-10-30

This guide follows the official InvokeAI manual installation guide, hardware requirements, YAML config reference and models page, all read on 2026-10-30. This guide pins invokeai 6.14.2, the latest release with notes on the InvokeAI GitHub releases page on that date; PyPI lists it as requiring Python 3.11 or 3.12. InvokeAI is licensed under Apache-2.0. The guide is for people who use InvokeAI on their own machine and want the same app on a rented GPU such as the RTX 5090 32G or the other cards listed on /pricing.

Step 1: Deploy a Raw GPU and connect

On /deploy, pick a GPU and the Raw GPU option (JupyterLab + CUDA pre-installed). Connect over SSH, or open a terminal in JupyterLab. VRAM need depends on model, precision and workflow; see How much VRAM do I need for FLUX and SDXL? and the official table in Step 6 before you choose a card.

Step 2: Check the environment first

nvidia-smi          # GPU name, driver version, and the "CUDA Version" the driver supports
nvcc --version      # CUDA toolkit compiler (InvokeAI installs its own PyTorch wheels; note the version anyway)
uv --version        # the official manual install uses uv
tmux -V

The official hardware page says to run nvidia-smi to confirm that drivers and CUDA are installed. Write down the GPU name and the CUDA Version at the top right; Step 4 picks the package and torch backend from them.

If uv is missing, install it with the standalone installer from the uv docs and open a new shell. If tmux is missing, install it with your distribution’s package manager (on Debian/Ubuntu: sudo apt-get install -y tmux; drop sudo if you are root).

Step 3: Start a tmux session and create the venv

Run the install and the server inside tmux so they keep running if your SSH connection drops:

tmux new -s invoke
mkdir -p ~/invokeai && cd ~/invokeai
uv venv --relocatable --prompt invoke --python 3.12 --python-preference only-managed .venv
source .venv/bin/activate

According to the official manual install guide, this creates a portable virtual environment with its own Python 3.12, whatever Python the system already has. Detach from tmux with Ctrl-b then d; reattach with tmux attach -t invoke.

Step 4: Install InvokeAI with the CUDA torch backend

The official guide picks the package specifier from the GPU generation and uses the cu128 torch backend for Linux with an Nvidia GPU:

  • Nvidia 30xx series or newer (this includes the RTX 3090, RTX 4090, RTX 5090 and RTX PRO 6000 on our /pricing): invokeai
  • Nvidia 20xx series or older: invokeai[xformers]
uv pip install invokeai==6.14.2 --python 3.12 --python-preference only-managed \
  --torch-backend=cu128 --force-reinstall
deactivate && source .venv/bin/activate

The second line comes from the official guide: deactivating and reactivating the venv makes the invokeai-web command available. To pin a different release, replace 6.14.2 with a version from the InvokeAI releases.

Check that PyTorch sees the GPU before you start the app:

python -c "import torch; print(torch.__version__, torch.version.cuda, torch.cuda.is_available(), torch.cuda.get_device_name(0))"

If this prints False or an error, compare torch.version.cuda with the CUDA Version from nvidia-smi in Step 2 before you go further.

Step 5: Start the web UI and open it through an SSH tunnel

invokeai-web --root ~/invokeai

According to the official YAML config reference, InvokeAI binds to 127.0.0.1 on port 9090 by default (INVOKEAI_HOST and INVOKEAI_PORT change them). This guide keeps the default host and reaches the UI through an SSH tunnel instead of serving it on 0.0.0.0. From your own computer (use the SSH host, port and user from your instance page):

ssh -N -L 9090:127.0.0.1:9090 <user>@<instance-host> -p <ssh-port>

Then open http://127.0.0.1:9090 in your browser. More on tunnels: How do I use SSH port forwarding on a cloud GPU?

Step 6: Install models from the Model Manager

The official models page says the first launch shows a prompt to install starter models, and the Starter Models tab in the Model Manager lists them. You can also paste a Hugging Face repo ID (add :subfolder_name for a model inside a repo subfolder), a direct URL, or use Scan Folder for files already on the instance. According to the official YAML config reference, models go in models and generated images in outputs inside the root folder (~/invokeai) by default (models_dir and outputs_dir in invokeai.yaml change them).

The official page also notes that some models carry licence terms that limit commercial use or use on public servers; check each model’s licence before you use its outputs.

Official hardware table (InvokeAI hardware requirements page, read 2026-10-30; the page calls these rough guidelines, not CloudGPU measurements):

Model family (official) VRAM (min), official RAM (min), official
SDXL 8GB 16GB
FLUX.1 10GB 32GB
FLUX.2 Klein 4B 12GB 16GB
Wan 2.2 A14B (T2V/I2V) 12GB (Q4_K_M) 32GB

Step 7: Confirm generation is on the GPU

While an image is generating, run nvidia-smi in a second terminal on the instance (or a new tmux window: Ctrl-b then c). A python process from the venv should be listed with GPU memory in use. If it is not, read the invokeai-web log in the tmux window and repeat the PyTorch check from Step 4.

Step 8: Save what you need, then destroy the instance

Data on the instance is deleted when you destroy it. Copy anything you want to keep (images under ~/invokeai/outputs, ~/invokeai/invokeai.yaml, your own models) to your computer first, for example with rsync -avP -e "ssh -p <ssh-port>" <user>@<instance-host>:~/invokeai/outputs ./invokeai-outputs. CloudGPU bills per minute, rounded up, with a 1-minute minimum, and billing stops when you destroy the instance; see /terms.

Troubleshooting

  • uv venv fails with a Python version error: keep --python 3.12; PyPI lists InvokeAI 6.14.2 as requiring Python 3.11 or 3.12.
  • invokeai-web: command not found: run deactivate && source .venv/bin/activate from ~/invokeai, as in Step 4.
  • torch.cuda.is_available() prints False: the install did not use --torch-backend=cu128, or the driver is older than the PyTorch build needs; reinstall with the Step 4 command and compare with nvidia-smi.
  • no kernel image is available for execution on the device: the installed PyTorch build does not include your GPU; reinstall with the exact Step 4 command.
  • CUDA out of memory: pick a smaller model or a quantized build from the official table, or lower the image size; the official hardware page links a Low VRAM guide.
  • Browser cannot reach 9090: check that the SSH tunnel is open and that invokeai-web is still running in tmux.

FAQ

Which Python version does InvokeAI need?

According to the official InvokeAI docs, InvokeAI needs Python 3.11 or 3.12, and the manual install guide creates a Python 3.12 virtual environment with uv. PyPI listed the same range for invokeai 6.14.2 on 2026-10-30.

Which torch backend should I use for InvokeAI on a Linux cloud GPU with an Nvidia card?

The official manual install guide uses --torch-backend=cu128 for Linux with an Nvidia GPU. Install the invokeai package for Nvidia 30xx series and newer cards, or invokeai[xformers] for 20xx series and older cards.

Which port does the InvokeAI web UI use?

According to the official InvokeAI config reference, the web UI binds to 127.0.0.1 on port 9090 by default. INVOKEAI_HOST and INVOKEAI_PORT change the host and port; on a cloud GPU you can keep the default and open it through an SSH tunnel.

How much VRAM do I need for InvokeAI?

VRAM need depends on model, precision and workflow. The official InvokeAI hardware page, read on 2026-10-30, lists 8GB minimum VRAM for SDXL and 10GB for FLUX.1 as rough guidelines. See https://cloudgpu.app/guides/how-much-vram-do-i-need-for-flux-and-sdxl for more detail.

How is an InvokeAI session billed on CloudGPU?

CloudGPU bills GPU instances per minute, rounded up, with a 1-minute minimum, and billing stops when you destroy the instance. See https://cloudgpu.app/terms for the full terms.