Giter VIP home page Giter VIP logo

aitools_server's Introduction

AI Tools Server (made to be used with Seth's AI Tools front-end)

This is a forked version of the AUTOMATIC1111/stable-diffusion-webui project - basically the same thing with some additional API features like background removal. Setup is the same, so check their github for better docs.

This server is designed to be used with the Seth's AI Tools Client <-- github page that has its download and screenshots/movies

Or, don't use my front-end client and just use its API directly:

  • Here's a Python Jupter notebook showing examples of how to use the standard AUTOMATIC1111 api
  • Here's a Python Jupter notebook showing how to use the extended features available in my forked server (AI background removal, AI subject masking, etc)

Note: This repository was deleted and replaced with the AUTOMATIC1111/stable-diffusion-webui fork Sept 19th 2022, specific missing features that I need are folded into it. Previously I had written my own custom server but that was like, too much work man

Last update Sept 1st, 2023, recent changes:

  • (merged with latest auto1111 stuff)
  • Versioned to 0.47

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.

Installation on Windows

Note: This might not work, auto1111 has changed the setup a bit and I haven't tested it under Windows, just linux. If that happens, check the auto1111 instructions instead, it should still apply here.

  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 any stable diffusion checkpoint such as sd-v1-5-inpainting.ckpt in the models/Stable-diffusion directory (see dependencies for where to get one)
  5. Run webui-user.bat from Windows Explorer as normal, non-administrator, user.

Installation on Linux

  1. Install the dependencies: Note: Requires Python 3.9+!
# Debian-based:
sudo apt install wget git python3 python3-venv libgl1 libglib2.0-0
# 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 necessary file (needed for Win/linux installs)

  1. Place sd-v1.5-inpainting.ckpt or another stable diffusion model in models/Stable-diffusion. (see dependencies for where to get it).
  2. Run the server from shell with:
python launch.py --listen --port 7860 --api

(if on linux, you can do sh runserver.sh, it's an included helper script that does something similar)

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)

How to update an existing install of the server to the latest version

Go to its directory (probably aitools_server) in a shell or command prompt and type:

git pull

Merging with Automatic1111 manually

If you feel bold, you can also merge it with the latest Automatic1111 server yourself. This CAN break things, so you probably shouldn't do this unless you really need a new feature and Seth hasn't merged the latest yet. (not recommended unless you know how to resolve what are probably simple merge issues)

sh merge_with_automatic1111.sh

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/shell, it's probably downloading a bunch of stuff for each new feature you use. 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: (uh, this is how for linux, not sure about Windows)

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 for things specific to this fork

Credits for Automatic1111's Stable Diffusion WebUI

aitools_server's People

Contributors

automatic1111 avatar dfaker avatar w-e-w avatar akx avatar catboxanon avatar brkirch avatar c43h66n12o12s2 avatar sethrobinson avatar yfszzx avatar papuspartan avatar vladmandic avatar 36db avatar space-nuko avatar missionfloyd avatar r-n avatar kohakublueleaf avatar dtlnor avatar d8ahazard avatar mezotaken avatar aria1th avatar daswer123 avatar timntorres avatar batvbs avatar ellangok avatar sakura-luna avatar discus0434 avatar random-thoughtss avatar guaneec avatar malumadev avatar orionaskatu avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.