Class ImageJobParams
- Namespace
- CivitaiSharp.Sdk.Models.Jobs
- Assembly
- CivitaiSharp.Sdk.dll
Generation parameters for image jobs.
public sealed class ImageJobParams
- Inheritance
-
ImageJobParams
- Inherited Members
Properties
ClipSkip
Gets or sets the number of CLIP layers to skip. Range: 1-12.
[JsonPropertyName("clipSkip")]
public int? ClipSkip { get; init; }
Property Value
- int?
Remarks
A value of 2 is commonly used for anime/Pony models.
ConfigurationScale
Gets or sets the classifier-free guidance scale. Range: 1-30, default: 7.0.
[JsonPropertyName("cfgScale")]
public decimal? ConfigurationScale { get; init; }
Property Value
Remarks
Higher values make the image more closely match the prompt but may reduce quality.
Note: The Civitai API uses "cfgScale" as the JSON property name, but this C# property uses the full name "ConfigurationScale" for clarity and to follow proper naming conventions.
Height
Gets or sets the image height in pixels. Must be a multiple of 8. Range: 64-2048.
[JsonPropertyName("height")]
public int? Height { get; init; }
Property Value
- int?
NegativePrompt
Gets or sets the negative prompt describing what to avoid in the generated image.
[JsonPropertyName("negativePrompt")]
public string? NegativePrompt { get; init; }
Property Value
PositivePrompt
Gets or sets the positive prompt for image generation. Required.
[JsonPropertyName("prompt")]
public required string PositivePrompt { get; init; }
Property Value
Remarks
Note: The Civitai API uses "prompt" as the JSON property name, but this C# property is named "PositivePrompt" for clarity and consistency with NegativePrompt. The API's asymmetric naming ("prompt" vs "negativePrompt") is a design flaw that this library corrects for better API usability.
Scheduler
Gets or sets the sampling algorithm to use.
[JsonPropertyName("scheduler")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonConverter(typeof(NullableSchedulerConverter))]
public Scheduler? Scheduler { get; init; }
Property Value
Seed
Gets or sets the random seed for reproducible generation.
[JsonPropertyName("seed")]
public long? Seed { get; init; }
Property Value
- long?
Steps
Gets or sets the number of sampling steps. Range: 1-100, default: 20.
[JsonPropertyName("steps")]
public int? Steps { get; init; }
Property Value
- int?
Width
Gets or sets the image width in pixels. Must be a multiple of 8. Range: 64-2048.
[JsonPropertyName("width")]
public int? Width { get; init; }
Property Value
- int?