Skip to content

Commit 05094e0

Browse files
committed
Merge pull request LykosAI#1109 from ionite34/update-base-model-parsing
update base model parsing from error response cuz civit changed response model (cherry picked from commit a397926) # Conflicts: # CHANGELOG.md
1 parent 647f19b commit 05094e0

File tree

2 files changed

+35
-6
lines changed

2 files changed

+35
-6
lines changed

CHANGELOG.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,33 @@ and this project adheres to [Semantic Versioning 2.0](https://semver.org/spec/v2
2323
- Fixed [#1305](https://github.com/LykosAI/StabilityMatrix/issues/1305) - FluxGym installing incorrect packages for Blackwell GPUs
2424
- Fixed [#1316](https://github.com/LykosAI/StabilityMatrix/issues/1316) - Errors when installing Triton & SageAttention
2525
- Fixed "directory is not empty" error when updating packages with symlinks
26+
<<<<<<< HEAD
27+
=======
28+
- Fixed missing base model types in the Checkpoint Manager & Civitai Model Browser
29+
### Supporters
30+
#### 🌟 Visionaries
31+
A huge thank you to our amazing Visionary-tier Patrons: **Waterclouds**, **Corey T**, **bluepopsicle**, **Bob S**, **Ibixat**, and our newest Visionary, **whudunit**! 🚀 Your generous support enables Stability Matrix to grow faster and tackle ambitious new ideas. You're truly making all the magic happen!
32+
33+
## v2.15.0-dev.1
34+
### Added
35+
- Added Python Version selector for all new package installs
36+
- Added the ability to rename packages
37+
### Changed
38+
- Updated all Python version management, virtual environment creation, and pip installs to use `uv` for improved reliability, compatibility, and speed
39+
- The Civitai model browser Download Location selector will now remember the last location used based on the model type
40+
- New installs of ComfyUI, SD.Next, and InvokeAI will now use Python 3.12.10, unless otherwise specified in the Advanced Options during installation
41+
- New installs of all other packages will now use Python 3.10.17, unless otherwise specified in the Advanced Options during installation
42+
### Supporters
43+
#### 🌟 Visionaries
44+
A massive thank you to our esteemed Visionary-tier Patrons: **Waterclouds**, **bluepopsicle**, **Bob S**, **Ibixat**, and **Corey T**! Your exceptional commitment propels Stability Matrix to new heights and allows us to push the boundaries of innovation. We're incredibly grateful for your foundational support! 🚀
45+
46+
## v2.14.3
47+
### Changed
48+
- Inference is now able to load image metadata from Civitai generated images via drag & drop
49+
- Updated process tracking for ComfyUI to help mitigate restart issues when using Comfy Manager
50+
### Fixed
51+
- Fixed ComfyUI-Zluda not being recognized as a valid Comfy install for the workflow browser
52+
>>>>>>> a397926b (Merge pull request #1109 from ionite34/update-base-model-parsing)
2653
2754
## v2.14.2
2855
### Changed

StabilityMatrix.Avalonia/Services/CivitBaseModelTypeService.cs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
using Microsoft.Extensions.Logging;
44
using StabilityMatrix.Core.Api;
55
using StabilityMatrix.Core.Database;
6+
using StabilityMatrix.Core.Extensions;
67
using StabilityMatrix.Core.Models.Api;
78
using StabilityMatrix.Core.Models.Database;
89

@@ -42,18 +43,18 @@ public async Task<List<string>> GetBaseModelTypes(bool forceRefresh = false, boo
4243
var jsonContent = await baseModelsResponse.Content.ReadAsStringAsync();
4344
var baseModels = JsonNode.Parse(jsonContent);
4445

45-
var jArray =
46-
baseModels?["error"]?["issues"]?[0]?["unionErrors"]?[0]?["issues"]?[0]?["options"]
47-
as JsonArray;
46+
var innerJson = baseModels?["error"]?["message"]?.GetValue<string>();
47+
var jArray = JsonNode.Parse(innerJson).AsArray();
48+
var baseModelValues = jArray[0]?["errors"]?[0]?[0]?["values"]?.AsArray();
4849

49-
civitBaseModels = jArray?.GetValues<string>().ToList() ?? [];
50+
civitBaseModels = baseModelValues?.GetValues<string>().ToList() ?? [];
5051

5152
// Cache the results
5253
var cacheEntry = new CivitBaseModelTypeCacheEntry
5354
{
5455
Id = CacheId,
5556
ModelTypes = civitBaseModels,
56-
CreatedAt = DateTimeOffset.UtcNow
57+
CreatedAt = DateTimeOffset.UtcNow,
5758
};
5859

5960
await dbContext.UpsertCivitBaseModelTypeCacheEntry(cacheEntry);
@@ -78,7 +79,8 @@ public async Task<List<string>> GetBaseModelTypes(bool forceRefresh = false, boo
7879

7980
// Return cached results if available, even if expired
8081
var expiredCache = await dbContext.GetCivitBaseModelTypeCacheEntry(CacheId);
81-
return expiredCache?.ModelTypes ?? [];
82+
return expiredCache?.ModelTypes
83+
?? Enum.GetValues<CivitBaseModelType>().Select(b => b.GetStringValue()).ToList();
8284
}
8385
}
8486

0 commit comments

Comments
 (0)