Airunner Save

Stable Diffusion and LLMs offline on your own hardware

Project README

Banner Discord Windows Build Linux Build PyPi GitHub GitHub last commit GitHub issues GitHub closed issues GitHub pull requests GitHub closed pull requests


Stable Diffusion on your own hardware

No web server to run, additional requirements to install or technical knowledge required.

Just download the compiled package and start generating AI Art!

Screenshot from 2023-06-30 10-43-49


⭐ Features

AI Runner is a multi-modal AI application which allows you to run open-source large language models and AI image generators on your own hardware.

Feature Description
🗣️ Communication
✅ Voice-based chatbot conversations Have conversations with a chatbot using your voice
✅ Text-to-speech Convert text to spoken audio
✅ Speech-to-text Convert spoken audio to text
✅ Vision-to-text Extract text from images
✅ Text generation with LLMs Generate text using large language models
🎨 Image Generation
✅ Stable Diffusion (all versions) Generate images using Stable Diffusion
🔜 Kandinsky Generate images using Kandinsky
✅ Near Real-Time Drawing Draw and generate images in near real-time
✅ Text to Image (aka TextToImage / Txt2Img) Generate images from textual descriptions
✅ Image to Image (aka ImageToImage / Image2Image) Generate images based on input images
🖼️ Image Manipulation
✅ Inpaint and Outpaint Modify parts of an image while maintaining context
✅ Pix2Pix Transform images from one domain to another
✅ Depth to Image (aka DepthToImage / Depth2Img) Generate images from depth maps
✅ Controlnet Control image generation with additional input
✅ LoRA Efficiently fine-tune models with LoRA
✅ Textual Embeddings Use textual embeddings for image generation control
🔜 Upscale with GFPGAN Use textual embeddings for image generation control
🔧 Utility
✅ Run offline, locally Run on your own hardware without internet
✅ Fast generation Generate images in ~2 seconds (RTX 2080s)
✅ Run multiple models at once Utilize multiple models simultaneously
✅ Drawing tools Built-in tools for drawing and image manipulation
✅ Image filters Apply various filters to images
✅ Dark mode Comfortable viewing experience in low-light environments
✅ Infinite scrolling canvas Seamlessly scroll through generated images
✅ NSFW filter toggle Help control the visibility of NSFW content
✅ NSFW guardrails Help prevent generation of harmful content
✅ Standard Stable Diffusion settings Easily adjust standard Stable Diffusion parameters
✅ Fast load time, responsive interface Enjoy a smooth and responsive user experience
✅ Pure python No reliance on a webserver, pure python implementation

💻 System Requirements

Minimum system requirements

  • Cuda capable GPU
  • 6gb of RAM
  • 6gb of disc space to install AI Runner
  • RTX 2080s or higher
  • 32gb of RAM
  • 100gb disc space

🔧 Installation

Linux prerequisites

For emoji support on Ubuntu install the Noto Color Emoji font:

sudo apt install fonts-noto-color-emoji

Install portaudio, libxcb-cursor, xclip and espeak

sudo apt-get install libportaudio2 libxcb-cursor0 espeak xclip

PyPi

If you are on Windows, first install the following dependencies:

pip install pypiwin32
pip install airunner

Source

If you want to install AI Runner from source, you can do so using the following command:

git clone -b develop https://github.com/Capsize-Games/airunner.git
cd airunner && pip install -e .

The current controlnet_aux Huggingface library has a bug which is awaiting a patch (submitted by me). Until it is accepted, install controlnet manually from my fork:

git clone -b develop https://github.com/w4ffl35/controlnet_aux.git
cd  controlnet_aux
pip install -e .

If you install from pypi or source, uninstall opencv-python (we use opencv-python-headless instead)

pip uninstall opencv-python

💿 Running AI Runner

There are many ways to run AI Runner, depending on your operating system and how you installed it.

Pre-compiled

Unzip the AI Runner zip file which you downloaded from itch.io

Linux

cd airunner
./airunner

Windows

cd airunner
airunner.exe

Alternatively, you can use the itch.io launcher application which simplifies the process of downloading and running AI Runner.


Compiled from source

cd dist/airunner
./airunner

PyPi

python3 -m airunner

Uncompiled Source

cd src/airunner
python main.py

Docker

Linux:

docker-compose up linux

Windows:

docker-compose up windows

See the installation wiki page for more information


✏️ Using AI Runner

Instructions on how to use AI Runner can be found in the wiki


💾 Compiling AI Runner

Clone this repository

git clone https://github.com/Capsize-Games/airunner.git
cd airunner

Build from source

pip install -e .
pip install pyinstaller
bash build.dev.sh

Build with Docker

Production

docker-compose run build

Develop

docker-compose run devbuild

🔬 Unit tests

Run a specific test

python -m unittest src/airunner/tests/test_draggable_pixmap.py

Test coverage is currently low, but the existing tests can be run using the following command:

python -m unittest discover tests

Test coverage

Run tests with coverage tracking:

coverage run --source=src/airunner --omit=__init__.py,*/GFPGAN/*,*/data/*,*/tests/*,*_ui.py,*/enums.py,*/settings.py -m unittest discover src/airunner/tests

To see a report in the terminal, use:

coverage report

For a more detailed HTML report, run:

coverage html

View results in htmlcov/index.html.

Open Source Agenda is not affiliated with "Airunner" Project. README Source: Capsize-Games/airunner