From fc86ee9489bba66b6a50480142835ceb35672c2e Mon Sep 17 00:00:00 2001 From: JT Date: Sat, 23 Sep 2023 17:45:01 -0700 Subject: [PATCH] misc fixes: - Fixed search not working when sort by installed - fixed missing Open Web UI button for SD.Next - changed model browser page size from 14 -> 20 --- CHANGELOG.md | 7 ++++++ .../ViewModels/CheckpointBrowserViewModel.cs | 24 ++++++++----------- .../ViewModels/SettingsViewModel.cs | 1 + .../Models/Packages/VladAutomatic.cs | 2 +- 4 files changed, 19 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 45e0c800..a9b976d3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,13 @@ 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.5 +### Changed +- Model Browser page size is now 20 instead of 14 +### Fixed +- Fixed [#141](https://github.com/LykosAI/StabilityMatrix/issues/141) - Search not working when sorting by Installed on Model Browser +- Fixed SD.Next not showing "Open Web UI" button when finished loading + ## v2.4.6 ### Added - LDSR / ADetailer shared folder links for Automatic1111 Package diff --git a/StabilityMatrix.Avalonia/ViewModels/CheckpointBrowserViewModel.cs b/StabilityMatrix.Avalonia/ViewModels/CheckpointBrowserViewModel.cs index f7cc495e..c9a24bfb 100644 --- a/StabilityMatrix.Avalonia/ViewModels/CheckpointBrowserViewModel.cs +++ b/StabilityMatrix.Avalonia/ViewModels/CheckpointBrowserViewModel.cs @@ -50,7 +50,7 @@ public partial class CheckpointBrowserViewModel : PageViewModelBase private readonly ServiceManager dialogFactory; private readonly ILiteDbContext liteDbContext; private readonly INotificationService notificationService; - private const int MaxModelsPerPage = 14; + private const int MaxModelsPerPage = 20; private LRUCache< int /* model id */ , @@ -446,19 +446,15 @@ public partial class CheckpointBrowserViewModel : PageViewModelBase connectedModels = connectedModels.Where(c => c.ModelType == SelectedModelType); } - modelRequest = new CivitModelsRequest - { - CommaSeparatedModelIds = string.Join( - ",", - connectedModels - .Select(c => c.ConnectedModel!.ModelId) - .GroupBy(m => m) - .Select(g => g.First()) - ), - Types = - SelectedModelType == CivitModelType.All ? null : new[] { SelectedModelType }, - Page = CurrentPageNumber, - }; + modelRequest.CommaSeparatedModelIds = string.Join( + ",", + connectedModels + .Select(c => c.ConnectedModel!.ModelId) + .GroupBy(m => m) + .Select(g => g.First()) + ); + modelRequest.Sort = null; + modelRequest.Period = null; } // See if query is cached diff --git a/StabilityMatrix.Avalonia/ViewModels/SettingsViewModel.cs b/StabilityMatrix.Avalonia/ViewModels/SettingsViewModel.cs index f484cf98..1f688411 100644 --- a/StabilityMatrix.Avalonia/ViewModels/SettingsViewModel.cs +++ b/StabilityMatrix.Avalonia/ViewModels/SettingsViewModel.cs @@ -168,6 +168,7 @@ public partial class SettingsViewModel : PageViewModelBase { if (oldValue is null || newValue.Name == Cultures.Current.Name) return; + // Set locale if (AvailableLanguages.Contains(newValue)) { diff --git a/StabilityMatrix.Core/Models/Packages/VladAutomatic.cs b/StabilityMatrix.Core/Models/Packages/VladAutomatic.cs index b34730e7..b7e13daa 100644 --- a/StabilityMatrix.Core/Models/Packages/VladAutomatic.cs +++ b/StabilityMatrix.Core/Models/Packages/VladAutomatic.cs @@ -262,7 +262,7 @@ public class VladAutomatic : BaseGitPackage void HandleConsoleOutput(ProcessOutput s) { onConsoleOutput?.Invoke(s); - if (s.Text.Contains("Running on local URL", StringComparison.OrdinalIgnoreCase)) + if (s.Text.Contains("Local URL", StringComparison.OrdinalIgnoreCase)) { var regex = new Regex(@"(https?:\/\/)([^:\s]+):(\d+)"); var match = regex.Match(s.Text);