Class ControlReferenceImage
A control reference image. The image of the control reference image is either a control image provided by the user, or a regular image which the backend will use to generate a control image of. In the case of the latter, the enable_control_image_computation field in the config should be set to True. A control image is an image that represents a sketch image of areas for the model to fill in based on the prompt.
public record ControlReferenceImage : IReferenceImage, IEquatable<ControlReferenceImage>
- Inheritance
-
ControlReferenceImage
- Implements
- Inherited Members
Properties
Config
Configuration for the control reference image.
[JsonPropertyName("config")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public ControlReferenceConfig? 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 ControlReferenceImage object.
public static ControlReferenceImage? FromJson(string jsonString, JsonSerializerOptions? options = null)
Parameters
jsonStringstringThe JSON string to deserialize.
optionsJsonSerializerOptionsOptional JsonSerializerOptions.
Returns
- ControlReferenceImage
The deserialized ControlReferenceImage object, or null if deserialization fails.