Enhance AIImages mod with settings support and improved UI for image generation. Update localized strings in English and Russian for better clarity. Refactor code for better organization and maintainability.

This commit is contained in:
Leonid Pershin
2025-10-26 18:09:30 +03:00
parent 990c8695b7
commit 0f60721162
17 changed files with 1907 additions and 335 deletions

View File

@@ -0,0 +1,62 @@
namespace AIImages.Models
{
/// <summary>
/// Настройки для генерации изображений через Stable Diffusion
/// </summary>
public class StableDiffusionSettings
{
public string PositivePrompt { get; set; }
public string NegativePrompt { get; set; }
public int Steps { get; set; }
public float CfgScale { get; set; }
public int Width { get; set; }
public int Height { get; set; }
public string Sampler { get; set; }
public int Seed { get; set; }
public string Model { get; set; }
public ArtStyle ArtStyle { get; set; }
public ShotType ShotType { get; set; }
public StableDiffusionSettings()
{
// Значения по умолчанию
Steps = 30;
CfgScale = 7.5f;
Width = 512;
Height = 768;
Sampler = "Euler a";
Seed = -1; // Случайный seed
ArtStyle = ArtStyle.Realistic;
ShotType = ShotType.Portrait;
PositivePrompt = "";
NegativePrompt = "ugly, deformed, low quality, blurry, bad anatomy, worst quality";
}
}
/// <summary>
/// Художественный стиль изображения
/// </summary>
public enum ArtStyle
{
Realistic,
SemiRealistic,
Anime,
ConceptArt,
DigitalPainting,
OilPainting,
Sketch,
CellShaded,
}
/// <summary>
/// Тип кадра/композиции
/// </summary>
public enum ShotType
{
Portrait, // Портрет (голова и плечи)
HalfBody, // Половина тела
FullBody, // Полное тело
CloseUp, // Крупный план
ThreeQuarter, // Три четверти
}
}