Conversation
…nd-swarm-settings Improve CivitAI browser resilience and stop overwriting SwarmUI user settings (cherry picked from commit 3a9a8a307737bf43250deb2906cdfe49de98e528) # Conflicts: # CHANGELOG.md
[dev to main] backport: Improve CivitAI browser resilience and stop overwriting SwarmUI user settings (1239)
…Matrix-Dev-main-to-main-cebec16 Merge LykosAI/StabilityMatrix-Dev/main into main
…into downmerg-from-public
Downmerg from public
shoutout chagenlog (cherry picked from commit 5d4b4682a1fc2f2ec8008dc26e561e27a06fe1b2) # Conflicts: # CHANGELOG.md
merge conflict fix
[dev to main] backport: shoutout chagenlog (1246)
Fixed ComfyUI-Zluda not inheriting --enable-manager from the base ComfyUI launch options… (cherry picked from commit 343ade45ea75f64238646baaee9597a007b837d1) # Conflicts: # CHANGELOG.md
fix chagenlog
[dev to main] backport: Fixed ComfyUI-Zluda not inheriting --enable-manager from the base ComfyUI launch options… (1248)
add new pioneers
There was a problem hiding this comment.
Code Review
This pull request introduces support for the civitai.red domain and enhances the reliability of CivitAI model browsing by implementing API fallbacks and a multi-tiered base model type filtering system. It also resolves an issue where SwarmUI settings were overwritten during re-installation by merging configuration files instead of replacing them. Feedback from the review points out a duplicate entry in the changelog and suggests a performance optimization for string conversions within the model normalization logic.
| - Fixed CivitAI model browsing breaking during Discovery API outages — the browser now falls back to the direct CivitAI API when Discovery returns a server error, authentication failure, or times out | ||
| - Fixed SwarmUI user settings (theme, output format, server configuration, etc.) and any user-added backend entries being overwritten when the install flow ran over an existing install — `Settings.fds` and `Backends.fds` are now merged with their existing contents instead of being rewritten from a stale template | ||
| - Fixed pip requirements handling for environment-marker dependencies - thanks to @NeuralFault! | ||
| - Fixed [#1608](https://github.com/LykosAI/StabilityMatrix/issues/1608) - Crash when cdn fetch fails due to error notification not being shown on UI Thread - thanks to @NeuralFault! |
There was a problem hiding this comment.
This entry for issue #1608 is a duplicate of the one on line 14. Please remove it.
| private static List<string> NormalizeBaseModelTypes( | ||
| IEnumerable<string>? baseModels, | ||
| bool includeAllOption | ||
| ) | ||
| { | ||
| var normalized = (baseModels ?? []) | ||
| .Where(s => !string.IsNullOrWhiteSpace(s)) | ||
| .Where(s => !s.Equals("odor", StringComparison.OrdinalIgnoreCase)) | ||
| .Distinct(StringComparer.OrdinalIgnoreCase) | ||
| .OrderBy(s => s) | ||
| .ToList(); | ||
|
|
||
| normalized.RemoveAll(s => | ||
| s.Equals(CivitBaseModelType.All.ToString(), StringComparison.OrdinalIgnoreCase) | ||
| ); | ||
|
|
||
| if (includeAllOption) | ||
| { | ||
| normalized.Insert(0, CivitBaseModelType.All.ToString()); | ||
| } | ||
|
|
||
| return normalized; | ||
| } |
There was a problem hiding this comment.
CivitBaseModelType.All.ToString() is called multiple times, including inside a RemoveAll predicate. It is more efficient to evaluate this once and store it in a local variable.
private static List<string> NormalizeBaseModelTypes(
IEnumerable<string>? baseModels,
bool includeAllOption
)
{
var allOptionString = CivitBaseModelType.All.ToString();
var normalized = (baseModels ?? [])
.Where(s => !string.IsNullOrWhiteSpace(s))
.Where(s => !s.Equals("odor", StringComparison.OrdinalIgnoreCase))
.Distinct(StringComparer.OrdinalIgnoreCase)
.OrderBy(s => s)
.ToList();
normalized.RemoveAll(s =>
s.Equals(allOptionString, StringComparison.OrdinalIgnoreCase)
);
if (includeAllOption)
{
normalized.Insert(0, allOptionString);
}
return normalized;
}
Added
Changed
/api/v1/enumsendpoint, with fallbacks to the previous technique and a built-in list, so the filter stays populated even if the CivitAI response format changes or the service is unreachableFixed
Settings.fdsandBackends.fdsare now merged with their existing contents instead of being rewritten from a stale template--enable-managerfrom the base ComfyUI launch options, which blocked the bundled custom-node manager from initializing - thanks to @NeuralFault!Supporters
🌟 Visionaries
Heaps of gratitude to our Visionaries — Waterclouds, bluepopsicle, Ibixat, Droolguy, snotty, LG, and whudunit — for sticking with us release after release. Your encouragement, your patience while we chase down those last bugs, and the sheer fact of you being here keeps us showing up at the keyboard. We're so glad you're part of this little corner of the internet with us. And big warm welcomes again to our newest Visionaries MrMxyzptlk12836, Psilocyfer18731, KalAbaddon, RustCupcake, and moon_milky2843 — make yourselves at home, you're among friends! 💛
🚀 Pioneers
And the Pioneer crew — what a lineup. A massive thank-you to Szir777, [USA]TechDude, takyamtom, SinthCore, Commissar Lord Death, Ahmed S, SeraphOfSalem, and Jisuren — your steady presence, kind words, and patience as we've shifted things around mean more than you know. A heartfelt welcome back to Tigon, who's returned to the Pioneer ranks after a little time away — so glad you're back. 🎉 And a special hello to jweg79, who's been quietly supporting us for a while and just decided to step up and join the Pioneer crew this round — so happy to have you here. To our newest Pioneers, an enormous welcome: rwx14662, Hurbie53, ahnhj.al, drew.lukas, Firelight, joeto332987, Tuskaruho, Cjloha, Alligator1907, Bitti, damianpointdexter, and tmdcks! We're absolutely thrilled to have you with us. (And to our anonymous Pioneer out there too, our thanks reaches you — we see you. 💛)