Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ public enum ImageToImageAccept
/// <summary>
///
/// </summary>
ApplicationJson,
ApplicationDividejson,
/// <summary>
///
/// </summary>
ImagePng,
ImageDividepng,
}

/// <summary>
Expand All @@ -30,8 +30,8 @@ public static string ToValueString(this ImageToImageAccept value)
{
return value switch
{
ImageToImageAccept.ApplicationJson => "application/json",
ImageToImageAccept.ImagePng => "image/png",
ImageToImageAccept.ApplicationDividejson => "application/json",
ImageToImageAccept.ImageDividepng => "image/png",
_ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null),
};
}
Expand All @@ -42,8 +42,8 @@ public static string ToValueString(this ImageToImageAccept value)
{
return value switch
{
"application/json" => ImageToImageAccept.ApplicationJson,
"image/png" => ImageToImageAccept.ImagePng,
"application/json" => ImageToImageAccept.ApplicationDividejson,
"image/png" => ImageToImageAccept.ImageDividepng,
_ => null,
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ public enum MaskingAccept
/// <summary>
///
/// </summary>
ApplicationJson,
ApplicationDividejson,
/// <summary>
///
/// </summary>
ImagePng,
ImageDividepng,
}

/// <summary>
Expand All @@ -30,8 +30,8 @@ public static string ToValueString(this MaskingAccept value)
{
return value switch
{
MaskingAccept.ApplicationJson => "application/json",
MaskingAccept.ImagePng => "image/png",
MaskingAccept.ApplicationDividejson => "application/json",
MaskingAccept.ImageDividepng => "image/png",
_ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null),
};
}
Expand All @@ -42,8 +42,8 @@ public static string ToValueString(this MaskingAccept value)
{
return value switch
{
"application/json" => MaskingAccept.ApplicationJson,
"image/png" => MaskingAccept.ImagePng,
"application/json" => MaskingAccept.ApplicationDividejson,
"image/png" => MaskingAccept.ImageDividepng,
_ => null,
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,14 +142,6 @@ public partial class MaskingRequestBody
/// Image used to initialize the diffusion process, in lieu of random noise.<br/>
/// Example: &lt;image binary&gt;
/// </param>
/// <param name="maskImage">
/// Optional grayscale mask that allows for influence over which pixels are eligible for diffusion and at what strength. Must be the same dimensions as the `init_image`. Use the `mask_source` option to specify whether the white or black pixels should be inpainted.<br/>
/// Example: &lt;image binary&gt;
/// </param>
/// <param name="maskImagename">
/// Optional grayscale mask that allows for influence over which pixels are eligible for diffusion and at what strength. Must be the same dimensions as the `init_image`. Use the `mask_source` option to specify whether the white or black pixels should be inpainted.<br/>
/// Example: &lt;image binary&gt;
/// </param>
/// <param name="textPrompts">
/// An array of text prompts to use for generation.<br/>
/// Due to how arrays are represented in `multipart/form-data` requests, prompts must adhear to the format `text_prompts[index][text|weight]`,<br/>
Expand All @@ -168,6 +160,14 @@ public partial class MaskingRequestBody
/// text_prompts[1][weight]: -0.9<br/>
/// ```
/// </param>
/// <param name="maskImage">
/// Optional grayscale mask that allows for influence over which pixels are eligible for diffusion and at what strength. Must be the same dimensions as the `init_image`. Use the `mask_source` option to specify whether the white or black pixels should be inpainted.<br/>
/// Example: &lt;image binary&gt;
/// </param>
/// <param name="maskImagename">
/// Optional grayscale mask that allows for influence over which pixels are eligible for diffusion and at what strength. Must be the same dimensions as the `init_image`. Use the `mask_source` option to specify whether the white or black pixels should be inpainted.<br/>
/// Example: &lt;image binary&gt;
/// </param>
/// <param name="cfgScale">
/// How strictly the diffusion process adheres to the prompt text (higher values keep your image closer to your prompt)<br/>
/// Default Value: 7<br/>
Expand Down Expand Up @@ -214,9 +214,9 @@ public MaskingRequestBody(
{
this.InitImage = initImage ?? throw new global::System.ArgumentNullException(nameof(initImage));
this.InitImagename = initImagename ?? throw new global::System.ArgumentNullException(nameof(initImagename));
this.TextPrompts = textPrompts ?? throw new global::System.ArgumentNullException(nameof(textPrompts));
this.MaskImage = maskImage;
this.MaskImagename = maskImagename;
this.TextPrompts = textPrompts ?? throw new global::System.ArgumentNullException(nameof(textPrompts));
this.CfgScale = cfgScale;
this.ClipGuidancePreset = clipGuidancePreset;
this.Sampler = sampler;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ public enum TextToImageAccept
/// <summary>
///
/// </summary>
ApplicationJson,
ApplicationDividejson,
/// <summary>
///
/// </summary>
ImagePng,
ImageDividepng,
}

/// <summary>
Expand All @@ -30,8 +30,8 @@ public static string ToValueString(this TextToImageAccept value)
{
return value switch
{
TextToImageAccept.ApplicationJson => "application/json",
TextToImageAccept.ImagePng => "image/png",
TextToImageAccept.ApplicationDividejson => "application/json",
TextToImageAccept.ImageDividepng => "image/png",
_ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null),
};
}
Expand All @@ -42,8 +42,8 @@ public static string ToValueString(this TextToImageAccept value)
{
return value switch
{
"application/json" => TextToImageAccept.ApplicationJson,
"image/png" => TextToImageAccept.ImagePng,
"application/json" => TextToImageAccept.ApplicationDividejson,
"image/png" => TextToImageAccept.ImageDividepng,
_ => null,
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,18 @@ public sealed partial class TextToImageRequestBodyVariant1
/// <summary>
/// Initializes a new instance of the <see cref="TextToImageRequestBodyVariant1" /> class.
/// </summary>
/// <param name="textPrompts">
/// An array of text prompts to use for generation.<br/>
/// Given a text prompt with the text `A lighthouse on a cliff` and a weight of `0.5`, it would be represented as:<br/>
/// &lt;pre&gt;<br/>
/// "text_prompts": [<br/>
/// {<br/>
/// "text": "A lighthouse on a cliff",<br/>
/// "weight": 0.5<br/>
/// }<br/>
/// ]<br/>
/// &lt;/pre&gt;
/// </param>
/// <param name="height">
/// Height of the image in pixels. Must be in increments of 64 and pass the following validation:<br/>
/// - For 768 engines: &lt;span style='display: flex; justify-content: flex-start; gap:8px'&gt;589,824 &lt;span&gt;≤&lt;/span&gt; `height * width` &lt;span&gt;≤&lt;/span&gt; 1,048,576&lt;/span&gt;<br/>
Expand All @@ -69,18 +81,6 @@ public sealed partial class TextToImageRequestBodyVariant1
/// Default Value: 512<br/>
/// Example: 512
/// </param>
/// <param name="textPrompts">
/// An array of text prompts to use for generation.<br/>
/// Given a text prompt with the text `A lighthouse on a cliff` and a weight of `0.5`, it would be represented as:<br/>
/// &lt;pre&gt;<br/>
/// "text_prompts": [<br/>
/// {<br/>
/// "text": "A lighthouse on a cliff",<br/>
/// "weight": 0.5<br/>
/// }<br/>
/// ]<br/>
/// &lt;/pre&gt;
/// </param>
#if NET7_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
#endif
Expand All @@ -89,9 +89,9 @@ public TextToImageRequestBodyVariant1(
int? height,
int? width)
{
this.TextPrompts = textPrompts ?? throw new global::System.ArgumentNullException(nameof(textPrompts));
this.Height = height;
this.Width = width;
this.TextPrompts = textPrompts ?? throw new global::System.ArgumentNullException(nameof(textPrompts));
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ public enum UpscaleImageAccept
/// <summary>
///
/// </summary>
ApplicationJson,
ApplicationDividejson,
/// <summary>
///
/// </summary>
ImagePng,
ImageDividepng,
}

/// <summary>
Expand All @@ -30,8 +30,8 @@ public static string ToValueString(this UpscaleImageAccept value)
{
return value switch
{
UpscaleImageAccept.ApplicationJson => "application/json",
UpscaleImageAccept.ImagePng => "image/png",
UpscaleImageAccept.ApplicationDividejson => "application/json",
UpscaleImageAccept.ImageDividepng => "image/png",
_ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null),
};
}
Expand All @@ -42,8 +42,8 @@ public static string ToValueString(this UpscaleImageAccept value)
{
return value switch
{
"application/json" => UpscaleImageAccept.ApplicationJson,
"image/png" => UpscaleImageAccept.ImagePng,
"application/json" => UpscaleImageAccept.ApplicationDividejson,
"image/png" => UpscaleImageAccept.ImageDividepng,
_ => null,
};
}
Expand Down