-
-
Notifications
You must be signed in to change notification settings - Fork 130
Terminology
An AI Horde
is the underlying middleware doing the smart queuing and clustering. The official AI Horde is the only publicly running instance of an AI Horde at the moment, but people can set up other private or public AI Hordes.
Different AI Hordes do not share workers, users or kudos with each other.
A Bridge
is a software doing the REST API communication between the inference worker and the AI Horde as well performing queue management on the local side.
A Worker
is the software using things like PyTorch to do inference for text or images. For example KoboldAI Client is the official worker for a Scribe, while hordelib is the official worker for a Dreamer.
Frontend
is the software with which the user interacts directly to talk to the AI Horde. It translates user requirements to an API payload. It can be written in any programming language and can run either on as a local executable or on the browser or on top of another service like a Bot.
See Frontend
Stands for "User Interface". Sometimes called "UX" for "User eXperience"
See Frontend
A Bot
is typically an AI Horde integration that runs on someone else's server, and integrates between a different service and AI Horde. For example a discord bot provides the integration between Discord and AI Horde. A Reddit bot provides the integration between Reddit and AI Horde. Bots typically run as proxies.
A Python library for interacting with the AI Horde API, it's goal is to minimize the time required to develop integrations written in Python, it supports Image Generation, Image Captioning and Image Rating.
A Proxy
is a service which sits between the Frontend and a AI Horde. This means that a AI Horde request logic is handled the proxy servers instead of the user's computer. For example in a Discord Bot, the Discord itself (and the /slash
command therein) is the Frontend and the bot servers are the proxy.
Proxies can read your request details, and even store your API key for re-use later. As such, it's important to not use proxy services you do not trust!
A piece of code that is called from within another application to extend its functionalities so that it can talk to the AI Horde. For example the Krita plugin allows Krita to perform inpainting on images being worked on.
Any software which uses the AI Horde API to provide functionality.
The RESTful interface to an AI Horde. The official one can be found at https://aihorde.net/api.
The content sent to or from the API.
For example, a payload send to an text2img request will contain the user's API key, the prompt, the amount of images required, the resolution and the model required.
A payload received by a Dreamer will likewise contain likewise a prompt, resolution and model, but instead of an API key, it will contain a job UUID.
A random assortment of characters identifying a user of an AI Horde and allowing to use all operations of the API. It should be treated like a password and not shared with anyone. To share keys, see Shared Key
A UUID identifying a user of an AI Horde which can only be used for generating images or text. It cannot be used for any other purpose and is meant to be shared.
An AI Horde Bridge providing text2img, img2img and inpainting capabilities.
Dreamers generate kudos per image generation with the baseline being 10 kudos for an image of 512x512 pixels at 50 steps.
Dreamers also receive uptime kudos every 10 minutes, with the number increasing with the amount of models they serve at the same time
An AI Horde Bridge providing LLM Generation capabilities
Scribes generate kudos per text generation with the baseline being 10 kudos for 80 tokens in a 2.7b model. The kudos generated scales with the amount of parameters in the model size.
Scribes also receive uptime kudos every 10 minutes, with the number increasing with the parameters in by their model.
An AI Horde Bridge providing Image Interrogation and Image post-processing capabilities
Alchemists generate kudos per image alchemy with the baseline being 1-3 kudos based on the difficulty of the task
Alchemists also receive 40 uptime kudos every 10 minutes.
Processing an Image via ML Models and figuring out information about it, such as a potential caption, or whether it's NSFW
See img2text
Processing an image and altering it in some way. For example upscaling it, fixing a badly drawn face, or removing its background.
Not to be confused with img2img or inpainting
See Wikipedia
The AI Horde uses Stable Diffusion
Using an image as the noise source for a Stable Diffusion generation.
An img2img can optionally be provided with a mask which points only a small area of it. It is a worse version of inpainting but it's advantage is that it can be run on any model
A specialized AI model for changing only parts of the image, while keeping the rest intact. Better trained to take context into account compared to img2img + mask
An image matching the resolution of an source image sent to img2img or inpainting, but in black and white. Black areas represents the areas to leave intact, while white represent the areas to run inference against.
Generating text using LLM models
The most popular open source Generative AI model for text to image operations.
An open source software capable of providing local LLM Inference. It provides its own REST API, which allows it to be used by the AI Horde as a (worker)[#Worker]. Newer versions come with a built-in scribe.
The wrapper around comfyUI, turning it into a library which can then be embedded into the official AI Horde dreamer
Hordelib is provided as a a pypi library that can be imported into any other FOSS python project requiring Stable Diffusion capabilities.
A FOSS local UI for Stable Diffusion inference written in python. It is used by hordelib to turn it into a python library.
Stands for Large Language Model
An account existing in an AI Horde and allowed to perform operations in the API. There's three types of users
- oauth2 user.
- pseudonymous user.
- anonymous user. It has the lowest priority by default
A protocol allowing an AI Horde to identify a user using another identity provides. Used because it offloads user management elsewhere.
An account registered after logging in with one of the oauth2 services supported by the AI Horde has the highest priority when generating by default.
The use of oauth2 for authentication allows the user to change their username or reset their API key
An account registered without logging in with the oauth2 services. It has the second highest priority by default but it cannot be recovered if the user misplaces its API key
Any user using the 0000000000
API key is identified as anonymous. They can use the generation capabilities of the AI horde, but they have the lowest priority
The priority mechanism which specifies which user's request is generated first.
Kudos can be traded but is not allowed to be sold.
Kudos is generated for the worker when an job is fulfilled. The user who requested it consumes that amount of kudos and the worker generates the same amount.
Kudos cannot fall below a minimum based on the user type, and a user can request generation even when at their minimum.
An extra amount of kudos burnt whenever a request is put in the horde. They are not given to the worker fulfilling the job. It represents the infrastructure costs of running the AI Horde.
This amount is usually a tiny amount per request, a tiny amount per job, and a percentage addition for heavier operation like img2img.
The payload sent by the user via their chosen integration. A request can be for 1 or more jobs.
Each Request receives a unique ID (UUID) for the user who requested it to track its status.
Each request is split into multiple jobs
so that it can be better parallelized to different workers.
Each job has a unique ID (UUID) which is not the same as the request UUID. Each job is assigned only to the worker which picked it up and allows for the user to track which worker fulfilled it.
A worker cannot see any information about the user who requested a specific job.
A classification for users which specify extra capabilities.
A classification for a worker or user which specify extra restrictions
A user who has ability to set new #moderators or modify user kudos.
A user who has ability to set flags or roles. They cannot modify kudos or assign moderator roles.
They are responsible to ensure any malicious actors are quickly dealt with to avoid disrupting the AI Horde operations.
Moderators also get a monthly kudos stipend.
A user who has run a worker for at least one week and generated an significant amount of kudos through inference.
Trusted user gets the ability to run a worker behind a VPN, and they cannot get suspicion anymore. They also get a special role in the official Discord server.
Any time a user does something problematic, such as their worker generating images way too fast, or picking up a lot jobs and not generating them , they get a suspicion point. Enough of these and a user is marked as suspicious.
Suspicious users cannot transfer or be given kudos, and if their worker keep misbehaving, they might be paused
Suspicion can be cleared by moderators on request if there's a valid reason.
A worker flag which specifies the worker should not receive any jobs from the horde, even though it keeps polling for jobs.
Maintenance can be set and unset by the worker's owner or by a moderator. Optionally a maintenance can receive a custom message.
A worker in maintenance will still pick up jobs from its owner, but they will have to pay the [horde tax](#horde tax) making using a worker in maintenance a net negative.
A maintenance due to being flagged cannot be unset by the owner.
A worker flag which specifies the worker from a malicious actor. A paused worker will still think they're receiving jobs, but they are fake. This is a countermeasure against raids.
A user set as flagged will be treated always as suspicious and all their workers will be set to maintenance which cannot be cleared by their owner. This is a countermeasure against malicious actors.
A situation where an AI Horde is being attacked by malicious actors in some manner. For example workers pickup up jobs and not returning them, or picking up jobs and returning hate speech etc.
Logical operation in an AI Horde which attempt to prevent malicious actors from disrupting operations automatically. For example a worker which is never returning picked up jobs will be automatically be set to maintenance and eventually as paused as a countermeasure.
Someone who is attempting to disrupt an AI Horde in some manner for unknown reasons.
A Trained Machine Learning file which contains the information needed by a worker on how to generate the image or text required.
Free and Open Sourced Software
Cloudflare R2 is an object storage service that the AI Horde uses to store and distribute images, if R2 is set to true in API, AI Horde will return a download link to R2.
The servers and software stack under which the AI Horde is running
The AI Horde relies on the following software and services
- Linux
- Python 3
- HAProxy
- Postgresql
- Redis
- Cloudflare R2