Learn to serve Stable Diffusion models on cloud infrastructure at scale. This Lightning App shows load-balancing, orchestrating, pre-provisioning, dynamic batch
Learn to serve Stable Diffusion models on cloud infrastructure at scale. This Lightning App shows load-balancing, orchestrating, pre-provisioning, dynamic batch
Open source, stable-diffusion production server to show how to deploy diffusion models in a real production environment with: load-balancing, gpu-inference, performance-testing, micro-services orchestration and more. All handled easily with the Lightning Apps framework.
Full tutorial on how to build this app.
Muse uses the opensource Stable Diffusion model made available by stability AI. We apply a few fancy tricks to make the inference super fast.
Here's a small snippet showing our model server
…To run this app locally, follow these steps:
conda create --name muse_app python=3.9 --yes
conda activate muse_app
git clone https://github.com/Lightning-AI/stable-diffusion-deploy.git
cd stable-diffusion-deploy
bash dev_install.sh
## To run the app locally
python -m lightning run app app.py
## To run the app on the cloud to share it with your peers and users
python -m lightning run app app.py --cloudYou can configure Muse to select customize number of workers, batch size or select the stable diffusion version of your choice. Learn more.
Muse is a blueprint for building diffusion-based production systems with Lightning AI. This app shows you how to:
Architecture Diagram of Muse -
How to integrate Muse to a Slack Workspace
You can integrate this app in your Slack Workspace and send images in Slack channels.
This app uses the Slack Command Bot Component to interact with Slack commands.
You can also check out this video tutorial:
Step 1: Go to https://api.slack.com and create an app.
Step 2: Copy the following tokens and secrets from the Slack API settings by going to https://api.slack.com/apps. These tokens have to be passed either as argument or environment variable to SlackCommandBot class.
Required Token name and environment variables:
Step 3:
Implement the SlackCommandBot.handle_command(...) method the way you want to interact with the commands.
The return value will be shown only to you.
Step 4: (optional)
If you want your slack app to be distributable to public then you need to
implement SlackCommandBot.save_new_workspace(...) which should save team_id and its corresponding bot_token into a
database.
During the handle_command(...) method you will need to fetch bot_token based on the received team_id.
No open issues yet, or sync has not completed.