Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

AddStableDiffusionCpp

Method
📦 CommunityToolkit.Aspire.Hosting.StableDiffusionCpp v13.6.1
func (DistributedApplicationBuilder) AddStableDiffusionCpp(
name string,
options ...*AddStableDiffusionCppOptions,
) StableDiffusionCppResource

Signature

methodAddStableDiffusionCppbuilder
Adds a stable-diffusion.cpp container resource using an official image.
AddStableDiffusionCpp(
name string,
options ...*AddStableDiffusionCppOptions,
) StableDiffusionCppResource
namestringThe resource name.
options...*AddStableDiffusionCppOptionsOptional settings, described under Options.

Optional parameters are passed in a trailing options ...*AddStableDiffusionCppOptions argument.

ImageVariant*StableDiffusionCppImageVariantThe official image variant to use.
Port*float64An optional host port. Aspire assigns one when omitted.
ModelsDirectory*stringAn optional host directory used for models. Defaults to .stable-diffusion-cpp/{name}/models under the AppHost directory.
StableDiffusionCppResource

A builder for the stable-diffusion.cpp resource.

Returns a handle; failures surface later via Err().

Applies to

This method applies to the following types:

typeDistributedApplicationBuilder