Skip to main content
Linux AI Tools

InvokeAI - Generate Stunning AI Images on Your Linux Machine

In this article, we’ll walk you through the entire process, from installation to running your first AI image generation on an Ubuntu system.

Ravi Saive

Have you ever wondered how AI can create stunning images just from text descriptions? Well, you're in luck! With InvokeAI, you can now generate high-quality images right from your own Linux computer. No need for a fancy, expensive setup or even an internet connection (after installation) - InvokeAI does it all for you.

InvokeAI is a free, open-source tool that uses Stable Diffusion, which is a cutting-edge AI model that transforms your text prompts into images. It offers both a web-based GUI and a command-line interface, making it accessible for users with varying levels of technical expertise.

With InvokeAI, you can input a text prompt like "a serene landscape with mountains and a river", and the AI will generate a corresponding image.​

In this article, we’ll walk you through the entire process, from installation to running your first AI image generation on an Ubuntu system. It’s beginner-friendly, and we’ll keep it simple, step by step.

System Requirements

Before diving into the installation, ensure your system meets the following requirements:

  • Operating System: Ubuntu (though it also works on other Linux distributions like Debian, Fedora, etc.)​.
  • RAM: Minimum 8 GB (16 GB recommended)​.
  • Disk Space: At least 10 GB for the base installation; additional space for models (up to 100 GB).
  • GPU: NVIDIA GPU with CUDA support is highly recommended for faster image generation (it’ll significantly speed up the process)​.
  • Python: Version 3.10 or higher.
💡
While a CUDA-compatible NVIDIA GPU is highly recommended, InvokeAI can still run on CPU-only systems - it’ll just be significantly slower.

With these requirements in place, we’re ready to install InvokeAI.

Step 1: Installing Dependencies

First, start by opening the terminal and running the following commands to make sure your system packages are up to date:

sudo apt update && sudo apt upgrade -y

Next, you need to install a few necessary dependencies, including tools for Python, Git, and graphics libraries that will allow InvokeAI to run smoothly on your system:

sudo apt install git python3 python3-venv build-essential libglib2.0-0 -y

Step 2: Installing InvokeAI

Next, let’s download the InvokeAI repository from GitHub by running the following commands, which will clone the repository to your local machine:

cd ~
git clone https://github.com/invoke-ai/InvokeAI.git
cd InvokeAI

It’s important to use a virtual environment to manage dependencies without interfering with other projects.

python3 -m venv .venv
source .venv/bin/activate

Now that the virtual environment is set up, let’s install InvokeAI by running the following command, which will download and install the necessary Python packages for InvokeAI.

pip install invokeai

Once the installation is complete, you can start the InvokeAI web interface by running the following command:

invokeai-web

Within a few moments, you will see output indicating that the web server is running, typically at http://127.0.0.1:9090. Copy and paste that link into your browser to access the InvokeAI web interface.

InvokeAI Web Interface

Step 3: Installing Models in InvokeAI

Now that you've installed InvokeAI, you'll need to install some models by going to:

  1. Go to the Models tab.
  2. Click Starter Models on the right.
  3. You can choose a starter bundle or manually add custom Stable Diffusion models later if you prefer more advanced or specific outputs. 
Install Models in InvokeAI

During the download and installation process, you’ll likely see a progress bar or some notification indicating that the model is being downloaded.

Once the model has finished downloading and installing, you can select the newly installed model in the InvokeAI web interface.

Choose Model in InvokeAI

Step 4: Creating AI Art Using InvokeAI

Now you can start creating AI-generated images by entering text prompts in the web interface, and InvokeAI will use the installed model to generate the artwork.

In the web interface, you’ll see a box to type your prompt (e.g., "A beautiful sunset over the ocean"). Type whatever scene or idea you want to generate.

Generate AI Images Using InvokeAI

You can adjust various settings like image size, the number of steps the AI should take, and the guidance scale. If you’re new to this, try the default settings first.

After typing your prompt and adjusting settings, click the “Invoke” button. It may take a few moments, and then you’ll see your AI-generated image appear!

Once you're happy with the result, click "Save" to download the image to your computer.

Generated AI Image

Step 5: Updating InvokeAI

If you’re using InvokeAI and want to make sure you're always working with the latest features and bug fixes, it's easy to update to the newest version.

InvokeAI is installed in a virtual environment, so you need to make sure you’re working inside it before updating.

To activate your virtual environment, run the following command:

source .venv/bin/activate

Once you’ve activated the virtual environment, it’s time to update InvokeAI itself.

pip install --upgrade invokeai

Conclusion

And there you have it! With InvokeAI set up on your Ubuntu system, you're ready to start turning your ideas into beautiful AI-generated images.

Just type in a prompt, hit “Invoke,” and let the magic happen. Have fun exploring, and happy creating!

If you ran into any problems during setup or have questions along the way, feel free to drop a comment - we’re here to help!