Class MaskReferenceImage
A mask reference image. This encapsulates either a mask image provided by the user and configs for the user provided mask, or only config parameters for the model to generate a mask. A mask image is an image whose non-zero values indicate where to edit the base image. If the user provides a mask image, the mask must be in the same dimensions as the raw image.
public record MaskReferenceImage : IReferenceImage, IEquatable<MaskReferenceImage>
- Inheritance
-
MaskReferenceImage
- Implements
- Inherited Members
Properties
Config
Configuration for the mask reference image.
[JsonPropertyName("config")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public MaskReferenceConfig? Config { get; set; }
Property Value
ReferenceId
The id of the reference image.
[JsonPropertyName("referenceId")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public int? ReferenceId { get; set; }
Property Value
- int?
ReferenceImage
The reference image for the editing operation.
[JsonPropertyName("referenceImage")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public Image? ReferenceImage { get; set; }
Property Value
ReferenceType
The type of the reference image. Only set by the SDK.
[JsonPropertyName("referenceType")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? ReferenceType { get; set; }
Property Value
Methods
FromJson(string, JsonSerializerOptions?)
Deserializes a JSON string to a MaskReferenceImage object.
public static MaskReferenceImage? FromJson(string jsonString, JsonSerializerOptions? options = null)
Parameters
jsonStringstringThe JSON string to deserialize.
optionsJsonSerializerOptionsOptional JsonSerializerOptions.
Returns
- MaskReferenceImage
The deserialized MaskReferenceImage object, or null if deserialization fails.