{"id":19986513,"url":"https://github.com/bentoml/diffusers-examples","last_synced_at":"2025-07-22T22:34:12.651Z","repository":{"id":104931867,"uuid":"600264440","full_name":"bentoml/diffusers-examples","owner":"bentoml","description":"API serving for your diffusers models","archived":false,"fork":false,"pushed_at":"2024-01-19T04:23:21.000Z","size":59,"stargazers_count":11,"open_issues_count":2,"forks_count":4,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-07-15T07:12:52.970Z","etag":null,"topics":["bentoml","diffusers","model-deployment","model-serving"],"latest_commit_sha":null,"homepage":"https://bentoml.com","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bentoml.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-02-11T00:44:04.000Z","updated_at":"2025-06-03T07:46:42.000Z","dependencies_parsed_at":"2024-01-19T05:29:25.529Z","dependency_job_id":"0cc6556e-58d1-4c54-a960-66ce640194fe","html_url":"https://github.com/bentoml/diffusers-examples","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bentoml/diffusers-examples","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bentoml%2Fdiffusers-examples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bentoml%2Fdiffusers-examples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bentoml%2Fdiffusers-examples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bentoml%2Fdiffusers-examples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bentoml","download_url":"https://codeload.github.com/bentoml/diffusers-examples/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bentoml%2Fdiffusers-examples/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266586336,"owners_count":23952171,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bentoml","diffusers","model-deployment","model-serving"],"created_at":"2024-11-13T04:29:27.165Z","updated_at":"2025-07-22T22:34:12.621Z","avatar_url":"https://github.com/bentoml.png","language":"Python","readme":"# `bentoml.diffusers` examples\n\nThis repository hosts supplementary materials of the article [Creating Stable Diffusion 2.0 Service With BentoML And Diffusers](https://modelserving.com/blog/creating-stable-diffusion-20-service-with-bentoml-and-diffusers).\n\n![image](https://user-images.githubusercontent.com/861225/219499965-0e722c89-25de-4f7a-b01f-7e7c0eff89a3.png)\n\nPrompt: Kawaii low poly grey American shorthair cat character, 3D isometric render, ambient occlusion, unity engine, lively color\nNegative prompt: low-res, blurry, mutation, deformed\n\nCurrently we have three examples:\n\n- `sd2/` contains a service with `txt2img/` endpoint utilizing [`stabilityai/stable-diffusion-2`](https://huggingface.co/stabilityai/stable-diffusion-2)\n- `sd2_mega/` contains a service with `txt2img/` and `img2img/` endpoints utilizing [`stabilityai/stable-diffusion-2`](https://huggingface.co/stabilityai/stable-diffusion-2) and diffusers' [custom pipline](https://github.com/huggingface/diffusers/tree/main/examples/community)\n- `anything_v3/` contains a service with `txt2img/` endpoint utilizing [`Linaqruf/anything-v3.0`](https://huggingface.co/Linaqruf/anything-v3.0)\n\n## Prepare environment\n\nWe recommend running these services on a machine equipped with a Nvidia graphic card and CUDA Toolkit installed.\n\nFirst let's prepare a virtual environment and install requried depedencies\n\n```\npython3 -m venv venv/ \u0026\u0026 source venv/bin/activate\npip install -U -r requirements.txt\n```\n\n## Import models\n\nYou may need to authorize your huggingface account to download models, to do that, run:\n\n```\npip install -U huggingface_hub\nhuggingface-cli login\n```\n\nthen:\n\n- to import [`stabilityai/stable-diffusion-2`](https://huggingface.co/stabilityai/stable-diffusion-2), run `python3 import_model.py`\n- to import [`Linaqruf/anything-v3.0`](https://huggingface.co/Linaqruf/anything-v3.0), run `python3 import_anything_v3`\n\n## Start the service and go on\n\nAfter the model is imported, you can go into `sd2/`, `sd2_mega` or `anything_v3` and follow the readme inside the folder to start the service and make a docker image for each service\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbentoml%2Fdiffusers-examples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbentoml%2Fdiffusers-examples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbentoml%2Fdiffusers-examples/lists"}