Split SwarmUI portraits into a model catalog and layered prompts.
Picker is Swarm intersect config, preset style/shot inherit model defaults, and living saves lift the old preset shape.
This commit is contained in:
@@ -102,6 +102,7 @@ public class PortraitApiTests(AppHostFixture fixture)
|
||||
TestContext.Current.CancellationToken);
|
||||
Assert.NotNull(settings);
|
||||
Assert.NotEmpty(settings!.Presets);
|
||||
Assert.NotEmpty(settings.Models);
|
||||
Assert.False(string.IsNullOrWhiteSpace(settings.ActivePresetId));
|
||||
}
|
||||
|
||||
@@ -119,6 +120,8 @@ public class PortraitApiTests(AppHostFixture fixture)
|
||||
Assert.True(document.RootElement.TryGetProperty("portraitSettings", out var presets));
|
||||
Assert.True(presets.TryGetProperty("presets", out var list));
|
||||
Assert.True(list.GetArrayLength() > 0);
|
||||
Assert.True(presets.TryGetProperty("models", out var models));
|
||||
Assert.True(models.GetArrayLength() > 0);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -193,9 +196,14 @@ public class PortraitApiTests(AppHostFixture fixture)
|
||||
string PresetId,
|
||||
string PresetLabel);
|
||||
|
||||
private sealed record SwarmUiSettingsPayload(string ActivePresetId, IReadOnlyList<SwarmUiPresetPayload> Presets);
|
||||
private sealed record SwarmUiSettingsPayload(
|
||||
string ActivePresetId,
|
||||
IReadOnlyList<SwarmUiPresetPayload> Presets,
|
||||
IReadOnlyList<SwarmUiModelPayload> Models);
|
||||
|
||||
private sealed record SwarmUiPresetPayload(string Id, string Label);
|
||||
|
||||
private sealed record SwarmUiModelPayload(string Id);
|
||||
|
||||
private sealed record SavesDirectoryResponse(string Path);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user