diff --git a/CHANGELOG.md b/CHANGELOG.md index f9de5283..5102cdfa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,15 @@ All notable changes to Stability Matrix will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning 2.0](https://semver.org/spec/v2.0.0.html). +## v2.3.3 +### Fixed +- Fixed GPU recognition for Nvidia Tesla GPUs +- Fixed checkpoint file index extension identification with some path names +- Fixed issue where config file may be overwritten during Automatic1111 package updates +- Fixed "Directory Not Found" error on startup when previously selected Data directory does not exist +- Fixed [#83](https://github.com/LykosAI/StabilityMatrix/issues/83) - Display of packages with long names in the Package Manager +- Fixed [#64](https://github.com/LykosAI/StabilityMatrix/issues/64) - Package install error if venv already exists + ## v2.3.2 ### Added - Added warning for exFAT / FAT32 drives when selecting a data directory diff --git a/StabilityMatrix.Avalonia/Assets.cs b/StabilityMatrix.Avalonia/Assets.cs index 56fd74b9..8e11c868 100644 --- a/StabilityMatrix.Avalonia/Assets.cs +++ b/StabilityMatrix.Avalonia/Assets.cs @@ -27,17 +27,22 @@ internal static class Assets [SupportedOSPlatform("windows")] [SupportedOSPlatform("linux")] + [SupportedOSPlatform("macos")] public static AvaloniaResource SevenZipExecutable => Compat.Switch( (PlatformKind.Windows, new AvaloniaResource("avares://StabilityMatrix.Avalonia/Assets/win-x64/7za.exe")), (PlatformKind.Linux | PlatformKind.X64, - new AvaloniaResource("avares://StabilityMatrix.Avalonia/Assets/linux-x64/7zzs", (UnixFileMode) 0x777))); + new AvaloniaResource("avares://StabilityMatrix.Avalonia/Assets/linux-x64/7zzs", (UnixFileMode) 0777)), + (PlatformKind.MacOS | PlatformKind.Arm, + new AvaloniaResource("avares://StabilityMatrix.Avalonia/Assets/macos-arm64/7zz", (UnixFileMode) 0x777))); [SupportedOSPlatform("windows")] [SupportedOSPlatform("linux")] + [SupportedOSPlatform("macos")] public static AvaloniaResource SevenZipLicense => Compat.Switch( (PlatformKind.Windows, new AvaloniaResource("avares://StabilityMatrix.Avalonia/Assets/win-x64/7za - LICENSE.txt")), - (PlatformKind.Linux | PlatformKind.X64, new AvaloniaResource("avares://StabilityMatrix.Avalonia/Assets/linux-x64/7zzs - LICENSE.txt"))); + (PlatformKind.Linux | PlatformKind.X64, new AvaloniaResource("avares://StabilityMatrix.Avalonia/Assets/linux-x64/7zzs - LICENSE.txt")), + (PlatformKind.MacOS | PlatformKind.Arm, new AvaloniaResource("avares://StabilityMatrix.Avalonia/Assets/macos-arm64/7zz - LICENSE.txt"))); public static AvaloniaResource PyScriptSiteCustomize => new( "avares://StabilityMatrix.Avalonia/Assets/sitecustomize.py"); diff --git a/StabilityMatrix.Avalonia/Assets/macos-arm64/7zz b/StabilityMatrix.Avalonia/Assets/macos-arm64/7zz new file mode 100755 index 00000000..a7ea6fde Binary files /dev/null and b/StabilityMatrix.Avalonia/Assets/macos-arm64/7zz differ diff --git a/StabilityMatrix.Avalonia/Assets/macos-arm64/7zz - LICENSE.txt b/StabilityMatrix.Avalonia/Assets/macos-arm64/7zz - LICENSE.txt new file mode 100644 index 00000000..8650d994 --- /dev/null +++ b/StabilityMatrix.Avalonia/Assets/macos-arm64/7zz - LICENSE.txt @@ -0,0 +1,88 @@ + 7-Zip + ~~~~~ + License for use and distribution + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + 7-Zip Copyright (C) 1999-2023 Igor Pavlov. + + The licenses for 7zz and 7zzs files are: + + - The "GNU LGPL" as main license for most of the code + - The "GNU LGPL" with "unRAR license restriction" for some code + - The "BSD 3-clause License" for some code + + Redistributions in binary form must reproduce related license information from this file. + + Note: + You can use 7-Zip on any computer, including a computer in a commercial + organization. You don't need to register or pay for 7-Zip. + + + GNU LGPL information + -------------------- + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You can receive a copy of the GNU Lesser General Public License from + http://www.gnu.org/ + + + + + BSD 3-clause License + -------------------- + + The "BSD 3-clause License" is used for the code in 7z.dll that implements LZFSE data decompression. + That code was derived from the code in the "LZFSE compression library" developed by Apple Inc, + that also uses the "BSD 3-clause License": + + ---- + Copyright (c) 2015-2016, Apple Inc. All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer + in the documentation and/or other materials provided with the distribution. + + 3. Neither the name of the copyright holder(s) nor the names of any contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + ---- + + + + + unRAR license restriction + ------------------------- + + The decompression engine for RAR archives was developed using source + code of unRAR program. + All copyrights to original unRAR code are owned by Alexander Roshal. + + The license for original unRAR code has the following restriction: + + The unRAR sources cannot be used to re-create the RAR compression algorithm, + which is proprietary. Distribution of modified unRAR sources in separate form + or as a part of other software is permitted, provided that it is clearly + stated in the documentation and source comments that the code may + not be used to develop a RAR (WinRAR) compatible archiver. + + + -- + Igor Pavlov diff --git a/StabilityMatrix.Avalonia/DesignData/DesignData.cs b/StabilityMatrix.Avalonia/DesignData/DesignData.cs index b3b3379e..0f640579 100644 --- a/StabilityMatrix.Avalonia/DesignData/DesignData.cs +++ b/StabilityMatrix.Avalonia/DesignData/DesignData.cs @@ -63,7 +63,7 @@ public static class DesignData new() { Id = Guid.NewGuid(), - DisplayName = "Dank Diffusion", + DisplayName = "Comfy Diffusion WebUI Dev Branch Long Name", PackageName = "ComfyUI", DisplayVersion = "main@ab73d4a", LibraryPath = $"Packages{Path.DirectorySeparatorChar}example-webui", @@ -297,7 +297,7 @@ public static class DesignData vm.SetPackages(settings.Settings.InstalledPackages); vm.SetUnknownPackages(new InstalledPackage[] { - UnknownInstalledPackage.FromDirectoryName("sd-unknown"), + UnknownInstalledPackage.FromDirectoryName("sd-unknown-with-long-name"), }); vm.PackageCards[0].IsUpdateAvailable = true; diff --git a/StabilityMatrix.Avalonia/Helpers/UnixPrerequisiteHelper.cs b/StabilityMatrix.Avalonia/Helpers/UnixPrerequisiteHelper.cs index 8e72b130..638333c0 100644 --- a/StabilityMatrix.Avalonia/Helpers/UnixPrerequisiteHelper.cs +++ b/StabilityMatrix.Avalonia/Helpers/UnixPrerequisiteHelper.cs @@ -173,8 +173,8 @@ public class UnixPrerequisiteHelper : IPrerequisiteHelper progress?.Report(new ProgressReport(0, "Installing Python", isIndeterminate: true)); await ArchiveHelper.Extract7ZAuto(downloadPath, PythonDir); - // For Linux, move the inner 'python' folder up to the root PythonDir - if (Compat.IsLinux) + // For Unix, move the inner 'python' folder up to the root PythonDir + if (Compat.IsUnix) { var innerPythonDir = PythonDir.JoinDir("python"); if (!innerPythonDir.Exists) diff --git a/StabilityMatrix.Avalonia/StabilityMatrix.Avalonia.csproj b/StabilityMatrix.Avalonia/StabilityMatrix.Avalonia.csproj index 657f53bb..4ba1ba23 100644 --- a/StabilityMatrix.Avalonia/StabilityMatrix.Avalonia.csproj +++ b/StabilityMatrix.Avalonia/StabilityMatrix.Avalonia.csproj @@ -8,7 +8,7 @@ app.manifest true ./Assets/Icon.ico - 2.3.2-dev.1 + 2.3.3-dev.1 $(Version) true @@ -77,6 +77,8 @@ + + diff --git a/StabilityMatrix.Avalonia/ViewModels/CheckpointManager/CheckpointFile.cs b/StabilityMatrix.Avalonia/ViewModels/CheckpointManager/CheckpointFile.cs index 8ecfff45..84e059f3 100644 --- a/StabilityMatrix.Avalonia/ViewModels/CheckpointManager/CheckpointFile.cs +++ b/StabilityMatrix.Avalonia/ViewModels/CheckpointManager/CheckpointFile.cs @@ -1,7 +1,6 @@ using System; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Diagnostics; using System.IO; using System.Linq; using System.Threading.Tasks; @@ -49,11 +48,11 @@ public partial class CheckpointFile : ViewModelBase [ObservableProperty] private bool isLoading; [ObservableProperty] private CivitModelType modelType; - public string FileName => Path.GetFileName((string?) FilePath); + public string FileName => Path.GetFileName(FilePath); public ObservableCollection Badges { get; set; } = new(); - private static readonly string[] SupportedCheckpointExtensions = { ".safetensors", ".pt", ".ckpt", ".pth", "bin" }; + private static readonly string[] SupportedCheckpointExtensions = { ".safetensors", ".pt", ".ckpt", ".pth", ".bin" }; private static readonly string[] SupportedImageExtensions = { ".png", ".jpg", ".jpeg" }; private static readonly string[] SupportedMetadataExtensions = { ".json" }; @@ -200,7 +199,8 @@ public partial class CheckpointFile : ViewModelBase { foreach (var file in Directory.EnumerateFiles(directory, "*.*", searchOption)) { - if (!SupportedCheckpointExtensions.Any(ext => file.Contains(ext))) + if (!SupportedCheckpointExtensions.Any(ext => + Path.GetExtension(file).Equals(ext, StringComparison.InvariantCultureIgnoreCase))) continue; var checkpointFile = new CheckpointFile @@ -230,7 +230,8 @@ public partial class CheckpointFile : ViewModelBase { foreach (var file in Directory.EnumerateFiles(modelsDirectory, "*.*", SearchOption.AllDirectories)) { - if (!SupportedCheckpointExtensions.Any(ext => file.Contains(ext))) + if (!SupportedCheckpointExtensions.Any(ext => + Path.GetExtension(file).Equals(ext, StringComparison.InvariantCultureIgnoreCase))) continue; var checkpointFile = new CheckpointFile @@ -239,7 +240,7 @@ public partial class CheckpointFile : ViewModelBase FilePath = file, }; - var jsonPath = Path.Combine(Path.GetDirectoryName(file), + var jsonPath = Path.Combine(Path.GetDirectoryName(file) ?? "", Path.GetFileNameWithoutExtension(file) + ".cm-info.json"); if (File.Exists(jsonPath)) @@ -251,7 +252,7 @@ public partial class CheckpointFile : ViewModelBase } checkpointFile.PreviewImagePath = SupportedImageExtensions - .Select(ext => Path.Combine(Path.GetDirectoryName(file), + .Select(ext => Path.Combine(Path.GetDirectoryName(file) ?? "", $"{Path.GetFileNameWithoutExtension(file)}.preview{ext}")).Where(File.Exists) .FirstOrDefault(); diff --git a/StabilityMatrix.Avalonia/Views/PackageManagerPage.axaml b/StabilityMatrix.Avalonia/Views/PackageManagerPage.axaml index 72f22091..5da353a0 100644 --- a/StabilityMatrix.Avalonia/Views/PackageManagerPage.axaml +++ b/StabilityMatrix.Avalonia/Views/PackageManagerPage.axaml @@ -32,18 +32,23 @@ + ColumnDefinitions="*,Auto">