stable-diffusion-multi-user  by wolverinn

Multi-user Stable Diffusion server API deployment

created 2 years ago
319 stars

Top 86.1% on sourcepulse

GitHubView on GitHub
Project Summary

This project provides a Django-based API server for Stable Diffusion, enabling multi-user access, load balancing across multiple GPUs, and autoscaling. It's designed for developers and researchers who need to build custom UIs or services around Stable Diffusion, offering features like queuing, model switching, and support for extensions like ControlNet.

How It Works

The core architecture involves a Django API server that interfaces with the stable-diffusion-webui codebase. It manages user requests, queues them, and distributes them to available GPU servers via a separate load-balancing server. This load balancer automatically directs traffic to the most suitable GPU, ensuring consistent generation cycles for users. The system supports deploying multiple models on a single GPU to maximize resource utilization.

Quick Start & Requirements

  • Installation: Deploy via Django API (requires SSH access to GPU servers) or using Runpod Serverless/Replicate.
  • Prerequisites: Python 3, Django, django-cors-headers, Apache (for Django API deployment), Docker (for Runpod/Replicate). GPU servers require sufficient VRAM for Stable Diffusion models.
  • Setup: The setup.sh script handles environment setup, model downloads, and Apache configuration.
  • Docs: https://image.stable-ai.tech/

Highlighted Details

  • Supports txt2img and img2img APIs with parameters mirroring sd-webui, including extension support.
  • Handles Civiitai models and LoRAs.
  • Enables multi-user queuing and independent model switching per user.
  • Provides downstream load-balancing server code for automatic GPU distribution.

Maintenance & Community

No specific community links (Discord/Slack) or notable contributors are mentioned in the README.

Licensing & Compatibility

The README does not explicitly state a license. Compatibility for commercial use or closed-source linking is not specified.

Limitations & Caveats

The project appears to be primarily focused on Linux environments for its Django API deployment. Specific details on error handling, performance benchmarks, or tested compatibility with various Stable Diffusion extensions are not provided.

Health Check
Last commit

1 year ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
4 stars in the last 90 days

Explore Similar Projects

Starred by Jeff Hammerbacher Jeff Hammerbacher(Cofounder of Cloudera), Stas Bekman Stas Bekman(Author of Machine Learning Engineering Open Book; Research Engineer at Snowflake), and
2 more.

gpustack by gpustack

1.6%
3k
GPU cluster manager for AI model deployment
created 1 year ago
updated 3 days ago
Starred by Anton Bukov Anton Bukov(Cofounder of 1inch Network), Chip Huyen Chip Huyen(Author of AI Engineering, Designing Machine Learning Systems), and
9 more.

exo by exo-explore

0.3%
29k
AI cluster for running models on diverse devices
created 1 year ago
updated 4 months ago
Feedback? Help us improve.