elephantsaunter / aitools_server

Stable Diffusion web UI server forked to support Seth's AI Tools

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AI Tools Server

(warning, version in the video above is outdated, but does give an idea of the workflow)

This is a forked version of the AUTOMATIC1111/stable-diffusion-webui project that can be controlled with the native Unity-based front-end Seth's AI Tools client via an API. There is a Jupyter notebook script in the aitools subdir illustrating the API.

Features of the AI Tools Client:

  • It's not a web app, it's a native .exe
  • Photoshop/image editor integration with live update
  • text to image, inpainting, image interrogation, face fixing, upscaling, tiled texture generation with preview
  • Drag and drop images in as well as paste images from windows clipboard
  • Pan/zoom with thousands of images on the screen
  • Mask painting with controllable brush size
  • Can utilize multiple servers allowing seamless use of all remote GPUs for ultra fast generation
  • All open source, use the Unity game engine and C# to do stuff with AI art
  • Neat workflow that allows evolving images with loopback while live-selecting the best alteratives to shape the image in real-time

Note: This repository was deleted and replaced with the AUTOMATIC1111/stable-diffusion-webui fork Sept 19th 2022, it has completely replaced the original AI Tools backend server.

Latest changes (Oct 6th, 2022)

  • Versioned to 0.25 (requires client V0.46+)
  • Now using new API code for client communication
  • Synced with AUTOMATIC1111's latest changes

Installation and Running (modified from stable-diffusion-webui docs)

Make sure the required dependencies are met and follow the instructions available for both NVidia (recommended) and AMD GPUs.

Automatic Installation on Windows

  1. Install Python 3.10.6, checking "Add Python to PATH"
  2. Install git.
  3. Download the aitools_server repository, for example by running git clone https://github.com/SethRobinson/aitools_server.git.
  4. Place model.ckpt in the models directory (see dependencies for where to get it).
  5. Run webui-user.bat from Windows Explorer as normal, non-administrator, user.

Automatic Installation on Linux

  1. Install the dependencies:
# Debian-based:
sudo apt install wget git python3 python3-venv
# Red Hat-based:
sudo dnf install wget git python3
# Arch-based:
sudo pacman -S wget git python3
  1. To install in /home/$(whoami)/aitools_server/, run:
bash <(wget -qO- https://raw.githubusercontent.com/SethRobinson/aitools_server/master/webui.sh)

Adding a few necessary files (needed for Win/linux installs)

  1. Place model.ckpt in the base aitools_server directory (see dependencies for where to get it).
  2. Run the server from shell with:
python launch.py --listen --port 7860 --api

Google Colab

Don't have a strong enough GPU or want to give it a quick test run without hassle? No problem, use this Colab notebook. (Works fine on the free tier)

Running Seth's AI Tools front end

Verify the server works by visiting it with a browser. You should be able to generate and paint images via the default web gradio interface. Now you're ready to use the native client.

Note The first time you use the server, it may appear that nothing is happening - look at the server window, it's probably downloading a bunch of stuff. This only happens the first time!

The client should start up. If you click "Generate", images should start being made. By default it tries to find the server at localhost at port 7860. If it's somewhere else, you need to click "Configure" and edit/add server info. You can add/remove multiple servers on the fly while using the app. (all will be utilitized simultaneously by the app)

Using multiple GPUs on the same computer

You can run multiple instances of the server from the same install.

Start one instance:

CUDA_VISIBLE_DEVICES=0 python launch.py --listen --port 7860 --api

Then from another shell start another specifying a different GPU and port:

CUDA_VISIBLE_DEVICES=1 python launch.py --listen --port 7861 --api

Then on the client, click Configure and edit in an add_server command for both servers.

Credits

About

Stable Diffusion web UI server forked to support Seth's AI Tools


Languages

Language:Jupyter Notebook 83.4%Language:Python 15.1%Language:JavaScript 1.1%Language:CSS 0.2%Language:Shell 0.2%Language:Batchfile 0.0%