stable-diffusion-multi-user  by wolverinn

Multi-user Stable Diffusion server API deployment

Created 2 years ago
318 stars

Top 85.0% 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
1 stars in the last 30 days

Explore Similar Projects

Starred by Amanpreet Singh Amanpreet Singh(Cofounder of Contextual AI), Yineng Zhang Yineng Zhang(Inference Lead at SGLang; Research Scientist at Together AI), and
7 more.

truss by basetenlabs

0.2%
1k
Model deployment tool for productionizing AI/ML models
Created 3 years ago
Updated 1 day ago
Starred by Jeff Hammerbacher Jeff Hammerbacher(Cofounder of Cloudera), Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), and
3 more.

serve by pytorch

0.1%
4k
Serve, optimize, and scale PyTorch models in production
Created 6 years ago
Updated 1 month ago
Starred by Pawel Garbacki Pawel Garbacki(Cofounder of Fireworks AI), Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), and
2 more.

gpt4free by xtekky

0.1%
65k
API package for multi-provider LLM requests (GPT-4.1, Gemini 2.5, Deepseek R1)
Created 2 years ago
Updated 5 days ago
Feedback? Help us improve.