Refactor AIImages mod to replace ArtStyle enum with ArtStyleDef name for improved flexibility in prompt generation. Update UI components to reflect changes in art style selection and enhance scrolling functionality in the right column. Update AIImages.dll to incorporate the latest modifications.

This commit is contained in:
Leonid Pershin
2025-10-27 00:19:31 +03:00
parent 9e675dd804
commit ce98638e55
11 changed files with 594 additions and 138 deletions

View File

@@ -14,7 +14,7 @@ namespace AIImages.Settings
public string apiEndpoint = "http://127.0.0.1:7860";
public string selectedModel = "";
public string selectedSampler = "Euler a";
public string selectedScheduler = "Automatic";
public string selectedScheduler = "Automatic"; // С большой буквы для API
// Кэшированные списки из API (не сохраняются)
[Unsaved]
@@ -38,8 +38,8 @@ namespace AIImages.Settings
public string baseNegativePrompt =
"ugly, deformed, low quality, blurry, bad anatomy, worst quality";
// Художественный стиль
public ArtStyle artStyle = ArtStyle.Realistic;
// Художественный стиль (defName)
public string artStyleDefName = "ArtStyle_Realistic";
// Путь для сохранения
public string savePath = "AIImages/Generated";
@@ -70,7 +70,7 @@ namespace AIImages.Settings
"ugly, deformed, low quality, blurry, bad anatomy, worst quality"
);
Scribe_Values.Look(ref artStyle, "artStyle", ArtStyle.Realistic);
Scribe_Values.Look(ref artStyleDefName, "artStyleDefName", "ArtStyle_Realistic");
Scribe_Values.Look(ref savePath, "savePath", "AIImages/Generated");
@@ -97,7 +97,7 @@ namespace AIImages.Settings
Scheduler = selectedScheduler,
Seed = seed,
Model = selectedModel,
ArtStyle = artStyle,
ArtStyleDefName = artStyleDefName,
PositivePrompt = basePositivePrompt,
NegativePrompt = baseNegativePrompt,
};