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

BentoDiffusion

> 云原生
开源

BentoDiffusion: 一组使用 BentoML 提供的扩散模型集合

388 stars0 点赞3 次浏览
访问官网GitHub

工具介绍

BentoDiffusion: 一组使用 BentoML 提供的扩散模型集合

This repository contains a series of BentoML example projects, demonstrating how to deploy different models in the Stable Diffusion (SD) family, which is specialized in generating and manipulating images or video clips based on text prompts.

See here for a full list of BentoML example projects.

The following guide uses SDXL Turbo as an example.

Prerequisites

If you want to test the Service locally, we recommend you use an Nvidia GPU with at least 12GB VRAM.

Install dependencies

bash
git clone https://github.com/bentoml/BentoDiffusion.git
cd BentoDiffusion/sdxl-turbo

# Recommend Python 3.11
pip install -r requirements.txt

Run the BentoML Service

We have defined a BentoML Service in service.py. Run bentoml serve in your project directory to start the Service.

bash
$ bentoml serve

2024-01-18T18:31:49+0800 [INFO] [cli] Starting production HTTP BentoServer from "service:SDXLTurboService" listening on http://localhost:3000 (Press CTRL+C to quit)
Loading pipeline components...: 100%

The server is now active at http://localhost:3000. You can interact with it using the Swagger UI or in other different ways.

CURL

bash
curl -X 'POST' \
  'http://localhost:3000/txt2img' \
  -H 'accept: image/*' \
  -H 'Content-Type: application/json' \
  -d '{
  "prompt": "A cinematic shot of a baby racoon wearing an intricate italian priest robe.",
  "num_inference_steps": 1,
  "guidance_scale": 0
}'

Python client

python
import bentoml

with bentoml.SyncHTTPClient("http://localhost:3000") as client:
        result = client.txt2img(
            prompt="A cinematic shot of a baby racoon wearing an intricate italian priest robe.",
            num_inference_steps=1,
            guidance_scale=0.0
        )

For detailed explanations of the Service code, see Stable Diffusion XL Turbo.

Deploy to BentoCloud

After the Service is ready, you can deploy the application to BentoCloud for better management and scalability. Sign up if you haven't got a BentoCloud account.

Make sure you have logged in to BentoCloud.

bash
bentoml cloud login

Deploy it to BentoCloud.

bash
bentoml deploy

Once the application is up and running on BentoCloud, you can access it via the exposed URL.

Note: For custom deployment in your own infrastructure, use BentoML to generate an OCI-compliant image.

Choose another diffusion model

To deploy a different diffusion model, go to the corresponding subdirectories of this repository.

  • FLUX.1
  • Stable Diffusion 3 Medium
  • Stable Diffusion 3.5 Large Turbo
  • Stable Diffusion 3.5 Large
  • Stable Diffusion XL Lightning
  • Stable Diffusion XL Turbo
  • ControlNet

Issues· 0 开放

查看全部 Issues在 GitHub 打开

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

> 标签

Pythonaidiffusion-modelsfine-tuningkubernetes

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

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类云原生
定价开源

> 相关工具

K
Kubernetes
容器编排事实标准
H
Helm
Kubernetes 包管理器
S
seaweedfs
SeaweedFS is a distributed storage system for object storage (S3), file systems, and Iceberg tables,