Skip to content

Commit ba8bb70

Browse files
authored
Merge pull request LykosAI#1412 from LykosAI/main
v2.15.1
2 parents e1dc6e5 + dac3f3a commit ba8bb70

File tree

21 files changed

+353
-299
lines changed

21 files changed

+353
-299
lines changed

CHANGELOG.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,29 @@ All notable changes to Stability Matrix will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning 2.0](https://semver.org/spec/v2.0.0.html).
77

8+
## v2.15.1
9+
### Changed
10+
- Upgraded ComfyUI-Zluda and Stable Diffusion WebUI AMDGPU Forge packages to install and use HIP SDK 6.4.2
11+
- Changed ComfyUI torch index from `cu129` back to `cu128` for better compatibility with custom nodes
12+
- Updated SageAttention installer to install v2.2.0-windows.post3
13+
- Updated Nunchaku installer to install v1.0.1
14+
- Updated Windows ROCm ComfyUI installs to use recommended environment variables by default
15+
### Fixed
16+
- Fixed [#1372](https://github.com/LykosAI/StabilityMatrix/issues/1372), [#1399](https://github.com/LykosAI/StabilityMatrix/issues/1399) - LiteAsyncException upon starting Stability Matrix v2.15.0
17+
- Fixed [#1391](https://github.com/LykosAI/StabilityMatrix/issues/1391) - "Failed to parse" error when upgrading pip packages with extra index url
18+
- Fixed [#1401](https://github.com/LykosAI/StabilityMatrix/issues/1401) - "Python <version> was not found and/or failed to install" errors when path contains special characters
19+
- Fixed [#1403](https://github.com/LykosAI/StabilityMatrix/issues/1403) - Checkpoint Manager filters not being saved correctly
20+
- Fixed [#1411](https://github.com/LykosAI/StabilityMatrix/issues/1411) - SD.Next installs not using correct torch version
21+
- Fixed "cannot access local variable 'job' where it is not associated with a value" error when running jobs in AI Toolkit
22+
- Fixed Civitai browser not always returning at least 30 results when possible on initial search
23+
- Fixed model browser crashing when downloading a file with invalid characters in the name
24+
- Fixed model browser crashing when no author exists for a model
25+
### Supporters
26+
#### 🌟 Visionaries
27+
To our guiding stars, the Visionaries! Thank you **Waterclouds**, **JungleDragon**, **bluepopsicle**, **Bob S**, **Ibixat**, and **whudunit**! While this release is focused on fixes and stability, your foundational support is what empowers us to build a reliable and robust platform for everyone.
28+
#### 🚀 Pioneers
29+
A huge round of applause for our fantastic Pioneers! Your steady support helps us smooth out the rough edges and deliver a better experience with every update. Our deepest thanks to: **Szir777**, **Tigon**, **Noah M**, **USATechDude**, **Thom**, **SeraphOfSalem**, **Desert Viber**, **Tundra Everquill**, **Adam**, and **Droolguy**. We're also thrilled to welcome our newest Pioneers to the crew: **Philip R.**, **ACTUALLY_the_Real_Willem_Dafoe**, and **takyamtom**!
30+
831
## v2.15.0
932
### Added
1033
- Added new package - [AI Toolkit](https://github.com/ostris/ai-toolkit/)

StabilityMatrix.Avalonia/Helpers/WindowsPrerequisiteHelper.cs

Lines changed: 28 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ IPyInstallationManager pyInstallationManager
4545
private const string CppBuildToolsUrl = "https://aka.ms/vs/17/release/vs_BuildTools.exe";
4646

4747
private const string HipSdkDownloadUrl =
48-
"https://download.amd.com/developer/eula/rocm-hub/AMD-Software-PRO-Edition-24.Q4-Win10-Win11-For-HIP.exe";
48+
"https://download.amd.com/developer/eula/rocm-hub/AMD-Software-PRO-Edition-25.Q3-Win10-Win11-For-HIP.exe";
4949
private const string PythonLibsDownloadUrl = "https://cdn.lykos.ai/python_libs_for_sage.zip";
5050

5151
private const string UvWindowsDownloadUrl =
@@ -110,7 +110,7 @@ private string GetPythonLibraryZipPath(PyVersion version) =>
110110
private string HipSdkDownloadPath => Path.Combine(AssetsDir, "AMD-HIP-SDK.exe");
111111

112112
private string HipInstalledPath =>
113-
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles), "AMD", "ROCm", "6.2");
113+
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles), "AMD", "ROCm", "6.4");
114114

115115
private string UvDownloadPath => Path.Combine(AssetsDir, "uv.zip");
116116
private string UvExtractPath => Path.Combine(AssetsDir, "uv");
@@ -189,7 +189,7 @@ private async Task<string> RunNode(
189189

190190
result.EnsureSuccessExitCode();
191191
return result.StandardOutput ?? result.StandardError ?? string.Empty;
192-
}
192+
}
193193

194194
public async Task RunNpm(
195195
ProcessArgs args,
@@ -997,15 +997,11 @@ private async Task PatchHipSdkIfNecessary(IProgress<ProgressReport>? progress)
997997

998998
var zipFolderName = downloadUrl switch
999999
{
1000-
_ when downloadUrl.Contains("gfx1201") => null,
1001-
_ when downloadUrl.Contains("gfx1150") => "rocm gfx1150 for hip skd 6.2.4",
1002-
_ when downloadUrl.Contains("gfx1103.AMD") =>
1003-
"rocm gfx1103 AMD 780M phoenix V5.0 for hip skd 6.2.4",
1004-
_ when downloadUrl.Contains("gfx1034") => "rocm gfx1034-gfx1035-gfx1036 for hip sdk 6.2.4",
1005-
_ when downloadUrl.Contains("gfx1032") => "rocm gfx1032 for hip skd 6.2.4(navi21 logic)",
1006-
_ when downloadUrl.Contains("gfx1031") => "rocm gfx1031 for hip skd 6.2.4 (littlewu's logic)",
1007-
_ when downloadUrl.Contains("gfx1010") =>
1008-
"rocm gfx1010-xnack-gfx1011-xnack-gfx1012-xnack- for hip sdk 6.2.4",
1000+
_ when downloadUrl.Contains("gfx1103.for.hip") => "rocm gfx1103 for hip 6.4.2",
1001+
_ when downloadUrl.Contains("gfx1034") => "rocm gfx1034.gfx1035.gfx1036 for hip 6.4.2",
1002+
_ when downloadUrl.Contains("gfx1032") => "rocm gfx1032 for hip 6.4.2",
1003+
_ when downloadUrl.Contains("gfx1031") => "rocm gfx1031 for hip 6.4.2",
1004+
_ when downloadUrl.Contains("gfx1010") => "rocm gfx1010-xnack-gfx1012-xnack-.for.hip6.4.2",
10091005
_ => null,
10101006
};
10111007

@@ -1035,27 +1031,29 @@ _ when downloadUrl.Contains("gfx1010") =>
10351031

10361032
private string? GetDownloadUrlFromGpuName(string name)
10371033
{
1034+
// not used anymore but good to know for gfx -> name reference
10381035
// gfx1201
1039-
if (name.Contains("9060") || name.Contains("9070"))
1040-
{
1041-
return "https://github.com/likelovewant/ROCmLibs-for-gfx1103-AMD780M-APU/releases/download/v0.6.2.4/rocm.gfx1201.for.hip.skd.6.2.4-no-optimized.7z";
1042-
}
1036+
// if (name.Contains("9060") || name.Contains("9070"))
1037+
// {
1038+
// return "https://github.com/likelovewant/ROCmLibs-for-gfx1103-AMD780M-APU/releases/download/v0.6.2.4/rocm.gfx1201.for.hip.skd.6.2.4-no-optimized.7z";
1039+
// }
10431040

1041+
// not used anymore but good to know for gfx -> name reference
10441042
// gfx1150
1045-
if (
1046-
name.Contains("8050S")
1047-
|| name.Contains("8060S")
1048-
|| name.Contains("880M")
1049-
|| name.Contains("890M")
1050-
)
1051-
{
1052-
return "https://github.com/likelovewant/ROCmLibs-for-gfx1103-AMD780M-APU/releases/download/v0.6.2.4/rocm.gfx1150.for.hip.skd.6.2.4.7z";
1053-
}
1043+
// if (
1044+
// name.Contains("8050S")
1045+
// || name.Contains("8060S")
1046+
// || name.Contains("880M")
1047+
// || name.Contains("890M")
1048+
// )
1049+
// {
1050+
// return "https://github.com/likelovewant/ROCmLibs-for-gfx1103-AMD780M-APU/releases/download/v0.6.2.4/rocm.gfx1150.for.hip.skd.6.2.4.7z";
1051+
// }
10541052

10551053
// gfx1103
10561054
if (name.Contains("740M") || name.Contains("760M") || name.Contains("780M") || name.Contains("Z1"))
10571055
{
1058-
return "https://github.com/likelovewant/ROCmLibs-for-gfx1103-AMD780M-APU/releases/download/v0.6.2.4/rocm.gfx1103.AMD.780M.phoenix.V5.0.for.hip.sdk.6.2.4.7z";
1056+
return "https://github.com/likelovewant/ROCmLibs-for-gfx1103-AMD780M-APU/releases/download/v0.6.4.2/rocm.gfx1103.for.hip.6.4.2.7z";
10591057
}
10601058

10611059
// gfx1034, gfx1035, gfx1036
@@ -1070,7 +1068,7 @@ _ when downloadUrl.Contains("gfx1010") =>
10701068
|| name.Contains("Graphics 128SP")
10711069
)
10721070
{
1073-
return "https://github.com/likelovewant/ROCmLibs-for-gfx1103-AMD780M-APU/releases/download/v0.6.2.4/rocm.gfx1034-gfx1035-gfx1036.for.hip.sdk.6.2.4.7z";
1071+
return "https://github.com/likelovewant/ROCmLibs-for-gfx1103-AMD780M-APU/releases/download/v0.6.4.2/rocm.gfx1034.gfx1035.gfx1036.for.hip.6.4.2.7z";
10741072
}
10751073

10761074
// gfx1032
@@ -1081,7 +1079,7 @@ _ when downloadUrl.Contains("gfx1010") =>
10811079
|| name.Contains("6650")
10821080
)
10831081
{
1084-
return "https://github.com/likelovewant/ROCmLibs-for-gfx1103-AMD780M-APU/releases/download/v0.6.2.4/rocm.gfx1032.for.hip.sdk.6.2.4.navi21.logic.7z";
1082+
return "https://github.com/likelovewant/ROCmLibs-for-gfx1103-AMD780M-APU/releases/download/v0.6.4.2/rocm.gfx1032.for.hip.6.4.2.7z";
10851083
}
10861084

10871085
// gfx1031
@@ -1092,13 +1090,13 @@ _ when downloadUrl.Contains("gfx1010") =>
10921090
|| name.Contains("6850M")
10931091
)
10941092
{
1095-
return "https://github.com/likelovewant/ROCmLibs-for-gfx1103-AMD780M-APU/releases/download/v0.6.2.4/rocm.gfx1031.for.hip.sdk.6.2.4.littlewu.s.logic.7z";
1093+
return "https://github.com/likelovewant/ROCmLibs-for-gfx1103-AMD780M-APU/releases/download/v0.6.4.2/rocm.gfx1031.for.hip.6.4.2.7z";
10961094
}
10971095

10981096
// gfx1010/1012
10991097
if (name.Contains("5700") || name.Contains("5600") || name.Contains("5300") || name.Contains("5500"))
11001098
{
1101-
return "https://github.com/likelovewant/ROCmLibs-for-gfx1103-AMD780M-APU/releases/download/v0.6.2.4/rocm.gfx1010-xnack-gfx1011-xnack-gfx1012-xnack-.for.hip.sdk.6.2.4.7z";
1099+
return "https://github.com/likelovewant/ROCmLibs-for-gfx1103-AMD780M-APU/releases/download/v0.6.4.2/rocm.gfx1010-xnack-gfx1012-xnack-.for.hip6.4.2.7z";
11021100
}
11031101

11041102
return null;

StabilityMatrix.Avalonia/Models/Inference/FileNameFormat.cs

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,20 @@ public string GetFileName()
3737
return Prefix
3838
+ string.Join(
3939
"",
40-
Parts.Select(part => part.Match(constant => constant, substitution => substitution.Invoke()))
40+
Parts.Select(part =>
41+
part.Match(
42+
constant => constant,
43+
substitution =>
44+
{
45+
// Filter invalid path chars
46+
var result = substitution.Invoke();
47+
return result is null
48+
? null
49+
: Path.GetInvalidFileNameChars()
50+
.Aggregate(result, (current, c) => current.Replace(c, '_'));
51+
}
52+
)
53+
)
4154
)
4255
+ Postfix;
4356
}

