From a1c76a8787cc1d3bfc47d91b730921e7b13fe8d6 Mon Sep 17 00:00:00 2001 From: Ionite Date: Sun, 10 Nov 2024 15:42:05 -0500 Subject: [PATCH 01/14] Merge pull request #884 from ionite34/fix-markdown (cherry picked from commit 7deeb065aa95754eb621f074b26dd495cfa6724e) # Conflicts: # CHANGELOG.md --- CHANGELOG.md | 57 +++++ .../Controls/BetterMarkdownScrollViewer.cs | 16 ++ StabilityMatrix.Avalonia/DialogHelper.cs | 10 +- .../StabilityMatrix.Avalonia.csproj | 2 +- .../MarkdownStyleFluentAvalonia.axaml | 210 ++++++++++++++++++ .../MarkdownStyleFluentAvalonia.axaml.cs | 11 + .../Views/Dialogs/LykosLoginDialog.axaml | 110 +++++---- .../Views/Dialogs/UpdateDialog.axaml | 195 ++++++++-------- 8 files changed, 459 insertions(+), 152 deletions(-) create mode 100644 StabilityMatrix.Avalonia/Controls/BetterMarkdownScrollViewer.cs create mode 100644 StabilityMatrix.Avalonia/Styles/Markdown/MarkdownStyleFluentAvalonia.axaml create mode 100644 StabilityMatrix.Avalonia/Styles/Markdown/MarkdownStyleFluentAvalonia.axaml.cs diff --git a/CHANGELOG.md b/CHANGELOG.md index 1bc6d699d..515c72895 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,63 @@ 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). +<<<<<<< HEAD +======= +## v2.13.0-dev.3 +### Added +- Added support for SD3.5 in Inference +- Added CLIP_G to HuggingFace model browser +- Added search bar to the Installed Workflows tab +- Added "Search with Google" and "Search with ChatGPT" to the console output context menu +- Added "Date Created" and "Date Last Modified" sorting options to the Checkpoints tab +### Changed +- Text Encoder / CLIP selection in Inference is now enabled via the cogwheel ⚙️ button next to the model selector +- Added more base model types to the CivitAI Model Browser & Checkpoint Manager +- Updated Russian translations thanks to @vanja-san +- Updated Simplified Chinese translations thanks to @QL-boy +### Fixed +- Fixed some instances of Civitai model browser not loading new results +- Fixed "Unsupported Torch Version: Cuda" errors when installing a1111 +- Fixed crash when clicking "Remind me Later" on the update dialog + +## v2.13.0-dev.2 +### Added +- Added new package - [SimpleSDXL](https://github.com/metercai/SimpleSDXL) - many thanks to @NullDev for the contribution! +- Added new package - [FluxGym](https://github.com/cocktailpeanut/fluxgym) - many thanks to @NullDev for the contribution! +- Added a new "Extension Packs" section to the extension manager, allowing you to create packs for easier installation of multiple extensions at once +- Added "Search by Creator" command to Civitai browser context menu +- Added Beta scheduler to the scheduler selector in Inference +- Added zipping of log files and "Show Log in Explorer" button on exceptions dialog for easier support +- Added max concurrent downloads option & download queueing for most downloads +### Changed +- (Internal) Updated to Avalonia 11.1.4 +- Adjusted the Branch/Release toggle during package install flow to be a little more obvious +- Updated the Dock library used for Inference - fixes some weirdness with resizing / rearranging panels +### Fixed +- Fixed ComfyUI NF4 extension not installing properly when prompted in Inference +- Fixed [#932](https://github.com/LykosAI/StabilityMatrix/issues/932), [#935](https://github.com/LykosAI/StabilityMatrix/issues/935), [#939](https://github.com/LykosAI/StabilityMatrix/issues/939) - InvokeAI failing to update +- Fixed repeated nested folders being created in `Models/StableDiffusion` when using Forge in Symlink mode in certain conditions. Existing folders will be repaired to their original structure on launch. +- Fixed minimize button not working on macOS +- Fixed InvokeAI model sharing spamming the console with "This may take awhile" in certain conditions +- Fixed text alignment issues in the Downloads tab for certain long names / progress infos +### Supporters +#### Visionaries +- A big thank you to our amazing Visionary-tier Patreon supporter, **Waterclouds**! Your continued support is invaluable! + +## v2.13.0-dev.1 +### Added +- Added the ability to change the Models directory separately from the rest of the Data directory. This can be set in `Settings > Select new Models Folder` +- Added "Copy" menu to the Inference gallery context menu, allowing you to copy the image or the seed (other params coming soon™️) +- Added InvokeAI model sharing option +### Supporters +#### Visionaries +- A heartfelt thank you to our incredible Visionary-tier Patreon supporter, **Waterclouds**! Your ongoing support means a lot to us, and we’re grateful to have you with us on this journey! + +## v2.12.4 +### Fixed +- Fixed crash when clicking "Remind me Later" on the update dialog + +>>>>>>> 7deeb065 (Merge pull request #884 from ionite34/fix-markdown) ## v2.12.3 ### Added - Added new package - [SimpleSDXL](https://github.com/metercai/SimpleSDXL) - many thanks to @NullDev for the contribution! diff --git a/StabilityMatrix.Avalonia/Controls/BetterMarkdownScrollViewer.cs b/StabilityMatrix.Avalonia/Controls/BetterMarkdownScrollViewer.cs new file mode 100644 index 000000000..024bef8fa --- /dev/null +++ b/StabilityMatrix.Avalonia/Controls/BetterMarkdownScrollViewer.cs @@ -0,0 +1,16 @@ +using Markdown.Avalonia; +using StabilityMatrix.Avalonia.Styles.Markdown; + +namespace StabilityMatrix.Avalonia.Controls; + +/// +/// Fix MarkdownScrollViewer IBrush errors and not working with Avalonia 11.2.0 +/// +public class BetterMarkdownScrollViewer : MarkdownScrollViewer +{ + public BetterMarkdownScrollViewer() + { + MarkdownStyleName = "Empty"; + MarkdownStyle = new MarkdownStyleFluentAvalonia(); + } +} diff --git a/StabilityMatrix.Avalonia/DialogHelper.cs b/StabilityMatrix.Avalonia/DialogHelper.cs index 0b98ddf13..f4c79278c 100644 --- a/StabilityMatrix.Avalonia/DialogHelper.cs +++ b/StabilityMatrix.Avalonia/DialogHelper.cs @@ -81,7 +81,11 @@ public static BetterContentDialog CreateTextEntryDialog( IReadOnlyList textFields ) { - return CreateTextEntryDialog(title, new MarkdownScrollViewer { Markdown = description }, textFields); + return CreateTextEntryDialog( + title, + new BetterMarkdownScrollViewer { Markdown = description }, + textFields + ); } /// @@ -94,7 +98,7 @@ public static BetterContentDialog CreateTextEntryDialog( IReadOnlyList textFields ) { - var markdown = new MarkdownScrollViewer { Markdown = description }; + var markdown = new BetterMarkdownScrollViewer { Markdown = description }; var image = new BetterAdvancedImage((Uri?)null) { Source = imageSource, @@ -235,7 +239,7 @@ public static BetterContentDialog CreateMarkdownDialog( { Dispatcher.UIThread.VerifyAccess(); - var viewer = new MarkdownScrollViewer { Markdown = markdown }; + var viewer = new BetterMarkdownScrollViewer { Markdown = markdown }; // Apply syntax highlighting to code blocks if preset is provided if (editorPreset != default) diff --git a/StabilityMatrix.Avalonia/StabilityMatrix.Avalonia.csproj b/StabilityMatrix.Avalonia/StabilityMatrix.Avalonia.csproj index 3a8b64f4d..d99372018 100644 --- a/StabilityMatrix.Avalonia/StabilityMatrix.Avalonia.csproj +++ b/StabilityMatrix.Avalonia/StabilityMatrix.Avalonia.csproj @@ -113,7 +113,7 @@ - + diff --git a/StabilityMatrix.Avalonia/Styles/Markdown/MarkdownStyleFluentAvalonia.axaml b/StabilityMatrix.Avalonia/Styles/Markdown/MarkdownStyleFluentAvalonia.axaml new file mode 100644 index 000000000..cf02c7d3e --- /dev/null +++ b/StabilityMatrix.Avalonia/Styles/Markdown/MarkdownStyleFluentAvalonia.axaml @@ -0,0 +1,210 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/StabilityMatrix.Avalonia/Styles/Markdown/MarkdownStyleFluentAvalonia.axaml.cs b/StabilityMatrix.Avalonia/Styles/Markdown/MarkdownStyleFluentAvalonia.axaml.cs new file mode 100644 index 000000000..e8ece0398 --- /dev/null +++ b/StabilityMatrix.Avalonia/Styles/Markdown/MarkdownStyleFluentAvalonia.axaml.cs @@ -0,0 +1,11 @@ +using Avalonia.Markup.Xaml; + +namespace StabilityMatrix.Avalonia.Styles.Markdown; + +public partial class MarkdownStyleFluentAvalonia : global::Avalonia.Styling.Styles +{ + public MarkdownStyleFluentAvalonia() + { + AvaloniaXamlLoader.Load(this); + } +} diff --git a/StabilityMatrix.Avalonia/Views/Dialogs/LykosLoginDialog.axaml b/StabilityMatrix.Avalonia/Views/Dialogs/LykosLoginDialog.axaml index 905a5cd39..e958b96d2 100644 --- a/StabilityMatrix.Avalonia/Views/Dialogs/LykosLoginDialog.axaml +++ b/StabilityMatrix.Avalonia/Views/Dialogs/LykosLoginDialog.axaml @@ -3,132 +3,128 @@ xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:controls="clr-namespace:StabilityMatrix.Avalonia.Controls" + xmlns:ctxt="clr-namespace:ColorTextBlock.Avalonia;assembly=ColorTextBlock.Avalonia" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" + xmlns:lang="clr-namespace:StabilityMatrix.Avalonia.Languages" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" + xmlns:mdxaml="https://github.com/whistyun/Markdown.Avalonia.Tight" xmlns:mocks="clr-namespace:StabilityMatrix.Avalonia.DesignData" xmlns:sg="clr-namespace:SpacedGridControl.Avalonia;assembly=SpacedGridControl.Avalonia" + xmlns:sm="clr-namespace:StabilityMatrix.Avalonia" xmlns:ui="using:FluentAvalonia.UI.Controls" xmlns:vmDialogs="clr-namespace:StabilityMatrix.Avalonia.ViewModels.Dialogs" - xmlns:lang="clr-namespace:StabilityMatrix.Avalonia.Languages" - xmlns:sm="clr-namespace:StabilityMatrix.Avalonia" - xmlns:mdxaml="https://github.com/whistyun/Markdown.Avalonia.Tight" - xmlns:ctxt="clr-namespace:ColorTextBlock.Avalonia;assembly=ColorTextBlock.Avalonia" - Focusable="True" MaxWidth="400" d:DataContext="{x:Static mocks:DesignData.LykosLoginViewModel}" d:DesignHeight="350" d:DesignWidth="400" x:DataType="vmDialogs:LykosLoginViewModel" + Focusable="True" mc:Ignorable="d"> - - + + + Watermark="{x:Static lang:Resources.Label_Email}" /> - - - + + - + Severity="Error" /> + - + NavigateUri="{x:Static sm:Assets.LykosForgotPasswordUrl}" /> + + Content="Sign in with Google" /> - + - - + + + Watermark="{x:Static lang:Resources.Label_Email}" /> + Watermark="{x:Static lang:Resources.Label_Username}" /> - + Watermark="{x:Static lang:Resources.Label_Password}" /> - - - + + - - + + - + Markdown="{Binding SignupFooterMarkdown}" + TextElement.Foreground="{DynamicResource TextFillColorTertiaryBrush}"> + - - + + - + diff --git a/StabilityMatrix.Avalonia/Views/Dialogs/UpdateDialog.axaml b/StabilityMatrix.Avalonia/Views/Dialogs/UpdateDialog.axaml index c463e833c..88aa3a8be 100644 --- a/StabilityMatrix.Avalonia/Views/Dialogs/UpdateDialog.axaml +++ b/StabilityMatrix.Avalonia/Views/Dialogs/UpdateDialog.axaml @@ -1,107 +1,120 @@ - + - + - - - - + + + + - + - + FontSize="15" + IconVariant="Filled" + Symbol="ArrowRight" /> + - - - - - - - - - - + + + + + + + + + + - - - - -