diff --git a/Avalonia.Gif/Avalonia.Gif.csproj b/Avalonia.Gif/Avalonia.Gif.csproj index 6a363589..dbf0defd 100644 --- a/Avalonia.Gif/Avalonia.Gif.csproj +++ b/Avalonia.Gif/Avalonia.Gif.csproj @@ -10,7 +10,7 @@ true - + diff --git a/CHANGELOG.md b/CHANGELOG.md index 4363ff89..ba1236d8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,9 @@ and this project adheres to [Semantic Versioning 2.0](https://semver.org/spec/v2 ## v2.10.0-preview.1 ### Added - Added OpenArt.AI workflow browser for ComfyUI workflows +### Changed +- Updated to Avalonia 11.0.10 +- Changed to a new image control for pages with many images ## v2.10.0-dev.3 ### Added diff --git a/README.md b/README.md index 4070d220..2787d790 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ [![Build](https://github.com/LykosAI/StabilityMatrix/actions/workflows/build.yml/badge.svg)](https://github.com/LykosAI/StabilityMatrix/actions/workflows/build.yml) [![Discord Server](https://img.shields.io/discord/1115555685476868168?logo=discord&logoColor=white&label=Discord%20Server)](https://discord.com/invite/TUrgfECxHz) +[![Release](https://img.shields.io/github/v/release/LykosAI/StabilityMatrix?label=Latest%20Release&link=https%3A%2F%2Fgithub.com%2FLykosAI%2FStabilityMatrix%2Freleases%2Flatest)][release] [release]: https://github.com/LykosAI/StabilityMatrix/releases/latest [download-win-x64]: https://github.com/LykosAI/StabilityMatrix/releases/latest/download/StabilityMatrix-win-x64.zip @@ -9,7 +10,7 @@ [download-macos-arm64]: https://github.com/LykosAI/StabilityMatrix/releases/latest/download/StabilityMatrix-macos-arm64.dmg [auto1111]: https://github.com/AUTOMATIC1111/stable-diffusion-webui -[auto1111-directml]: https://github.com/lshqqytiger/stable-diffusion-webui-directml +[sdwebui-directml]: https://github.com/lshqqytiger/stable-diffusion-webui-directml [webui-ux]: https://github.com/anapnoe/stable-diffusion-webui-ux [comfy]: https://github.com/comfyanonymous/ComfyUI [sdnext]: https://github.com/vladmandic/automatic @@ -25,44 +26,29 @@ [civitai]: https://civitai.com/ [huggingface]: https://huggingface.co/ -Multi-Platform Package Manager and Inference UI for Stable Diffusion +![Header image for Stability Matrix, Multi-Platform Package Manager and Inference UI for Stable Diffusion](https://cdn.lykos.ai/static/sm-banner-rounded.webp) -### ✨ New in 2.5 - [Inference](#inference-A-reimagined-built-in-Stable-Diffusion-experience), a built-in interface for Stable Diffusion powered by ComfyUI +[![Windows](https://img.shields.io/badge/Windows%2010,%2011-%230079d5.svg?style=for-the-badge&logo=Windows%2011&logoColor=white)][download-win-x64] +[![Linux](https://img.shields.io/badge/Linux-FCC624?style=for-the-badge&logo=linux&logoColor=black)][download-linux-x64] +[![macOS](https://img.shields.io/badge/mac%20os%20%28apple%20silicon%29-000000?style=for-the-badge&logo=macos&logoColor=F0F0F0)][download-macos-arm64] + +Multi-Platform Package Manager and Inference UI for Stable Diffusion ### 🖱️ One click install and update for Stable Diffusion Web UI Packages - Supports: - - [Automatic 1111][auto1111], [Automatic 1111 DirectML][auto1111-directml], [SD Web UI-UX][webui-ux], [SD.Next][sdnext] - - [Fooocus][fooocus], [Fooocus MRE][fooocus-mre], [Fooocus ControlNet SDXL][fooocus-controlnet], [Ruined Fooocus][ruined-fooocus] + - [Automatic1111][auto1111], [Stable Diffusion WebUI DirectML][sdwebui-directml], [SD Web UI-UX][webui-ux], [SD.Next][sdnext] + - [Fooocus][fooocus], [Fooocus ControlNet SDXL][fooocus-controlnet], [Ruined Fooocus][ruined-fooocus] - [ComfyUI][comfy] - [VoltaML][voltaml] - [InvokeAI][invokeai] - [Kohya's GUI][kohya-ss] - [OneTrainer][onetrainer] -- Manage plugins / extensions for supported packages ([Automatic 1111][auto1111], [Comfy UI][comfy]) +- Manage plugins / extensions for supported packages ([Automatic1111][auto1111], [Comfy UI][comfy], [SD Web UI-UX][webui-ux], and [SD.Next][sdnext]) - Easily install or update Python dependencies for each package - Embedded Git and Python dependencies, with no need for either to be globally installed - Fully portable - move Stability Matrix's Data Directory to a new drive or computer at any time -### 🚀 Launcher with syntax highlighted terminal emulator, routed GUI input prompts -- Launch arguments editor with predefined or custom options for each Package install -- Configurable Environment Variables - -### 🗃️ Checkpoint Manager, configured to be shared by all Package installs -- Option to find CivitAI metadata and preview thumbnails for new local imports - -### ☁️ Model Browser to import from [CivitAI][civitai] and [HuggingFace][huggingface] -- Automatically imports to the associated model folder depending on the model type -- Downloads relevant metadata files and preview image - -![header](https://cdn.lykos.ai/static/sm-banner-rounded.webp) - -[![Release](https://img.shields.io/github/v/release/LykosAI/StabilityMatrix?label=Latest%20Release&link=https%3A%2F%2Fgithub.com%2FLykosAI%2FStabilityMatrix%2Freleases%2Flatest)][release] - -[![Windows](https://img.shields.io/badge/Windows%2010,%2011-%230079d5.svg?style=for-the-badge&logo=Windows%2011&logoColor=white)][download-win-x64] -[![Linux](https://img.shields.io/badge/Linux-FCC624?style=for-the-badge&logo=linux&logoColor=black)][download-linux-x64] -[![macOS](https://img.shields.io/badge/mac%20os%20%28apple%20silicon%29-000000?style=for-the-badge&logo=macos&logoColor=F0F0F0)][download-macos-arm64] - -### Inference - A reimagined built-in Stable Diffusion experience +### ✨ Inference - A Reimagined Stable Diffusion Interface, Built-In to Stability Matrix - Powerful auto-completion and syntax highlighting using a formal language grammar - Workspaces open in tabs that save and load from `.smproj` project files @@ -76,13 +62,20 @@ Multi-Platform Package Manager and Inference UI for Stable Diffusion

-### Searchable launch options +### 🚀 Launcher with syntax highlighted terminal emulator, routed GUI input prompts +- Launch arguments editor with predefined or custom options for each Package install +- Configurable Environment Variables +

-### Model browser powered by [Civit AI][civitai] -- Downloads new models, automatically uses the appropriate shared model directory +### 🗃️ Checkpoint Manager, configured to be shared by all Package installs +- Option to find CivitAI metadata and preview thumbnails for new local imports + +### ☁️ Model Browser to import from [CivitAI][civitai] and [HuggingFace][huggingface] +- Automatically imports to the associated model folder depending on the model type +- Downloads relevant metadata files and preview image - Pause and resume downloads, even after closing the app

diff --git a/StabilityMatrix.Avalonia.Diagnostics/StabilityMatrix.Avalonia.Diagnostics.csproj b/StabilityMatrix.Avalonia.Diagnostics/StabilityMatrix.Avalonia.Diagnostics.csproj index 71efd8bb..2fbf2fd4 100644 --- a/StabilityMatrix.Avalonia.Diagnostics/StabilityMatrix.Avalonia.Diagnostics.csproj +++ b/StabilityMatrix.Avalonia.Diagnostics/StabilityMatrix.Avalonia.Diagnostics.csproj @@ -19,12 +19,12 @@ - - + + - + diff --git a/StabilityMatrix.Avalonia/App.axaml b/StabilityMatrix.Avalonia/App.axaml index fa669962..19eb7989 100644 --- a/StabilityMatrix.Avalonia/App.axaml +++ b/StabilityMatrix.Avalonia/App.axaml @@ -4,7 +4,7 @@ xmlns:local="using:StabilityMatrix.Avalonia" xmlns:idcr="using:Dock.Avalonia.Controls.Recycling" xmlns:styling="clr-namespace:FluentAvalonia.Styling;assembly=FluentAvalonia" - xmlns:controls="clr-namespace:Avalonia.Labs.Controls;assembly=Avalonia.Labs.Controls" + xmlns:labs="clr-namespace:Avalonia.Labs.Controls;assembly=Avalonia.Labs.Controls" Name="Stability Matrix" RequestedThemeVariant="Dark"> @@ -81,10 +81,13 @@ - + + diff --git a/StabilityMatrix.Avalonia/Controls/Inference/ImageFolderCard.axaml b/StabilityMatrix.Avalonia/Controls/Inference/ImageFolderCard.axaml index 86c40520..67b75973 100644 --- a/StabilityMatrix.Avalonia/Controls/Inference/ImageFolderCard.axaml +++ b/StabilityMatrix.Avalonia/Controls/Inference/ImageFolderCard.axaml @@ -9,6 +9,7 @@ xmlns:ui="using:FluentAvalonia.UI.Controls" xmlns:vmInference="clr-namespace:StabilityMatrix.Avalonia.ViewModels.Inference" xmlns:scroll="clr-namespace:StabilityMatrix.Avalonia.Controls.Scroll" + xmlns:labs="clr-namespace:Avalonia.Labs.Controls;assembly=Avalonia.Labs.Controls" x:DataType="vmInference:ImageFolderCardViewModel"> @@ -195,12 +196,11 @@ - + Stretch="UniformToFill" /> @@ -115,12 +116,11 @@ - + Source="{Binding Uri}" + Stretch="Uniform" /> diff --git a/StabilityMatrix.Avalonia/Models/ImageSource.cs b/StabilityMatrix.Avalonia/Models/ImageSource.cs index 973b0bf6..0da5749d 100644 --- a/StabilityMatrix.Avalonia/Models/ImageSource.cs +++ b/StabilityMatrix.Avalonia/Models/ImageSource.cs @@ -58,6 +58,8 @@ public record ImageSource : IDisposable, ITemplateKey Bitmap = bitmap; } + public Uri? Uri => LocalFile?.FullPath != null ? new Uri(LocalFile.FullPath) : RemoteUrl; + /// public ImageSourceTemplateType TemplateKey { get; private set; } diff --git a/StabilityMatrix.Avalonia/StabilityMatrix.Avalonia.csproj b/StabilityMatrix.Avalonia/StabilityMatrix.Avalonia.csproj index cda7adcd..b3fba009 100644 --- a/StabilityMatrix.Avalonia/StabilityMatrix.Avalonia.csproj +++ b/StabilityMatrix.Avalonia/StabilityMatrix.Avalonia.csproj @@ -39,17 +39,17 @@ - - - - - - + + + + + + - + - - + + @@ -58,10 +58,10 @@ - - - - + + + + @@ -78,25 +78,25 @@ - + - + - + - - + + - + diff --git a/StabilityMatrix.Avalonia/Styles/ControlThemes/BetterComboBoxStyles.axaml b/StabilityMatrix.Avalonia/Styles/ControlThemes/BetterComboBoxStyles.axaml index 61d77d82..652a4ade 100644 --- a/StabilityMatrix.Avalonia/Styles/ControlThemes/BetterComboBoxStyles.axaml +++ b/StabilityMatrix.Avalonia/Styles/ControlThemes/BetterComboBoxStyles.axaml @@ -6,7 +6,8 @@ xmlns:mocks="using:StabilityMatrix.Avalonia.DesignData" xmlns:models="clr-namespace:StabilityMatrix.Core.Models;assembly=StabilityMatrix.Core" xmlns:sg="clr-namespace:SpacedGridControl.Avalonia;assembly=SpacedGridControl.Avalonia" - xmlns:ui="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia"> + xmlns:ui="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia" + xmlns:labs="clr-namespace:Avalonia.Labs.Controls;assembly=Avalonia.Labs.Controls"> @@ -42,15 +43,14 @@ ColumnSpacing="6" RowSpacing="0"> - + Stretch="UniformToFill"/> - - - - - + Stretch="UniformToFill"/> - - - - - + Stretch="UniformToFill"> + { NumItemsSelected = Outputs.Count(o => o.IsSelected); + Console.WriteLine($"Subscribe called"); }); categoriesCache.Connect().DeferUntilLoaded().Bind(Categories).Subscribe(); @@ -395,12 +396,13 @@ public partial class OutputsPageViewModel : PageViewModelBase var selected = Outputs.Where(o => o.IsSelected).ToList(); Debug.Assert(selected.Count == NumItemsSelected); + + var imagesToRemove = new List(); foreach (var output in selected) { // Delete the file var imageFile = new FilePath(output.ImageFile.AbsolutePath); var result = await notificationService.TryAsync(imageFile.DeleteAsync()); - if (!result.IsSuccessful) { continue; @@ -413,15 +415,10 @@ public partial class OutputsPageViewModel : PageViewModelBase await notificationService.TryAsync(sideCar.DeleteAsync()); } - OutputsCache.Remove(output.ImageFile); - - // Invalidate cache - if (ImageLoader.AsyncImageLoader is FallbackRamCachedWebImageLoader loader) - { - loader.RemoveAllNamesFromCache(imageFile.Name); - } + imagesToRemove.Add(output.ImageFile); } + OutputsCache.Remove(imagesToRemove); NumItemsSelected = 0; ClearSelection(); } diff --git a/StabilityMatrix.Avalonia/ViewModels/PackageManager/PackageCardViewModel.cs b/StabilityMatrix.Avalonia/ViewModels/PackageManager/PackageCardViewModel.cs index 93f3534a..71d624ec 100644 --- a/StabilityMatrix.Avalonia/ViewModels/PackageManager/PackageCardViewModel.cs +++ b/StabilityMatrix.Avalonia/ViewModels/PackageManager/PackageCardViewModel.cs @@ -54,7 +54,7 @@ public partial class PackageCardViewModel( private InstalledPackage? package; [ObservableProperty] - private string? cardImageSource; + private Uri? cardImageSource; [ObservableProperty] private bool isUpdateAvailable; @@ -127,7 +127,7 @@ public partial class PackageCardViewModel( ) { IsUnknownPackage = true; - CardImageSource = ""; + CardImageSource = null; InstalledVersion = "Unknown"; } else @@ -135,7 +135,7 @@ public partial class PackageCardViewModel( IsUnknownPackage = false; var basePackage = packageFactory[value.PackageName]; - CardImageSource = basePackage?.PreviewImageUri.ToString() ?? Assets.NoImage.ToString(); + CardImageSource = basePackage?.PreviewImageUri ?? Assets.NoImage; InstalledVersion = value.Version?.DisplayVersion ?? "Unknown"; CanUseConfigMethod = basePackage?.AvailableSharedFolderMethods.Contains(SharedFolderMethod.Configuration) ?? false; diff --git a/StabilityMatrix.Avalonia/Views/CheckpointsPage.axaml b/StabilityMatrix.Avalonia/Views/CheckpointsPage.axaml index c2831986..bbb08dae 100644 --- a/StabilityMatrix.Avalonia/Views/CheckpointsPage.axaml +++ b/StabilityMatrix.Avalonia/Views/CheckpointsPage.axaml @@ -13,6 +13,7 @@ xmlns:api="clr-namespace:StabilityMatrix.Core.Models.Api;assembly=StabilityMatrix.Core" xmlns:generic="clr-namespace:System.Collections.Generic;assembly=System.Collections" xmlns:converters="clr-namespace:StabilityMatrix.Avalonia.Converters" + xmlns:labs="clr-namespace:Avalonia.Labs.Controls;assembly=Avalonia.Labs.Controls" d:DataContext="{x:Static mocks:DesignData.CheckpointsPageViewModel}" x:CompileBindings="True" x:DataType="vm:CheckpointsPageViewModel" @@ -138,7 +139,7 @@ TextWrapping="WrapWithOverflow" IsVisible="{Binding IsConnectedModel}" /> - - + - @@ -60,7 +60,7 @@ @@ -103,7 +103,7 @@ CommandParameter="{Binding CivitModel}" IsEnabled="{Binding !IsImporting}"> - --> - - + - + Source="{Binding CivitModel.Creator.Image}"> + - - - @@ -52,7 +52,7 @@ @@ -121,6 +121,7 @@ CornerRadius="16" Margin="4" Grid.Row="0" + ClipToBounds="True" HorizontalAlignment="Left" VerticalAlignment="Bottom"> @@ -142,14 +143,16 @@ Classes="transparent" Padding="10,4"> - + Source="{Binding Creator.Avatar}"> + diff --git a/StabilityMatrix.Avalonia/Views/PackageManager/PackageInstallBrowserView.axaml.cs b/StabilityMatrix.Avalonia/Views/PackageManager/PackageInstallBrowserView.axaml.cs index 5abbe50b..08436b3b 100644 --- a/StabilityMatrix.Avalonia/Views/PackageManager/PackageInstallBrowserView.axaml.cs +++ b/StabilityMatrix.Avalonia/Views/PackageManager/PackageInstallBrowserView.axaml.cs @@ -1,4 +1,6 @@ -using Avalonia.Input; +using System.Diagnostics; +using Avalonia.Input; +using Avalonia.Labs.Controls; using StabilityMatrix.Avalonia.Controls; using StabilityMatrix.Avalonia.ViewModels.PackageManager; using StabilityMatrix.Core.Attributes; @@ -20,4 +22,9 @@ public partial class PackageInstallBrowserView : UserControlBase vm.ClearSearchQuery(); } } + + private void AsyncImage_OnFailed(object? sender, AsyncImage.AsyncImageFailedEventArgs e) + { + Debug.WriteLine($"Failed to load image: {e.ErrorException?.Message}"); + } } diff --git a/StabilityMatrix.Avalonia/Views/PackageManager/PackageInstallDetailView.axaml b/StabilityMatrix.Avalonia/Views/PackageManager/PackageInstallDetailView.axaml index 91b2e671..7bf74c46 100644 --- a/StabilityMatrix.Avalonia/Views/PackageManager/PackageInstallDetailView.axaml +++ b/StabilityMatrix.Avalonia/Views/PackageManager/PackageInstallDetailView.axaml @@ -2,7 +2,6 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" - xmlns:viewModels="clr-namespace:StabilityMatrix.Avalonia.ViewModels" xmlns:controls="clr-namespace:StabilityMatrix.Avalonia.Controls" xmlns:designData="clr-namespace:StabilityMatrix.Avalonia.DesignData" xmlns:lang="clr-namespace:StabilityMatrix.Avalonia.Languages" @@ -10,24 +9,26 @@ xmlns:controls1="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia" xmlns:models="clr-namespace:StabilityMatrix.Core.Models;assembly=StabilityMatrix.Core" xmlns:database="clr-namespace:StabilityMatrix.Core.Models.Database;assembly=StabilityMatrix.Core" - xmlns:extensions="clr-namespace:StabilityMatrix.Core.Models.Packages.Extensions;assembly=StabilityMatrix.Core" xmlns:packageManager="clr-namespace:StabilityMatrix.Avalonia.ViewModels.PackageManager" + xmlns:labs="clr-namespace:Avalonia.Labs.Controls;assembly=Avalonia.Labs.Controls" mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" x:DataType="packageManager:PackageInstallDetailViewModel" x:CompileBindings="True" d:DataContext="{x:Static designData:DesignData.PackageInstallDetailViewModel}" x:Class="StabilityMatrix.Avalonia.Views.PackageManager.PackageInstallDetailView"> - + - + Margin="16, 16, 8, 8" + CornerRadius="8" + Source="{Binding SelectedPackage.PreviewImageUri}"> + + diff --git a/StabilityMatrix.Avalonia/Views/PackageManagerPage.axaml b/StabilityMatrix.Avalonia/Views/PackageManagerPage.axaml index 81c912e6..ee2099d9 100644 --- a/StabilityMatrix.Avalonia/Views/PackageManagerPage.axaml +++ b/StabilityMatrix.Avalonia/Views/PackageManagerPage.axaml @@ -13,6 +13,7 @@ xmlns:converters="clr-namespace:StabilityMatrix.Avalonia.Converters" xmlns:avalonia="clr-namespace:SpacedGridControl.Avalonia;assembly=SpacedGridControl.Avalonia" xmlns:markupExtensions="clr-namespace:StabilityMatrix.Avalonia.MarkupExtensions" + xmlns:labs="clr-namespace:Avalonia.Labs.Controls;assembly=Avalonia.Labs.Controls" mc:Ignorable="d" d:DesignWidth="1000" d:DesignHeight="450" x:DataType="viewModels:PackageManagerViewModel" x:CompileBindings="True" @@ -44,15 +45,13 @@ - diff --git a/StabilityMatrix.Core/StabilityMatrix.Core.csproj b/StabilityMatrix.Core/StabilityMatrix.Core.csproj index de135217..5005b1bd 100644 --- a/StabilityMatrix.Core/StabilityMatrix.Core.csproj +++ b/StabilityMatrix.Core/StabilityMatrix.Core.csproj @@ -17,8 +17,8 @@ - - + + @@ -27,10 +27,10 @@ - + - + @@ -45,7 +45,7 @@ - + @@ -53,7 +53,7 @@ - + diff --git a/StabilityMatrix.Tests/StabilityMatrix.Tests.csproj b/StabilityMatrix.Tests/StabilityMatrix.Tests.csproj index 6283704a..257b8f93 100644 --- a/StabilityMatrix.Tests/StabilityMatrix.Tests.csproj +++ b/StabilityMatrix.Tests/StabilityMatrix.Tests.csproj @@ -17,18 +17,18 @@ - + - + - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/StabilityMatrix.UITests/StabilityMatrix.UITests.csproj b/StabilityMatrix.UITests/StabilityMatrix.UITests.csproj index d4c1e79e..eb592e08 100644 --- a/StabilityMatrix.UITests/StabilityMatrix.UITests.csproj +++ b/StabilityMatrix.UITests/StabilityMatrix.UITests.csproj @@ -15,16 +15,16 @@ - + - - + + - + runtime; build; native; contentfiles; analyzers; buildtransitive