StabilityMatrix.Avalonia/Models/Inference/FileNameFormatProvider.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public partial class FileNameFormatProvider
4747
{ "project_name", () => ProjectName },
4848
{ "date", () => DateTime.Now.ToString("yyyy-MM-dd") },
4949
{ "time", () => DateTime.Now.ToString("HH-mm-ss") },
50-
{ "author", () => CivitModel?.Creator.Username },
50+
{ "author", () => CivitModel?.Creator?.Username },
5151
{ "base_model", () => CivitModelVersion?.BaseModel },
5252
{ "file_name", () => Path.GetFileNameWithoutExtension(CivitFile?.Name) },
5353
{ "file_id", () => CivitFile?.Id.ToString() },

StabilityMatrix.Avalonia/ViewModels/CheckpointBrowser/CheckpointBrowserCardViewModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ private void ToggleFavorite()
212212
[RelayCommand]
213213
public void SearchAuthor()
214214
{
215-
EventManager.Instance.OnNavigateAndFindCivitAuthorRequested(CivitModel.Creator.Username);
215+
EventManager.Instance.OnNavigateAndFindCivitAuthorRequested(CivitModel.Creator?.Username);
216216
}
217217

218218
private async Task DoImport(

StabilityMatrix.Avalonia/ViewModels/CheckpointBrowser/CivitAiBrowserViewModel.cs

Lines changed: 44 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ public sealed partial class CivitAiBrowserViewModel : TabViewModelBase, IInfinit
5252

5353
private readonly SourceCache<OrderedValue<CivitModel>, int> modelCache = new(static ov => ov.Value.Id);
5454

55+
private const int TargetPageItemCount = 30;
56+
5557
[ObservableProperty]
5658
private IObservableCollection<CheckpointBrowserCardViewModel> modelCards =
5759
new ObservableCollectionExtended<CheckpointBrowserCardViewModel>();
@@ -453,8 +455,46 @@ private async Task CivitModelQuery(CivitModelsRequest request, bool isInfiniteSc
453455
}
454456
else
455457
{
456-
modelsResponse = await civitApi.GetModels(request);
457-
models = modelsResponse.Items;
458+
// Auto-paginate via cursor until we fill the target page size or run out
459+
var collectedById = new HashSet<int>();
460+
var targetCount = request.Limit ?? TargetPageItemCount;
461+
var safetyGuard = 0;
462+
463+
while (true)
464+
{
465+
var resp = await civitApi.GetModels(request);
466+
modelsResponse = resp;
467+
468+
if (resp.Items != null)
469+
{
470+
foreach (var item in resp.Items)
471+
{
472+
if (collectedById.Add(item.Id))
473+
{
474+
models.Add(item);
475+
}
476+
}
477+
}
478+
479+
// Check how many items survive local filtering
480+
var filteredCount = models
481+
.Where(m => m.Type.ConvertTo<SharedFolderType>() > 0)
482+
.Count(m => m.Mode == null);
483+
484+
var next = resp.Metadata?.NextCursor;
485+
if (filteredCount >= targetCount || string.IsNullOrEmpty(next))
486+
{
487+
break;
488+
}
489+
490+
request.Cursor = next;
491+
492+
if (++safetyGuard >= 10)
493+
{
494+
// Avoid unbounded looping on unexpected cursors
495+
break;
496+
}
497+
}
458498
}
459499

460500
if (models is null)
@@ -513,7 +553,7 @@ private async Task CivitModelQuery(CivitModelsRequest request, bool isInfiniteSc
513553
var doesBaseModelTypeMatch =
514554
SelectedBaseModels.Count == 0
515555
? request.BaseModels == null || request.BaseModels.Length == 0
516-
: SelectedBaseModels.SequenceEqual(request.BaseModels);
556+
: SelectedBaseModels.SequenceEqual(request.BaseModels ?? []);
517557
var doesModelTypeMatch =
518558
SelectedModelType == CivitModelType.All
519559
? request.Types == null || request.Types.Length == 0
@@ -634,6 +674,7 @@ private async Task SearchModels(bool isInfiniteScroll = false)
634674
// Build request
635675
var modelRequest = new CivitModelsRequest
636676
{
677+
Limit = TargetPageItemCount + 20, // Fetch a few extra to account for local filtering
637678
Nsfw = "true", // Handled by local view filter
638679
Sort = SortMode,
639680
Period = SelectedPeriod,

StabilityMatrix.Avalonia/ViewModels/CheckpointBrowser/CivitDetailsPageViewModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -651,7 +651,7 @@ private async Task ShowImageDialog(ImageSource? image)
651651
private void SearchByAuthor()
652652
{
653653
navigationService.GoBack();
654-
EventManager.Instance.OnNavigateAndFindCivitAuthorRequested(CivitModel.Creator.Username);
654+
EventManager.Instance.OnNavigateAndFindCivitAuthorRequested(CivitModel.Creator?.Username);
655655
}
656656

657657
[RelayCommand]

StabilityMatrix.Avalonia/ViewModels/CheckpointsPageViewModel.cs

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -160,16 +160,14 @@ protected override async Task OnInitialLoadedAsync()
160160

161161
await base.OnInitialLoadedAsync();
162162

163-
var settingsSelectedBaseModels = settingsManager.Settings.SelectedBaseModels;
164-
165163
AddDisposable(
166164
BaseModelCache
167165
.Connect()
168166
.DeferUntilLoaded()
169167
.Transform(baseModel => new BaseModelOptionViewModel
170168
{
171169
ModelType = baseModel,
172-
IsSelected = settingsSelectedBaseModels.Contains(baseModel),
170+
IsSelected = settingsManager.Settings.SelectedBaseModels.Contains(baseModel),
173171
})
174172
.SortAndBind(
175173
BaseModelOptions,
@@ -179,10 +177,15 @@ protected override async Task OnInitialLoadedAsync()
179177
.ObserveOn(SynchronizationContext.Current)
180178
.Subscribe(next =>
181179
{
182-
if (next.Sender.IsSelected)
183-
SelectedBaseModels.Add(next.Sender.ModelType);
184-
else
185-
SelectedBaseModels.Remove(next.Sender.ModelType);
180+
switch (next.Sender.IsSelected)
181+
{
182+
case true when !SelectedBaseModels.Contains(next.Sender.ModelType):
183+
SelectedBaseModels.Add(next.Sender.ModelType);
184+
break;
185+
case false when SelectedBaseModels.Contains(next.Sender.ModelType):
186+
SelectedBaseModels.Remove(next.Sender.ModelType);
187+
break;
188+
}
186189

187190
OnPropertyChanged(nameof(ClearButtonText));
188191
OnPropertyChanged(nameof(SelectedBaseModels));
@@ -191,6 +194,7 @@ protected override async Task OnInitialLoadedAsync()
191194

192195
var settingsTransactionObservable = this.WhenPropertyChanged(x => x.SelectedBaseModels)
193196
.Throttle(TimeSpan.FromMilliseconds(50))
197+
.Skip(1)
194198
.ObserveOn(SynchronizationContext.Current)
195199
.Subscribe(_ =>
196200
{

StabilityMatrix.Avalonia/ViewModels/Dialogs/PythonPackagesViewModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ private async Task UpgradePackageVersion(
239239

240240
if (extraIndexUrl != null)
241241
{
242-
args = args.AddArg(("--extra-index-url", extraIndexUrl));
242+
args = args.AddArgs("--extra-index-url", extraIndexUrl);
243243
}
244244

245245
var steps = new List<IPackageStep>

StabilityMatrix.Avalonia/ViewModels/Inference/ModelCardViewModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ public override void LoadStateFromJsonObject(JsonObject state)
309309
? HybridModelFile.None
310310
: ClientManager.ClipModels.FirstOrDefault(x => x.RelativePath == model.SelectedClip3Name);
311311

312-
SelectedClip4 = model.SelectedClip3Name is null
312+
SelectedClip4 = model.SelectedClip4Name is null
313313
? HybridModelFile.None
314314
: ClientManager.ClipModels.FirstOrDefault(x => x.RelativePath == model.SelectedClip4Name);
315315

0 commit comments

Comments
 (0)