chaiNNer-org / chaiNNer

A node-based image processing GUI aimed at making chaining image processing tasks easy and customizable. Born as an AI upscaling application, chaiNNer has grown into an extremely flexible and powerful programmatic image processing application.
https://chaiNNer.app
GNU General Public License v3.0
4.4k stars 275 forks source link

Add integration with AI Horde #1799

Open db0 opened 1 year ago

db0 commented 1 year ago

Motivation I wish to allow people without GPUs access to things like ESRGAN, GFPGAN, and even Stable Diffusion and LLMs

As a lot of the advanced features of Chainner require both some technical knowledge with model downloads and installs and often even the existence of a GPU in order to do things in a reasonable amount of time. By hooking into the AI Horde, you can allow people to use even the most intensive features of Chainner on potato PCs

Description The AI Horde is a FOSS, Crowdsourced API for providing access to GPU intensitve tasks, such as GenerativeAI to everyone. The API is completely free and runs on volunteer GPUs.

Simple create nodes which will connect to the AI Horde and initiate an asynchronous request for post-processing (e.g. things like ESRGAN) or GenerativeAI like Stable Diffusion.

You can see and copy a full python implementation in the ofificial AI Horde CLI clients

Alternatives None. Someone without a GPU is stuck with very long operation, or just straight up impossible tasks.

joeyballentine commented 1 year ago

This would be an interesting external integration for sure, thanks for the suggestion. I took a look at their API docs and i don't see anything related to upscaling on there, only image generation. Where can I find out about what upscaling they offer?

db0 commented 1 year ago

disclaimer: I'm the lead dev of AI Horde ;)

Upscaling is under interrogate (yes, the API needs new version where we'll rename it to alchemy but it will work the same)

image

You can send an image with a payload of one or more post-processor names you want to /api/v2/interrogate/async. Get the request ID, and then poll /api/v2/interrogate/status/<id> until it's done

db0 commented 1 year ago

Python implementation in https://github.com/db0/AI-Horde-CLI/blob/main/cli_request_alchemy.py

RunDevelopment commented 1 year ago

This seems very doable then.