# StableDiffusionCppModelResource

- Kind: `class`
- Package: [CommunityToolkit.Aspire.Hosting.StableDiffusionCpp](/reference/api/csharp/communitytoolkit.aspire.hosting.stablediffusioncpp.md)
- Version: `13.5.0`
- Namespace: `Aspire.Hosting.ApplicationModel`
- Target framework: `net10.0`
- Source: [GitHub](https://github.com/CommunityToolkit/Aspire/blob/4ff8268fbd97ddd23cb73dc8eff9cc92718156d1/src/CommunityToolkit.Aspire.Hosting.StableDiffusionCpp/StableDiffusionCppModelResource.cs)
- Inherits: `Resource`
- Implements: `IExpressionValue`, `IManifestExpressionProvider`, `IResource`, `IResourceWithConnectionString`, `IResourceWithParent`, `IResourceWithParent<StableDiffusionCppResource>`, `IValueProvider`, `IValueWithReferences`

Represents a model hosted by stable-diffusion.cpp and downloaded from Hugging Face.

## Definition

```csharp
namespace Aspire.Hosting.ApplicationModel;

public sealed class StableDiffusionCppModelResource
    : Aspire.Hosting.ApplicationModel.Resource,
      Aspire.Hosting.ApplicationModel.IExpressionValue,
      Aspire.Hosting.ApplicationModel.IManifestExpressionProvider,
      Aspire.Hosting.ApplicationModel.IResource,
      Aspire.Hosting.ApplicationModel.IResourceWithConnectionString,
      Aspire.Hosting.ApplicationModel.IResourceWithParent,
      Aspire.Hosting.ApplicationModel.IResourceWithParent<Aspire.Hosting.ApplicationModel.StableDiffusionCppResource>,
      Aspire.Hosting.ApplicationModel.IValueProvider,
      Aspire.Hosting.ApplicationModel.IValueWithReferences
{
    // ...
}
```

## ATS metadata

### ATS export

- Type ID: `CommunityToolkit.Aspire.Hosting.StableDiffusionCpp/StableDiffusionCppModelResource`
- Public instance properties are exported as ATS capabilities.

## Constructors

- [StableDiffusionCppModelResource(string, string, string, string, StableDiffusionCppResource)](/reference/api/csharp/communitytoolkit.aspire.hosting.stablediffusioncpp/stablediffusioncppmodelresource/constructors.md#constructor-string-string-string-string-stablediffusioncppresource) -- Represents a model hosted by stable-diffusion.cpp and downloaded from Hugging Face.

## Properties

- [ConnectionStringExpression](/reference/api/csharp/communitytoolkit.aspire.hosting.stablediffusioncpp/stablediffusioncppmodelresource/properties.md#connectionstringexpression) : `ReferenceExpression` `get` -- Describes the connection string format string used for this resource.
- [FileName](/reference/api/csharp/communitytoolkit.aspire.hosting.stablediffusioncpp/stablediffusioncppmodelresource/properties.md#filename) : `string` `get` -- Gets the model file path inside the Hugging Face repository.
- [Parent](/reference/api/csharp/communitytoolkit.aspire.hosting.stablediffusioncpp/stablediffusioncppmodelresource/properties.md#parent) : [StableDiffusionCppResource](/reference/api/csharp/communitytoolkit.aspire.hosting.stablediffusioncpp/stablediffusioncppresource.md) `get` -- Gets the parent stable-diffusion.cpp server.
- [Repository](/reference/api/csharp/communitytoolkit.aspire.hosting.stablediffusioncpp/stablediffusioncppmodelresource/properties.md#repository) : `string` `get` -- Gets the Hugging Face repository identifier.
- [Revision](/reference/api/csharp/communitytoolkit.aspire.hosting.stablediffusioncpp/stablediffusioncppmodelresource/properties.md#revision) : `string` `get` -- Gets the Hugging Face revision.
