Enhance SwarmUI settings by adding a scheduler property and updating the client to send clip stop at layer instead of clip skip. Added tests to verify the new behavior.
ci / server (push) Failing after 3m41s
ci / client (push) Failing after 14s

This commit is contained in:
Leonid Pershin
2026-08-20 05:02:44 +03:00
parent f603cdd9a9
commit 9225327d31
10 changed files with 487 additions and 2 deletions
+7 -1
View File
@@ -90,9 +90,15 @@ internal sealed class SwarmUiClient
body["sampler"] = settings.Sampler;
}
if (!string.IsNullOrWhiteSpace(settings.Scheduler))
{
body["scheduler"] = settings.Scheduler;
}
if (settings.ClipSkip > 0)
{
body["clipskip"] = settings.ClipSkip;
// SwarmUI "CLIP Stop At Layer" — clip skip N is layer -N from the end.
body["clipstopatlayer"] = -settings.ClipSkip;
}
using var content = new StringContent(JsonSerializer.Serialize(body), Encoding.UTF8, "application/json");
@@ -15,6 +15,8 @@ internal sealed class SwarmUiSettings
public string Sampler { get; init; } = "euler";
public string Scheduler { get; init; } = "";
public long Seed { get; init; } = -1;
public string Positive { get; init; } = "";
+2 -1
View File
@@ -3,7 +3,8 @@
"steps": 4,
"cfgScale": 2,
"clipSkip": 2,
"sampler": "DPM++ SDE Karras",
"sampler": "dpmpp_sde",
"scheduler": "karras",
"seed": 3346112079,
"positive": "cinematic photo, realist detail, detailed character expressions, amazing quality, analog film grain, school portrait photograph, neutral background, natural lighting, realistic, sharp focus",
"negative": "(low quality, worst quality:1.4), cgi, text, signature, watermark, extra limbs, nsfw, nude, naked, explicit, blurry, deformed, bad anatomy, logo",