Skip to content
DocsTry Aspire
DocsTry

StableDiffusionCppResource

Handle
📦 CommunityToolkit.Aspire.Hosting.StableDiffusionCpp v13.5.0
interface StableDiffusionCppResource
extends IComputeResource,
IExpressionValue,
IManifestExpressionProvider,
IResource,
IResourceWithArgs,
IResourceWithConnectionString,
IResourceWithEndpoints,
IResourceWithEnvironment,
IResourceWithProbes,
IResourceWithWaitSupport,
IValueProvider,
IValueWithReferences {
readonly connectionStringExpression: ReferenceExpression;
readonly imageVariant: StableDiffusionCppImageVariant;
model: StableDiffusionCppModelResource;
readonly primaryEndpoint: EndpointReference;
readonly uriExpression: ReferenceExpression;
addHuggingFaceModel(
repository: string,
fileName: string,
revision?: string): StableDiffusionCppModelResource;
addNamedHuggingFaceModel(
name: string,
repository: string,
fileName: string,
revision?: string): StableDiffusionCppModelResource;
withGPUSupport(): StableDiffusionCppResource;
withHuggingFaceToken(token: ParameterResource): StableDiffusionCppResource;
withVaeTiling(): StableDiffusionCppResource;
}

Properties

propertyconnectionStringExpressionReferenceExpressionget
Gets the ConnectionStringExpression property
propertyimageVariantStableDiffusionCppImageVariantget
Gets the selected official container image variant.
propertymodelStableDiffusionCppModelResourceget · set
Gets the configured Hugging Face model.
propertyprimaryEndpointEndpointReferenceget
Gets the primary HTTP endpoint.
propertyuriExpressionReferenceExpressionget
Gets the HTTP server URI.

Methods

methodaddHuggingFaceModelbuilder
Adds a Hugging Face model that is downloaded before the container starts.
addHuggingFaceModel(
repository: string,
fileName: string,
revision?: string): StableDiffusionCppModelResource
repositorystring
fileNamestring
revisionstringoptional= main
StableDiffusionCppModelResource
Adds a named Hugging Face model that is downloaded before the container starts.
addNamedHuggingFaceModel(
name: string,
repository: string,
fileName: string,
revision?: string): StableDiffusionCppModelResource
namestring
repositorystring
fileNamestring
revisionstringoptional= main
StableDiffusionCppModelResource
methodwithGPUSupportbuilder
Adds the container runtime arguments required by the selected GPU backend.
withGPUSupport(): StableDiffusionCppResource
StableDiffusionCppResource
Supplies a Hugging Face access token for gated or private repositories.
withHuggingFaceToken(token: ParameterResource): StableDiffusionCppResource
tokenParameterResource
StableDiffusionCppResource
methodwithVaeTilingbuilder
Processes VAE images in tiles to reduce peak memory usage during image decoding.
withVaeTiling(): StableDiffusionCppResource
StableDiffusionCppResource