From 027d846216de583354fc3e3c2336b680ae1349ce Mon Sep 17 00:00:00 2001 From: ionite34 Date: Wed, 7 Feb 2024 13:18:11 -0500 Subject: [PATCH 1/6] Move SDTurbo Denoise strength to temp property (cherry picked from commit 1b4cadf5da6b5d2b3199773c0c517ee0d90a670c) --- .../Controls/Inference/SamplerCard.axaml | 8 +++++++- .../ViewModels/Inference/InferenceTextToImageViewModel.cs | 8 -------- .../ViewModels/Inference/SamplerCardViewModel.cs | 7 +++++++ 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/StabilityMatrix.Avalonia/Controls/Inference/SamplerCard.axaml b/StabilityMatrix.Avalonia/Controls/Inference/SamplerCard.axaml index d3f548a6..bc76841e 100644 --- a/StabilityMatrix.Avalonia/Controls/Inference/SamplerCard.axaml +++ b/StabilityMatrix.Avalonia/Controls/Inference/SamplerCard.axaml @@ -123,7 +123,13 @@ - + + + + + + + x.SelectedScheduler) - .Subscribe(e => - { - e.Sender.IsDenoiseStrengthEnabled = - e.Sender.SelectedScheduler?.DisplayName.Equals("SD Turbo") ?? false; - }); } /// diff --git a/StabilityMatrix.Avalonia/ViewModels/Inference/SamplerCardViewModel.cs b/StabilityMatrix.Avalonia/ViewModels/Inference/SamplerCardViewModel.cs index 96b9de36..0ca83169 100644 --- a/StabilityMatrix.Avalonia/ViewModels/Inference/SamplerCardViewModel.cs +++ b/StabilityMatrix.Avalonia/ViewModels/Inference/SamplerCardViewModel.cs @@ -42,6 +42,12 @@ public partial class SamplerCardViewModel : LoadableViewModelBase, IParametersLo [ObservableProperty] private bool isDenoiseStrengthEnabled; + /// + /// Temporary enable for denoise strength, used for SDTurbo. + /// Denoise will be enabled if either this or is true. + /// + public bool IsDenoiseStrengthTempEnabled => SelectedScheduler == ComfyScheduler.SDTurbo; + [ObservableProperty] private double denoiseStrength = 0.7f; @@ -77,6 +83,7 @@ public partial class SamplerCardViewModel : LoadableViewModelBase, IParametersLo private bool isSchedulerSelectionEnabled; [ObservableProperty] + [NotifyPropertyChangedFor(nameof(IsDenoiseStrengthTempEnabled))] [Required] private ComfyScheduler? selectedScheduler = ComfyScheduler.Normal; From a26de6b9f24b61f216373eb1c4a0e7212f8a7052 Mon Sep 17 00:00:00 2001 From: ionite34 Date: Wed, 7 Feb 2024 13:24:31 -0500 Subject: [PATCH 2/6] Update CHANGELOG.md (cherry picked from commit d7a03edc322246aabdd6023ae3b597ece14587f7) --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 79e17f0d..6cab19b2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,10 @@ 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.8.2 +### Fixed +- Fixed Inference Image to Image Denoise setting becoming hidden after changing schedulers + ## v2.8.1 ### Fixed - Fixed model links not working in RuinedFooocus for new installations From c6ae44cc8e28af173cf5052b104fa89f43b4a14c Mon Sep 17 00:00:00 2001 From: ionite34 Date: Wed, 7 Feb 2024 13:25:27 -0500 Subject: [PATCH 3/6] Update project version (cherry picked from commit b9a5cb37867c3432d8d0d847640afeb79991697e) --- StabilityMatrix.Avalonia/StabilityMatrix.Avalonia.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/StabilityMatrix.Avalonia/StabilityMatrix.Avalonia.csproj b/StabilityMatrix.Avalonia/StabilityMatrix.Avalonia.csproj index e6d4277a..1190f686 100644 --- a/StabilityMatrix.Avalonia/StabilityMatrix.Avalonia.csproj +++ b/StabilityMatrix.Avalonia/StabilityMatrix.Avalonia.csproj @@ -17,7 +17,7 @@ app.manifest true ./Assets/Icon.ico - 2.8.0-dev.999 + 2.9.0-dev.999 $(Version) true true From 2691fd24626acd3122f206f8794ae0a57b656ab5 Mon Sep 17 00:00:00 2001 From: Ionite Date: Thu, 8 Feb 2024 11:57:54 -0500 Subject: [PATCH 4/6] Merge pull request #509 from ionite34/inference-fixes Inference Fixes (cherry picked from commit 43869300ee97086681efc2ff7fd884d19db34528) --- .github/workflows/backport.yml | 6 +- CHANGELOG.md | 2 + .../Services/InferenceClientManager.cs | 77 +++++++++++++------ .../Inference/SamplerCardViewModel.cs | 21 ++--- 4 files changed, 71 insertions(+), 35 deletions(-) diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml index 17227789..7bb427f5 100644 --- a/.github/workflows/backport.yml +++ b/.github/workflows/backport.yml @@ -1,12 +1,12 @@ name: Automatic Backport on: - pull_request_target: - types: ["labeled", "closed"] + pull_request: + types: ["closed", "labeled"] jobs: backport: - if: startsWith(github.event.pull_request.labels.*.name, 'backport-to-') + if: ${{ (github.event.pull_request.merged == true) && (contains(github.event.pull_request.labels.*.name, 'backport-to-main') == true) }} name: Backport PR runs-on: ubuntu-latest steps: diff --git a/CHANGELOG.md b/CHANGELOG.md index 6cab19b2..25c58bb4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,8 @@ and this project adheres to [Semantic Versioning 2.0](https://semver.org/spec/v2 ## v2.8.2 ### Fixed - Fixed Inference Image to Image Denoise setting becoming hidden after changing schedulers +- Fixed Inference ControlNet models showing as downloadable even when they are already installed +- Fixed Inference Sampler Addon conditioning not applying (i.e. ControlNet) ## v2.8.1 ### Fixed diff --git a/StabilityMatrix.Avalonia/Services/InferenceClientManager.cs b/StabilityMatrix.Avalonia/Services/InferenceClientManager.cs index 995a93bb..b3afcdf2 100644 --- a/StabilityMatrix.Avalonia/Services/InferenceClientManager.cs +++ b/StabilityMatrix.Avalonia/Services/InferenceClientManager.cs @@ -56,7 +56,8 @@ public partial class InferenceClientManager : ObservableObject, IInferenceClient private readonly SourceCache modelsSource = new(p => p.GetId()); - public IObservableCollection Models { get; } = new ObservableCollectionExtended(); + public IObservableCollection Models { get; } = + new ObservableCollectionExtended(); private readonly SourceCache vaeModelsSource = new(p => p.GetId()); @@ -67,14 +68,16 @@ public partial class InferenceClientManager : ObservableObject, IInferenceClient private readonly SourceCache controlNetModelsSource = new(p => p.GetId()); - private readonly SourceCache downloadableControlNetModelsSource = new(p => p.GetId()); + private readonly SourceCache downloadableControlNetModelsSource = + new(p => p.GetId()); public IObservableCollection ControlNetModels { get; } = new ObservableCollectionExtended(); private readonly SourceCache samplersSource = new(p => p.Name); - public IObservableCollection Samplers { get; } = new ObservableCollectionExtended(); + public IObservableCollection Samplers { get; } = + new ObservableCollectionExtended(); private readonly SourceCache modelUpscalersSource = new(p => p.Name); @@ -82,7 +85,8 @@ public partial class InferenceClientManager : ObservableObject, IInferenceClient private readonly SourceCache downloadableUpscalersSource = new(p => p.Name); - public IObservableCollection Upscalers { get; } = new ObservableCollectionExtended(); + public IObservableCollection Upscalers { get; } = + new ObservableCollectionExtended(); private readonly SourceCache schedulersSource = new(p => p.Name); @@ -105,7 +109,11 @@ public partial class InferenceClientManager : ObservableObject, IInferenceClient modelsSource .Connect() - .SortBy(f => f.ShortDisplayName, SortDirection.Ascending, SortOptimisations.ComparesImmutableValuesOnly) + .SortBy( + f => f.ShortDisplayName, + SortDirection.Ascending, + SortOptimisations.ComparesImmutableValuesOnly + ) .DeferUntilLoaded() .Bind(Models) .Subscribe(); @@ -114,7 +122,9 @@ public partial class InferenceClientManager : ObservableObject, IInferenceClient .Connect() .Or(downloadableControlNetModelsSource.Connect()) .Sort( - SortExpressionComparer.Ascending(f => f.Type).ThenByAscending(f => f.ShortDisplayName) + SortExpressionComparer + .Ascending(f => f.Type) + .ThenByAscending(f => f.ShortDisplayName) ) .DeferUntilLoaded() .Bind(ControlNetModels) @@ -153,7 +163,9 @@ public partial class InferenceClientManager : ObservableObject, IInferenceClient if (IsConnected) { LoadSharedPropertiesAsync() - .SafeFireAndForget(onException: ex => logger.LogError(ex, "Error loading shared properties")); + .SafeFireAndForget( + onException: ex => logger.LogError(ex, "Error loading shared properties") + ); } }; } @@ -176,7 +188,10 @@ public partial class InferenceClientManager : ObservableObject, IInferenceClient } // Get control net model names - if (await Client.GetNodeOptionNamesAsync("ControlNetLoader", "control_net_name") is { } controlNetModelNames) + if ( + await Client.GetNodeOptionNamesAsync("ControlNetLoader", "control_net_name") is + { } controlNetModelNames + ) { controlNetModelsSource.EditDiff( controlNetModelNames.Select(HybridModelFile.FromRemote), @@ -187,13 +202,18 @@ public partial class InferenceClientManager : ObservableObject, IInferenceClient // Fetch sampler names from KSampler node if (await Client.GetSamplerNamesAsync() is { } samplerNames) { - samplersSource.EditDiff(samplerNames.Select(name => new ComfySampler(name)), ComfySampler.Comparer); + samplersSource.EditDiff( + samplerNames.Select(name => new ComfySampler(name)), + ComfySampler.Comparer + ); } // Upscalers is latent and esrgan combined // Add latent upscale methods from LatentUpscale node - if (await Client.GetNodeOptionNamesAsync("LatentUpscale", "upscale_method") is { } latentUpscalerNames) + if ( + await Client.GetNodeOptionNamesAsync("LatentUpscale", "upscale_method") is { } latentUpscalerNames + ) { latentUpscalersSource.EditDiff( latentUpscalerNames.Select(s => new ComfyUpscaler(s, ComfyUpscalerType.Latent)), @@ -204,7 +224,9 @@ public partial class InferenceClientManager : ObservableObject, IInferenceClient } // Add Model upscale methods - if (await Client.GetNodeOptionNamesAsync("UpscaleModelLoader", "model_name") is { } modelUpscalerNames) + if ( + await Client.GetNodeOptionNamesAsync("UpscaleModelLoader", "model_name") is { } modelUpscalerNames + ) { modelUpscalersSource.EditDiff( modelUpscalerNames.Select(s => new ComfyUpscaler(s, ComfyUpscalerType.ESRGAN)), @@ -219,7 +241,9 @@ public partial class InferenceClientManager : ObservableObject, IInferenceClient schedulersSource.Edit(updater => { updater.AddOrUpdate( - schedulerNames.Where(n => !schedulersSource.Keys.Contains(n)).Select(s => new ComfyScheduler(s)) + schedulerNames + .Where(n => !schedulersSource.Keys.Contains(n)) + .Select(s => new ComfyScheduler(s)) ); }); logger.LogTrace("Loaded scheduler methods: {@Schedulers}", schedulerNames); @@ -233,20 +257,24 @@ public partial class InferenceClientManager : ObservableObject, IInferenceClient { // Load local models modelsSource.EditDiff( - modelIndexService.GetFromModelIndex(SharedFolderType.StableDiffusion).Select(HybridModelFile.FromLocal), + modelIndexService + .GetFromModelIndex(SharedFolderType.StableDiffusion) + .Select(HybridModelFile.FromLocal), HybridModelFile.Comparer ); // Load local control net models controlNetModelsSource.EditDiff( - modelIndexService.GetFromModelIndex(SharedFolderType.ControlNet).Select(HybridModelFile.FromLocal), + modelIndexService + .GetFromModelIndex(SharedFolderType.ControlNet) + .Select(HybridModelFile.FromLocal), HybridModelFile.Comparer ); // Downloadable ControlNet models - var downloadableControlNets = RemoteModels - .ControlNetModels - .Where(u => !modelUpscalersSource.Lookup(u.GetId()).HasValue); + var downloadableControlNets = RemoteModels.ControlNetModels.Where( + u => !controlNetModelsSource.Lookup(u.GetId()).HasValue + ); downloadableControlNetModelsSource.EditDiff(downloadableControlNets, HybridModelFile.Comparer); // Load local VAE models @@ -264,15 +292,17 @@ public partial class InferenceClientManager : ObservableObject, IInferenceClient // Load Upscalers modelUpscalersSource.EditDiff( modelIndexService - .GetFromModelIndex(SharedFolderType.ESRGAN | SharedFolderType.RealESRGAN | SharedFolderType.SwinIR) + .GetFromModelIndex( + SharedFolderType.ESRGAN | SharedFolderType.RealESRGAN | SharedFolderType.SwinIR + ) .Select(m => new ComfyUpscaler(m.FileName, ComfyUpscalerType.ESRGAN)), ComfyUpscaler.Comparer ); // Remote upscalers - var remoteUpscalers = ComfyUpscaler - .DefaultDownloadableModels - .Where(u => !modelUpscalersSource.Lookup(u.Name).HasValue); + var remoteUpscalers = ComfyUpscaler.DefaultDownloadableModels.Where( + u => !modelUpscalersSource.Lookup(u.Name).HasValue + ); downloadableUpscalersSource.EditDiff(remoteUpscalers, ComfyUpscaler.Comparer); } @@ -322,7 +352,10 @@ public partial class InferenceClientManager : ObservableObject, IInferenceClient } /// - public async Task WriteImageToInputAsync(ImageSource imageSource, CancellationToken cancellationToken = default) + public async Task WriteImageToInputAsync( + ImageSource imageSource, + CancellationToken cancellationToken = default + ) { if (!IsConnected) return; diff --git a/StabilityMatrix.Avalonia/ViewModels/Inference/SamplerCardViewModel.cs b/StabilityMatrix.Avalonia/ViewModels/Inference/SamplerCardViewModel.cs index 0ca83169..c2409259 100644 --- a/StabilityMatrix.Avalonia/ViewModels/Inference/SamplerCardViewModel.cs +++ b/StabilityMatrix.Avalonia/ViewModels/Inference/SamplerCardViewModel.cs @@ -161,6 +161,10 @@ public partial class SamplerCardViewModel : LoadableViewModelBase, IParametersLo var primaryScheduler = SelectedScheduler ?? throw new ValidationException("Scheduler not selected"); e.Builder.Connections.PrimaryScheduler = primaryScheduler; + // Use Temp Conditioning that may be modified by addons + var conditioning = e.Temp.Conditioning.Unwrap(); + var refinerConditioning = e.Temp.RefinerConditioning; + // Use custom sampler if SDTurbo scheduler is selected if (e.Builder.Connections.PrimaryScheduler == ComfyScheduler.SDTurbo) { @@ -196,8 +200,8 @@ public partial class SamplerCardViewModel : LoadableViewModelBase, IParametersLo AddNoise = true, NoiseSeed = e.Builder.Connections.Seed, Cfg = CfgScale, - Positive = e.Temp.Conditioning?.Positive!, - Negative = e.Temp.Conditioning?.Negative!, + Positive = conditioning.Positive, + Negative = conditioning.Negative, Sampler = kSamplerSelect.Output, Sigmas = turboScheduler.Output, LatentImage = primaryLatent @@ -225,8 +229,8 @@ public partial class SamplerCardViewModel : LoadableViewModelBase, IParametersLo Scheduler = primaryScheduler.Name, Steps = Steps, Cfg = CfgScale, - Positive = baseConditioning.Positive, - Negative = baseConditioning.Negative, + Positive = conditioning.Positive, + Negative = conditioning.Negative, LatentImage = primaryLatent, Denoise = DenoiseStrength, } @@ -236,9 +240,6 @@ public partial class SamplerCardViewModel : LoadableViewModelBase, IParametersLo } else { - var baseConditioning = e.Builder.Connections.Base.Conditioning.Unwrap(); - var refinerConditioning = e.Builder.Connections.Refiner.Conditioning.Unwrap(); - // Advanced base sampler for refiner var sampler = e.Nodes.AddTypedNode( new ComfyNodeBuilder.KSamplerAdvanced @@ -251,8 +252,8 @@ public partial class SamplerCardViewModel : LoadableViewModelBase, IParametersLo Cfg = CfgScale, SamplerName = primarySampler.Name, Scheduler = primaryScheduler.Name, - Positive = baseConditioning.Positive, - Negative = baseConditioning.Negative, + Positive = conditioning.Positive, + Negative = conditioning.Negative, LatentImage = primaryLatent, StartAtStep = 0, EndAtStep = Steps, @@ -272,7 +273,7 @@ public partial class SamplerCardViewModel : LoadableViewModelBase, IParametersLo Cfg = CfgScale, SamplerName = primarySampler.Name, Scheduler = primaryScheduler.Name, - Positive = refinerConditioning.Positive, + Positive = refinerConditioning!.Positive, Negative = refinerConditioning.Negative, // Connect to previous sampler LatentImage = sampler.Output, From 587fee5b77c5acd82b22241403bab2c35bf9e6d6 Mon Sep 17 00:00:00 2001 From: JT Date: Thu, 8 Feb 2024 18:13:12 -0800 Subject: [PATCH 5/6] Merge pull request #511 from ionite34/recommended-fix Fix Recommended Models crash (cherry picked from commit 5915b131ed3551174a06b20208a3456225178202) --- .../Dialogs/RecommendedModelsViewModel.cs | 44 ++++++++++++------- 1 file changed, 29 insertions(+), 15 deletions(-) diff --git a/StabilityMatrix.Avalonia/ViewModels/Dialogs/RecommendedModelsViewModel.cs b/StabilityMatrix.Avalonia/ViewModels/Dialogs/RecommendedModelsViewModel.cs index 3ae964a4..41750364 100644 --- a/StabilityMatrix.Avalonia/ViewModels/Dialogs/RecommendedModelsViewModel.cs +++ b/StabilityMatrix.Avalonia/ViewModels/Dialogs/RecommendedModelsViewModel.cs @@ -8,6 +8,7 @@ using CommunityToolkit.Mvvm.Input; using DynamicData; using DynamicData.Binding; using Microsoft.Extensions.Logging; +using Refit; using StabilityMatrix.Avalonia.Services; using StabilityMatrix.Avalonia.ViewModels.Base; using StabilityMatrix.Core.Api; @@ -86,21 +87,34 @@ public partial class RecommendedModelsViewModel : ContentDialogViewModelBase IsLoading = true; - var recommendedModels = await lykosApi.GetRecommendedModels(); - - CivitModels.AddOrUpdate( - recommendedModels.Items.Select( - model => - new RecommendedModelItemViewModel - { - ModelVersion = model.ModelVersions.First( - x => !x.BaseModel.Contains("Turbo", StringComparison.OrdinalIgnoreCase) - ), - Author = $"by {model.Creator.Username}", - CivitModel = model - } - ) - ); + try + { + var recommendedModels = await lykosApi.GetRecommendedModels(); + + CivitModels.AddOrUpdate( + recommendedModels.Items.Select( + model => + new RecommendedModelItemViewModel + { + ModelVersion = model.ModelVersions.First( + x => !x.BaseModel.Contains("Turbo", StringComparison.OrdinalIgnoreCase) + ), + Author = $"by {model.Creator.Username}", + CivitModel = model + } + ) + ); + } + catch (ApiException e) + { + // hide dialog and show error msg + logger.LogError(e, "Failed to get recommended models"); + notificationService.Show( + "Failed to get recommended models", + "Please try again later or check the Model Browser tab for more models." + ); + OnCloseButtonClick(); + } IsLoading = false; } From 59af8bc07d1db7680227ff8f29e24caf22e6e55f Mon Sep 17 00:00:00 2001 From: JT Date: Thu, 8 Feb 2024 21:58:10 -0800 Subject: [PATCH 6/6] Fixed extension modification dialog not showing any progress messages & added GFPGAN link to a1111 --- CHANGELOG.md | 3 +++ .../PackageExtensionBrowserViewModel.cs | 21 ++++++++++++++++--- .../PackageModificationRunner.cs | 5 +++++ .../Models/Packages/A3WebUI.cs | 1 + .../Extensions/GitPackageExtensionManager.cs | 16 ++++++++++---- 5 files changed, 39 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 25c58bb4..3c5e3c2d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,10 +6,13 @@ 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.8.2 +### Added +- Added missing GFPGAN link to Automatic1111 packages ### Fixed - Fixed Inference Image to Image Denoise setting becoming hidden after changing schedulers - Fixed Inference ControlNet models showing as downloadable even when they are already installed - Fixed Inference Sampler Addon conditioning not applying (i.e. ControlNet) +- Fixed extension modification dialog not showing any progress messages ## v2.8.1 ### Fixed diff --git a/StabilityMatrix.Avalonia/ViewModels/PackageManager/PackageExtensionBrowserViewModel.cs b/StabilityMatrix.Avalonia/ViewModels/PackageManager/PackageExtensionBrowserViewModel.cs index 9aa2e6fc..b4951cdb 100644 --- a/StabilityMatrix.Avalonia/ViewModels/PackageManager/PackageExtensionBrowserViewModel.cs +++ b/StabilityMatrix.Avalonia/ViewModels/PackageManager/PackageExtensionBrowserViewModel.cs @@ -179,7 +179,12 @@ public partial class PackageExtensionBrowserViewModel : ViewModelBase, IDisposab .Cast() .ToArray(); - var runner = new PackageModificationRunner { ShowDialogOnStart = true }; + var runner = new PackageModificationRunner + { + ShowDialogOnStart = true, + ModificationCompleteTitle = "Installed Extensions", + ModificationCompleteMessage = "Finished installing extensions" + }; EventManager.Instance.OnPackageInstallProgressAdded(runner); await runner.ExecuteSteps(steps); @@ -209,7 +214,12 @@ public partial class PackageExtensionBrowserViewModel : ViewModelBase, IDisposab .Cast() .ToArray(); - var runner = new PackageModificationRunner { ShowDialogOnStart = true }; + var runner = new PackageModificationRunner + { + ShowDialogOnStart = true, + ModificationCompleteTitle = "Updated Extensions", + ModificationCompleteMessage = "Finished updating extensions" + }; EventManager.Instance.OnPackageInstallProgressAdded(runner); await runner.ExecuteSteps(steps); @@ -239,7 +249,12 @@ public partial class PackageExtensionBrowserViewModel : ViewModelBase, IDisposab .Cast() .ToArray(); - var runner = new PackageModificationRunner { ShowDialogOnStart = true }; + var runner = new PackageModificationRunner + { + ShowDialogOnStart = true, + ModificationCompleteTitle = "Uninstalled Extensions", + ModificationCompleteMessage = "Finished uninstalling extensions" + }; EventManager.Instance.OnPackageInstallProgressAdded(runner); await runner.ExecuteSteps(steps); diff --git a/StabilityMatrix.Core/Models/PackageModification/PackageModificationRunner.cs b/StabilityMatrix.Core/Models/PackageModification/PackageModificationRunner.cs index bb57b56e..902717c5 100644 --- a/StabilityMatrix.Core/Models/PackageModification/PackageModificationRunner.cs +++ b/StabilityMatrix.Core/Models/PackageModification/PackageModificationRunner.cs @@ -15,6 +15,11 @@ public class PackageModificationRunner : IPackageModificationRunner ConsoleOutput.Add(report.Message); } + if (!string.IsNullOrWhiteSpace(report.Title)) + { + ConsoleOutput.Add(report.Title); + } + OnProgressChanged(report); }); diff --git a/StabilityMatrix.Core/Models/Packages/A3WebUI.cs b/StabilityMatrix.Core/Models/Packages/A3WebUI.cs index 75130ea8..808a9a48 100644 --- a/StabilityMatrix.Core/Models/Packages/A3WebUI.cs +++ b/StabilityMatrix.Core/Models/Packages/A3WebUI.cs @@ -48,6 +48,7 @@ public class A3WebUI( { [SharedFolderType.StableDiffusion] = new[] { "models/Stable-diffusion" }, [SharedFolderType.ESRGAN] = new[] { "models/ESRGAN" }, + [SharedFolderType.GFPGAN] = new[] { "models/GFPGAN" }, [SharedFolderType.RealESRGAN] = new[] { "models/RealESRGAN" }, [SharedFolderType.SwinIR] = new[] { "models/SwinIR" }, [SharedFolderType.Lora] = new[] { "models/Lora" }, diff --git a/StabilityMatrix.Core/Models/Packages/Extensions/GitPackageExtensionManager.cs b/StabilityMatrix.Core/Models/Packages/Extensions/GitPackageExtensionManager.cs index 7f20a550..0aa86841 100644 --- a/StabilityMatrix.Core/Models/Packages/Extensions/GitPackageExtensionManager.cs +++ b/StabilityMatrix.Core/Models/Packages/Extensions/GitPackageExtensionManager.cs @@ -155,13 +155,15 @@ public abstract class GitPackageExtensionManager(IPrerequisiteHelper prerequisit { cancellationToken.ThrowIfCancellationRequested(); - progress?.Report(new ProgressReport(0f, $"Cloning {repositoryUri}", isIndeterminate: true)); + progress?.Report( + new ProgressReport(0f, message: $"Cloning {repositoryUri}", isIndeterminate: true) + ); await prerequisiteHelper .CloneGitRepository(cloneRoot, repositoryUri.ToString(), version) .ConfigureAwait(false); - progress?.Report(new ProgressReport(1f, $"Cloned {repositoryUri}")); + progress?.Report(new ProgressReport(1f, message: $"Cloned {repositoryUri}")); } } @@ -191,7 +193,11 @@ public abstract class GitPackageExtensionManager(IPrerequisiteHelper prerequisit .ConfigureAwait(false); progress?.Report( - new ProgressReport(0f, $"Updating git repository {repoPath.Name}", isIndeterminate: true) + new ProgressReport( + 0f, + message: $"Updating git repository {repoPath.Name}", + isIndeterminate: true + ) ); // If version not provided, use current branch @@ -206,7 +212,7 @@ public abstract class GitPackageExtensionManager(IPrerequisiteHelper prerequisit .UpdateGitRepository(repoPath, remoteUrlResult.StandardOutput!.Trim(), version) .ConfigureAwait(false); - progress?.Report(new ProgressReport(1f, $"Updated git repository {repoPath.Name}")); + progress?.Report(new ProgressReport(1f, message: $"Updated git repository {repoPath.Name}")); } } @@ -233,5 +239,7 @@ public abstract class GitPackageExtensionManager(IPrerequisiteHelper prerequisit await path.DeleteAsync().ConfigureAwait(false); } } + + progress?.Report(new ProgressReport(1f, message: "Uninstalled extension")); } }