Skip to content

Add stable-diffusion.cpp hosting integration - #1494

Open
axies20 wants to merge 1 commit into
CommunityToolkit:mainfrom
axies20:StableDiffusionCpp
Open

Add stable-diffusion.cpp hosting integration#1494
axies20 wants to merge 1 commit into
CommunityToolkit:mainfrom
axies20:StableDiffusionCpp

Conversation

@axies20

@axies20 axies20 commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Closes #1495

Adds a new CommunityToolkit.Aspire.Hosting.StableDiffusionCpp integration backed by the official stable-diffusion.cpp GHCR images.

The integration includes configurable compute image variants, Hugging Face model downloads with token and resume support, model child resources, GPU and server arguments, persistent model/LoRA/upscaler directories, tests, documentation, and a runnable example.

PR Checklist

  • Created a feature/dev branch in your fork (vs. submitting directly from a commit on main)
  • Based off latest main branch of toolkit
  • PR doesn't include merge commits (always rebase on top of our main, if needed)
  • New integration
    • Docs are written
    • Added description of major feature to project description for NuGet package (4000 total character limit, so don't push entire description over that)
  • Tests for the changes have been added (for bug fixes / features) (if applicable)
  • Contains NO breaking changes
  • Every new API (including internal ones) has full XML docs
  • Code follows all style conventions

Other information

Validation completed locally:

  • 18 integration tests passed
  • Example AppHost builds without warnings or errors
  • NuGet packaging succeeds for .NET 8, .NET 9, and .NET 10
  • dotnet format --verify-no-changes passes
  • git diff --check passes

- Implement `CommunityToolkit.Aspire.Hosting.StableDiffusionCpp` for integrating the `stable-diffusion.cpp` container.
- Introduce support for official image variants (`Cuda`, `CudaSpark`, `Vulkan`, `Sycl`, `Musa`) with GPU configurations.
- Add example projects demonstrating the usage of Stable Diffusion resources.
- Implement Hugging Face model resource integration with token-based authentication and download support.
- Include tests to validate container configurations, runtime arguments, endpoints, and Hugging Face model interactions.
- Add extensive XML documentation and a `README.md` for library usage and guidance.
- Register the package in solution and centralize dependency management.
@github-actions

Copy link
Copy Markdown
Contributor

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/CommunityToolkit/Aspire/main/eng/scripts/dogfood-pr.sh | bash -s -- 1494

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/CommunityToolkit/Aspire/main/eng/scripts/dogfood-pr.ps1) } 1494"

@axies20
axies20 marked this pull request as ready for review July 30, 2026 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add stable-diffusion.cpp hosting integration

1 participant