Skip to content

Commit aa7e3a1

Browse files
authored
Merge pull request #1326 from LykosAI/main
v2.14.3
2 parents efcf9e7 + 3aee57d commit aa7e3a1

27 files changed

+540
-291
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ jobs:
8787
- name: Install PupNet
8888
run: |
8989
sudo apt-get -y install libfuse2
90-
dotnet tool install -g KuiperZone.PupNet
90+
dotnet tool install -g KuiperZone.PupNet --version 1.8.0
9191
9292
- name: PupNet Build
9393
env:

CHANGELOG.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,31 @@ 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.14.3
9+
### Added
10+
- Added the ability to search by pasting an entire Civitai model URL into the search bar in the Civitai model browser
11+
### Changed
12+
- The main sidebar now remembers whether it was collapsed or expanded between restarts.
13+
- Inference is now able to load image metadata from Civitai generated images via drag & drop
14+
- Updated process tracking for ComfyUI to help mitigate restart issues when using Comfy Manager
15+
- Updated pre-selected download locations for certain model types in the Civitai model browser
16+
- Updated nodejs to v20.19.3 to support newer InvokeAI versions
17+
### Fixed
18+
- Fixed missing .NET 8 dependency for SwarmUI installs in certain cases
19+
- Fixed ComfyUI-Zluda not being recognized as a valid Comfy install for the workflow browser
20+
- Fixed [#1291](https://github.com/LykosAI/StabilityMatrix/issues/1291) - Certain GPUs not being detected on Linux
21+
- Fixed [#1284](https://github.com/LykosAI/StabilityMatrix/issues/1284) - Output browser not ignoring InvokeAI thumbnails folders
22+
- Fixed [#1301](https://github.com/LykosAI/StabilityMatrix/issues/1301) - Error when installing kohya_ss
23+
- Fixed [#1305](https://github.com/LykosAI/StabilityMatrix/issues/1305) - FluxGym installing incorrect packages for Blackwell GPUs
24+
- Fixed [#1316](https://github.com/LykosAI/StabilityMatrix/issues/1316) - Errors when installing Triton & SageAttention
25+
- Fixed "directory is not empty" error when updating packages with symlinks
26+
- Fixed missing base model types in the Checkpoint Manager & Civitai Model Browser
27+
### Supporters
28+
#### 🌟 Visionaries
29+
Big heartfelt thanks to our stellar Visionary-tier Patrons: **Waterclouds**, **Corey T**, **bluepopsicle**, **Bob S**, **Ibixat**, and **whudunit**! 🌟 Your extraordinary generosity continues to fuel Stability Matrix’s journey toward innovation and excellence. We appreciate you immensely!
30+
#### 🚀 Pioneers
31+
Massive thanks to our fantastic Pioneer-tier Patrons: **tankfox**, **Mr. Unknown**, **Szir777**, **Tigon**, **Noah M**, **USATechDude**, **Thom**, and **SeraphOfSalem**! Your unwavering support keeps our community thriving and inspires us to push even further. You’re all awesome!
32+
833
## v2.14.2
934
### Changed
1035
- Changed Nvidia GPU detection to use compute capability level instead of the GPU name for certain feature gates / torch indexes

Directory.Build.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<Project>
22
<PropertyGroup>
33
<TargetFramework>net9.0</TargetFramework>
4+
<LangVersion>preview</LangVersion>
45
<Nullable>enable</Nullable>
56
<ImplicitUsings>enable</ImplicitUsings>
67
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>

Directory.Packages.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<PackageVersion Include="Blake3" Version="1.1.0" />
1111
<PackageVersion Include="CompiledExpressions" Version="1.1.0" />
1212
<PackageVersion Include="CommandLineParser" Version="2.9.1" />
13-
<PackageVersion Include="CommunityToolkit.Mvvm" Version="8.2.2" />
13+
<PackageVersion Include="CommunityToolkit.Mvvm" Version="8.4.0" />
1414
<PackageVersion Include="Crc32.NET" Version="1.2.0" />
1515
<PackageVersion Include="CSharpDiscriminatedUnion" Version="2.0.1" />
1616
<PackageVersion Include="DeviceId" Version="6.7.0" />

StabilityMatrix.Avalonia/Helpers/PngDataHelper.cs

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ InferenceProjectDocument projectDocument
4242
while (position < inputImage.Length)
4343
{
4444
var chunkLength = BitConverter.ToInt32(
45-
inputImage[position..(position + 4)].Reverse().ToArray(),
45+
inputImage[position..(position + 4)].AsEnumerable().Reverse().ToArray(),
4646
0
4747
);
4848
var chunkType = Encoding.ASCII.GetString(inputImage[(position + 4)..(position + 8)]);
@@ -53,8 +53,10 @@ InferenceProjectDocument projectDocument
5353
{
5454
var imageWidthBytes = inputImage[(position + 8)..(position + 12)];
5555
var imageHeightBytes = inputImage[(position + 12)..(position + 16)];
56-
var imageWidth = BitConverter.ToInt32(imageWidthBytes.Reverse().ToArray());
57-
var imageHeight = BitConverter.ToInt32(imageHeightBytes.Reverse().ToArray());
56+
var imageWidth = BitConverter.ToInt32(imageWidthBytes.AsEnumerable().Reverse().ToArray());
57+
var imageHeight = BitConverter.ToInt32(
58+
imageHeightBytes.AsEnumerable().Reverse().ToArray()
59+
);
5860

5961
generationParameters.Width = imageWidth;
6062
generationParameters.Height = imageHeight;
@@ -102,7 +104,7 @@ public static byte[] RemoveMetadata(byte[] inputImage)
102104
while (position < inputImage.Length)
103105
{
104106
var chunkLength = BitConverter.ToInt32(
105-
inputImage[position..(position + 4)].Reverse().ToArray(),
107+
inputImage[position..(position + 4)].AsEnumerable().Reverse().ToArray(),
106108
0
107109
);
108110
var chunkType = Encoding.ASCII.GetString(inputImage[(position + 4)..(position + 8)]);
@@ -124,9 +126,13 @@ private static byte[] BuildTextChunk(string key, string value)
124126
{
125127
var textData = $"{key}\0{value}";
126128
var dataBytes = Encoding.UTF8.GetBytes(textData);
127-
var textDataLength = BitConverter.GetBytes(dataBytes.Length).Reverse();
129+
var textDataLength = BitConverter.GetBytes(dataBytes.Length).AsEnumerable().Reverse().ToArray();
128130
var textDataBytes = Text.Concat(dataBytes).ToArray();
129-
var crc = BitConverter.GetBytes(Crc32Algorithm.Compute(textDataBytes)).Reverse();
131+
var crc = BitConverter
132+
.GetBytes(Crc32Algorithm.Compute(textDataBytes))
133+
.AsEnumerable()
134+
.Reverse()
135+
.ToArray();
130136

131137
return textDataLength.Concat(textDataBytes).Concat(crc).ToArray();
132138
}

StabilityMatrix.Avalonia/Helpers/UnixPrerequisiteHelper.cs

Lines changed: 51 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ IPyRunner pyRunner
4646

4747
private DirectoryPath DotnetDir => AssetsDir.JoinDir("dotnet");
4848
private string DotnetPath => Path.Combine(DotnetDir, "dotnet");
49-
private bool IsDotnetInstalled => File.Exists(DotnetPath);
49+
private string Dotnet7SdkExistsPath => Path.Combine(DotnetDir, "sdk", "7.0.405");
50+
private string Dotnet8SdkExistsPath => Path.Combine(DotnetDir, "sdk", "8.0.101");
5051
private string Dotnet7DownloadUrlMacOs =>
5152
"https://download.visualstudio.microsoft.com/download/pr/5bb0e0e4-2a8d-4aba-88ad-232e1f65c281/ee6d35f762d81965b4cf336edde1b318/dotnet-sdk-7.0.405-osx-arm64.tar.gz";
5253
private string Dotnet8DownloadUrlMacOs =>
@@ -103,19 +104,17 @@ public async Task InstallPackageRequirements(
103104

104105
public async Task InstallDotnetIfNecessary(IProgress<ProgressReport>? progress = null)
105106
{
106-
if (IsDotnetInstalled)
107-
return;
107+
var downloadUrl = Compat.IsMacOS ? Dotnet8DownloadUrlMacOs : Dotnet8DownloadUrlLinux;
108108

109-
if (Compat.IsMacOS)
110-
{
111-
await DownloadAndExtractPrerequisite(progress, Dotnet7DownloadUrlMacOs, DotnetDir);
112-
await DownloadAndExtractPrerequisite(progress, Dotnet8DownloadUrlMacOs, DotnetDir);
113-
}
114-
else
109+
var dotnet8SdkExists = Directory.Exists(Dotnet8SdkExistsPath);
110+
111+
if (dotnet8SdkExists && Directory.Exists(DotnetDir))
115112
{
116-
await DownloadAndExtractPrerequisite(progress, Dotnet7DownloadUrlLinux, DotnetDir);
117-
await DownloadAndExtractPrerequisite(progress, Dotnet8DownloadUrlLinux, DotnetDir);
113+
Logger.Info("Dotnet 8 SDK already installed at {DotnetDir}", DotnetDir);
114+
return;
118115
}
116+
117+
await DownloadAndExtractPrerequisite(progress, downloadUrl, DotnetDir);
119118
}
120119

121120
private async Task InstallVirtualenvIfNecessary(IProgress<ProgressReport>? progress = null)
@@ -149,7 +148,7 @@ public async Task InstallAllIfNecessary(IProgress<ProgressReport>? progress = nu
149148
public async Task UnpackResourcesIfNecessary(IProgress<ProgressReport>? progress = null)
150149
{
151150
// Array of (asset_uri, extract_to)
152-
var assets = new[] { (Assets.SevenZipExecutable, AssetsDir), (Assets.SevenZipLicense, AssetsDir), };
151+
var assets = new[] { (Assets.SevenZipExecutable, AssetsDir), (Assets.SevenZipLicense, AssetsDir) };
153152

154153
progress?.Report(new ProgressReport(0, message: "Unpacking resources", isIndeterminate: true));
155154

@@ -177,10 +176,10 @@ public async Task InstallGitIfNecessary(IProgress<ProgressReport>? progress = nu
177176
{
178177
new TextBlock
179178
{
180-
Text = "The current operation requires Git. Please install it to continue."
179+
Text = "The current operation requires Git. Please install it to continue.",
181180
},
182181
new SelectableTextBlock { Text = "$ sudo apt install git" },
183-
}
182+
},
184183
},
185184
PrimaryButtonText = Resources.Action_Retry,
186185
CloseButtonText = Resources.Action_Close,
@@ -352,6 +351,22 @@ public async Task RunNpm(
352351
);
353352
}
354353

354+
// NOTE TO FUTURE DEVS: if this is causing merge conflicts with dev, just nuke it we don't need anymore
355+
private async Task<string> RunNode(
356+
ProcessArgs args,
357+
string? workingDirectory = null,
358+
IReadOnlyDictionary<string, string>? envVars = null
359+
)
360+
{
361+
var nodePath = Path.Combine(NodeDir, "bin", "node");
362+
var result = await ProcessRunner
363+
.GetProcessResultAsync(nodePath, args, workingDirectory, envVars)
364+
.ConfigureAwait(false);
365+
366+
result.EnsureSuccessExitCode();
367+
return result.StandardOutput ?? result.StandardError ?? string.Empty;
368+
}
369+
355370
[SupportedOSPlatform("Linux")]
356371
[SupportedOSPlatform("macOS")]
357372
public async Task<Process> RunDotnet(
@@ -396,17 +411,32 @@ public async Task<Process> RunDotnet(
396411
[SupportedOSPlatform("macOS")]
397412
public async Task InstallNodeIfNecessary(IProgress<ProgressReport>? progress = null)
398413
{
399-
if (IsNodeInstalled)
414+
// NOTE TO FUTURE DEVS: if this is causing merge conflicts with dev, just nuke it we don't need anymore
415+
if (NodeDir.Exists)
400416
{
401-
Logger.Info("node already installed");
402-
return;
417+
try
418+
{
419+
var result = await RunNode("-v");
420+
if (result.Contains("20.19.3"))
421+
{
422+
Logger.Debug("Node.js already installed at {NodeExistsPath}", NodeDir);
423+
return;
424+
}
425+
}
426+
catch (Exception)
427+
{
428+
// ignored
429+
}
430+
431+
Logger.Warn("Node.js version mismatch, reinstalling...");
432+
await NodeDir.DeleteAsync(true);
403433
}
404434

405435
Logger.Info("Downloading node");
406436

407437
var downloadUrl = Compat.IsMacOS
408-
? "https://nodejs.org/dist/v20.11.0/node-v20.11.0-darwin-arm64.tar.gz"
409-
: "https://nodejs.org/dist/v20.11.0/node-v20.11.0-linux-x64.tar.gz";
438+
? "https://nodejs.org/dist/v20.19.3/node-v20.19.3-darwin-arm64.tar.gz"
439+
: "https://nodejs.org/dist/v20.19.3/node-v20.19.3-linux-x64.tar.gz";
410440

411441
var nodeDownloadPath = AssetsDir.JoinFile(Path.GetFileName(downloadUrl));
412442

@@ -426,8 +456,8 @@ public async Task InstallNodeIfNecessary(IProgress<ProgressReport>? progress = n
426456
await ArchiveHelper.Extract7ZAuto(nodeDownloadPath, AssetsDir);
427457

428458
var nodeDir = Compat.IsMacOS
429-
? AssetsDir.JoinDir("node-v20.11.0-darwin-arm64")
430-
: AssetsDir.JoinDir("node-v20.11.0-linux-x64");
459+
? AssetsDir.JoinDir("node-v20.19.3-darwin-arm64")
460+
: AssetsDir.JoinDir("node-v20.19.3-linux-x64");
431461
Directory.Move(nodeDir, NodeDir);
432462

433463
progress?.Report(

0 commit comments

Comments
 (0)