百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
S

stable-diffusion-deploy

> 编程语言
开源

学习如何在云基础架构上大规模服务 Stable Diffusion 模型。此 Lightning 应用展示了负载均衡、编排、预置、动态批量处理等功能。

391 stars0 点赞2 次浏览
访问官网GitHub

工具介绍

学习如何在云基础架构上大规模服务 Stable Diffusion 模型。此 Lightning 应用展示了负载均衡、编排、预置、动态批量处理等功能。


Muse

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.

The app is live here.

Full tutorial on how to build this app.

Model

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

…

Run your own

To run this app locally, follow these steps:

bash
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 --cloud

You can configure Muse to select customize number of workers, batch size or select the stable diffusion version of your choice. Learn more.

About this Lightning App

Muse is a blueprint for building diffusion-based production systems with Lightning AI. This app shows you how to:

  • Host a multi-tenant Frontend & Backend application architecture
  • Full React.js UI
  • Micro-services orchestration
  • Cloud infrastructure pre-provisioning
  • Serves a gpu-powered diffusion model via a REST API
  • Dynamic GPU batching for inference requests
  • Load balancer that autoscales infrastructure with load-changes
  • Load Testing Lightning Component using Locust
  • Environment variables to parametrize execution environment

Architecture Diagram of Muse -

Slackbot

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:

How to create the Slack Command Bot

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:

  • Client ID (SLACK_CLIENT_ID)
  • Client Secret (CLIENT_SECRET)
  • Signing Secret (SIGNING_SECRET)
  • Bot User OAuth Token (BOT_TOKEN)
  • App-Level Token (SLACK_TOKEN)

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.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Pythonmodel-servingstable-diffusion

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言