AUTOMATIC1111 / stable-diffusion-webui

Stable Diffusion web UI
GNU Affero General Public License v3.0
141.87k stars 26.8k forks source link

Add support for the Stable Horde #1449

Closed db0 closed 1 year ago

db0 commented 2 years ago

The Stable Horde is free crowdsourced distributed cluster of SD workers. We already have almost 100K generated images.

I would be nice if your webui support:

  1. Requesting generations from the horde
  2. Adding your own GPU's power to the horde

Point 1 will allow even people without a powerful GPU to use this webui and also benefit from the increased paralelization

Point 2 will allow people who have spare capacity to improve the health of the horde, for the benefit of everyone.

The Stable Horde provides a fully documented REST API, so it can all be done with a few request calls.

Currently my current workers are using using a modified version of the a webui which initiates the loop which polls the horde for new generations, creates them and sends them back as base64 encoded .webp. Most of this code is just error control.

I tried to create a PR to send to this fork as well, but I cannot understand the code enough and I keep failing on dependencies. So I'm opening this issue instead, in the hope that someone more knowledgeable on this codebase than me can step in to do this.

I am also open for advice on where I could plug in the bridge myself.

randecse commented 2 years ago

No.

waldobeest commented 2 years ago

Yes

DumoeDss commented 2 years ago

Need it too.

0xdevalias commented 1 year ago

I am also open for advice on where I could plug in the bridge myself.

@db0 Given the improved support for external extensions now, I think this would probably be the perfect way to go about integrating StableHorde with this web ui:

Then you could get it added to the index, and it should be a 1 click install for any users who want it:

image

Not to mention that it would be pretty amazing to the user's of this repo who don't have powerful GPU's to potentially be able to use distributed dreambooth training too..

db0 commented 1 year ago

Anyone can make that script and publish it. I just don't have time to do it myself :) Whoever does it just needs to make sure it follows the API requirements

natanjunges commented 1 year ago

Done: https://github.com/natanjunges/stable-diffusion-webui-stable-horde.

db0 commented 1 year ago

Noice! We also support inpainting and depth2img btw.

natanjunges commented 1 year ago

Yes, I already implemented txt2img, img2img and inpainting, and I'm also trying to implement outpainting. Is depth2img any different from img2img, API-wise?

db0 commented 1 year ago

No it's transparent as img2img so long as you select the depth model.

natanjunges commented 1 year ago

OK. Is there an easy way to get a full list of supported models and their hashes? https://stablehorde.net/api/v2/status/models only returns the active ones, and without hashes.

db0 commented 1 year ago

cross-reference the model names from the API with https://github.com/Sygil-Dev/nataili-model-reference