Class ImageJobControlNet
- Namespace
- CivitaiSharp.Sdk.Models.Jobs
- Assembly
- CivitaiSharp.Sdk.dll
Configuration for a ControlNet to apply during generation.
public sealed class ImageJobControlNet
- Inheritance
-
ImageJobControlNet
- Inherited Members
Remarks
Properties
BlobKey
Gets or sets the blob key referencing an already-uploaded control image.
[JsonPropertyName("blobKey")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? BlobKey { get; init; }
Property Value
Remarks
Provide either this property or ImageUrl, not both. Use this when the image has been pre-uploaded to Civitai's blob storage.
EndStep
Gets or sets the ending step for ControlNet influence. Range: 0.0-1.0.
[JsonPropertyName("endStep")]
public decimal? EndStep { get; init; }
Property Value
ImageUrl
Gets or sets the URL of the control image.
[JsonPropertyName("imageUrl")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? ImageUrl { get; init; }
Property Value
Remarks
Provide either this property or BlobKey, not both.
Preprocessor
Gets or sets the preprocessor to apply to the control image.
[JsonPropertyName("preprocessor")]
[JsonConverter(typeof(NullableControlNetPreprocessorConverter))]
public ControlNetPreprocessor? Preprocessor { get; init; }
Property Value
StartStep
Gets or sets the starting step for ControlNet influence. Range: 0.0-1.0.
[JsonPropertyName("startStep")]
public decimal? StartStep { get; init; }
Property Value
Weight
Gets or sets the weight/influence of this ControlNet. Range: 0.0-2.0, default: 1.0.
[JsonPropertyName("weight")]
public decimal? Weight { get; init; }
Property Value
Methods
Validate()
public void Validate()
Exceptions
- InvalidOperationException
Thrown when neither or both properties are provided.