Skip to content
Projets

bentoml/BentoDiffusion has 390 GitHub stars and 29 forks. GitHot measured 0 stars in 24 hours and 0 in 7 days. Last checked 2026-11-23 06:32 UTC. Last push 2026-11-09.

Comment ces chiffres sont mesurés

Progression mesurée des étoiles

in 24h
0
in 7 days
0
in 15 days
Historique en cours
in 1 month
Historique en cours

Variations nettes sur des périodes qui se chevauchent, pas des totaux quotidiens. Les mesures absentes restent vides. Les étoiles indiquent l’intérêt, pas la qualité.

À propos

BentoDiffusion: A collection of diffusion models served with BentoML

Outils de développement

README.md

Original

Self-host Diffusion Models with 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.

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

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.

$ 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

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

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 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.

Explorer des projets similaires

Chargement…