From 8c593ee21886b3e9b3b8c7dd23fdf9f4fb3516e2 Mon Sep 17 00:00:00 2001 From: JT Date: Sun, 6 Oct 2024 21:50:38 -0600 Subject: [PATCH 1/3] Merge pull request #851 from ionite34/fix-nf4-sorta MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Manually add comfy nf4 extension to manifest & update sampler/scheduler… (cherry picked from commit 8c9b456c119726f76923667ed65cd06c29c675ac) # Conflicts: # CHANGELOG.md --- CHANGELOG.md | 18 ++++++++++++++++++ .../Helper/GenerationParametersConverter.cs | 2 ++ .../Models/Api/Comfy/ComfyScheduler.cs | 4 +++- .../Models/Packages/ComfyUI.cs | 17 ++++++++++++++++- 4 files changed, 39 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bc914823..ff05d2a6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,24 @@ 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.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.2 +### Added +- Added Beta scheduler to the scheduler selector in Inference +### Fixed +- Fixed ComfyUI NF4 extension not installing properly when prompted in Inference + +>>>>>>> 8c9b456c (Merge pull request #851 from ionite34/fix-nf4-sorta) ## v2.12.1 ### Fixed - Fixed [#916](https://github.com/LykosAI/StabilityMatrix/issues/916) - InvokeAI failing to install/update on macOS diff --git a/StabilityMatrix.Core/Helper/GenerationParametersConverter.cs b/StabilityMatrix.Core/Helper/GenerationParametersConverter.cs index d4db7c08..ed146f39 100644 --- a/StabilityMatrix.Core/Helper/GenerationParametersConverter.cs +++ b/StabilityMatrix.Core/Helper/GenerationParametersConverter.cs @@ -18,6 +18,7 @@ public static class GenerationParametersConverter ["Euler Simple"] = (ComfySampler.Euler, ComfyScheduler.Simple), ["LMS"] = (ComfySampler.LMS, ComfyScheduler.Normal), ["Heun"] = (ComfySampler.Heun, ComfyScheduler.Normal), + ["Heun Beta"] = (ComfySampler.Heun, ComfyScheduler.Beta), ["DPM2"] = (ComfySampler.Dpm2, ComfyScheduler.Normal), ["DPM2 Karras"] = (ComfySampler.Dpm2, ComfyScheduler.Karras), ["DPM2 a"] = (ComfySampler.Dpm2Ancestral, ComfyScheduler.Normal), @@ -34,6 +35,7 @@ public static class GenerationParametersConverter ["DPM adaptive"] = (ComfySampler.DpmAdaptive, ComfyScheduler.Normal), ["LMS Karras"] = (ComfySampler.LMS, ComfyScheduler.Karras), ["DDIM"] = (ComfySampler.DDIM, ComfyScheduler.Normal), + ["DDIM Beta"] = (ComfySampler.DDIM, ComfyScheduler.Beta), ["UniPC"] = (ComfySampler.UniPC, ComfyScheduler.Normal), }.ToImmutableDictionary(); diff --git a/StabilityMatrix.Core/Models/Api/Comfy/ComfyScheduler.cs b/StabilityMatrix.Core/Models/Api/Comfy/ComfyScheduler.cs index 2ee6d7b2..39aafc3a 100644 --- a/StabilityMatrix.Core/Models/Api/Comfy/ComfyScheduler.cs +++ b/StabilityMatrix.Core/Models/Api/Comfy/ComfyScheduler.cs @@ -9,6 +9,7 @@ public readonly record struct ComfyScheduler(string Name) public static ComfyScheduler Exponential { get; } = new("exponential"); public static ComfyScheduler SDTurbo { get; } = new("sd_turbo"); public static ComfyScheduler Simple { get; } = new("simple"); + public static ComfyScheduler Beta { get; } = new("beta"); private static Dictionary ConvertDict { get; } = new() @@ -19,7 +20,8 @@ public readonly record struct ComfyScheduler(string Name) ["sgm_uniform"] = "SGM Uniform", [Simple.Name] = "Simple", ["ddim_uniform"] = "DDIM Uniform", - [SDTurbo.Name] = "SD Turbo" + [SDTurbo.Name] = "SD Turbo", + [Beta.Name] = "Beta" }; public static IReadOnlyList Defaults { get; } = diff --git a/StabilityMatrix.Core/Models/Packages/ComfyUI.cs b/StabilityMatrix.Core/Models/Packages/ComfyUI.cs index 9ccc8456..dc5a99f8 100644 --- a/StabilityMatrix.Core/Models/Packages/ComfyUI.cs +++ b/StabilityMatrix.Core/Models/Packages/ComfyUI.cs @@ -500,13 +500,28 @@ public override async Task> GetManifestExtensionsA .DownloadService.GetContentAsync(manifest.Uri.ToString(), cancellationToken) .ConfigureAwait(false); + // nf4 hack + var nf4Extension = new PackageExtension + { + Author = "comfyanonymous", + Files = [new Uri("https://github.com/comfyanonymous/ComfyUI_bitsandbytes_NF4")], + Reference = new Uri("https://github.com/comfyanonymous/ComfyUI_bitsandbytes_NF4"), + Title = "ComfyUI_bitsandbytes_NF4", + InstallType = "git-clone" + }; + // Parse json var jsonManifest = JsonSerializer.Deserialize( content, ComfyExtensionManifestSerializerContext.Default.Options ); - return jsonManifest?.GetPackageExtensions() ?? Enumerable.Empty(); + if (jsonManifest == null) + return []; + + var extensions = jsonManifest.GetPackageExtensions().ToList(); + extensions.Add(nf4Extension); + return extensions; } catch (Exception e) { From d20eb54f5a889735e41086bda7ec20495f2ce4d6 Mon Sep 17 00:00:00 2001 From: JT Date: Tue, 8 Oct 2024 20:57:00 -0700 Subject: [PATCH 2/3] fix invoke & infinity folders --- CHANGELOG.md | 14 ++------------ .../Models/Packages/BaseGitPackage.cs | 1 + StabilityMatrix.Core/Models/Packages/InvokeAI.cs | 10 +++++----- 3 files changed, 8 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ff05d2a6..e988405f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,24 +5,14 @@ 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.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.2 ### Added - Added Beta scheduler to the scheduler selector in Inference ### 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. ->>>>>>> 8c9b456c (Merge pull request #851 from ionite34/fix-nf4-sorta) ## v2.12.1 ### Fixed - Fixed [#916](https://github.com/LykosAI/StabilityMatrix/issues/916) - InvokeAI failing to install/update on macOS diff --git a/StabilityMatrix.Core/Models/Packages/BaseGitPackage.cs b/StabilityMatrix.Core/Models/Packages/BaseGitPackage.cs index 65fbc454..585c658f 100644 --- a/StabilityMatrix.Core/Models/Packages/BaseGitPackage.cs +++ b/StabilityMatrix.Core/Models/Packages/BaseGitPackage.cs @@ -568,6 +568,7 @@ SharedFolderMethod sharedFolderMethod // fix infinity controlnet folders await FixInfinityFolders(modelsDir.JoinDir("ControlNet"), "ControlNet").ConfigureAwait(false); + await FixInfinityFolders(modelsDir.JoinDir("StableDiffusion"), "sd").ConfigureAwait(false); // fix duplicate links in models dir // see https://github.com/LykosAI/StabilityMatrix/issues/338 diff --git a/StabilityMatrix.Core/Models/Packages/InvokeAI.cs b/StabilityMatrix.Core/Models/Packages/InvokeAI.cs index 3290c5ae..bcc1be51 100644 --- a/StabilityMatrix.Core/Models/Packages/InvokeAI.cs +++ b/StabilityMatrix.Core/Models/Packages/InvokeAI.cs @@ -183,14 +183,14 @@ await SetupAndBuildInvokeFrontend( { case TorchIndex.Cuda: torchInstallArgs = torchInstallArgs - .WithTorch("==2.2.2") - .WithTorchVision("==0.17.2") - .WithXFormers("==0.0.25.post1") - .WithTorchExtraIndex("cu121"); + .WithTorch("==2.4.1") + .WithTorchVision("==0.19.1") + .WithXFormers("==0.0.28.post1") + .WithTorchExtraIndex("cu124"); Logger.Info("Starting InvokeAI install (CUDA)..."); pipCommandArgs = - "-e .[xformers] --use-pep517 --extra-index-url https://download.pytorch.org/whl/cu121"; + "-e .[xformers] --use-pep517 --extra-index-url https://download.pytorch.org/whl/cu124"; break; case TorchIndex.Rocm: From 2b15a27d2b52a4010892cc42f76f9a6bd97b0057 Mon Sep 17 00:00:00 2001 From: JT Date: Wed, 9 Oct 2024 18:49:55 -0700 Subject: [PATCH 3/3] Fix mac minimize / update to avalonia 11.1.4 --- CHANGELOG.md | 8 ++++++++ Directory.Build.props | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e988405f..93d87c47 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,10 +8,18 @@ and this project adheres to [Semantic Versioning 2.0](https://semver.org/spec/v2 ## v2.12.2 ### Added - Added Beta scheduler to the scheduler selector in Inference +### Changed +- (Internal) Updated to Avalonia 11.1.4 ### 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 +### Supporters +#### Visionaries +- We extend our heartfelt appreciation to our dedicated Visionary-tier Patreon supporter, **Waterclouds**. Your ongoing support is invaluable! +#### Pioneers +- We’d also like to thank our great Pioneer-tier patrons: **tankfox**, **tanangular**, **Mr. Unknown**, and **Szir777**. Your continuous support means a lot! ## v2.12.1 ### Fixed diff --git a/Directory.Build.props b/Directory.Build.props index 77081232..ebef34b6 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,5 +1,5 @@  - 11.1.3 + 11.1.4