Browse Source

- Fixed crash on startup when library directory is not set

- Fixed One-Click install progress dialog not disappearing after completion
- Fixed ComfyUI with Inference pop-up during one-click install appearing below the visible scroll area
- Made PackageModificationRunner's ModificationCompleteMessage a required property
- Made the initial window size bigger to account for the size of the new one click installer dialog
pull/629/head
JT 8 months ago
parent
commit
2f0e081e90
  1. 5
      CHANGELOG.md
  2. 3
      StabilityMatrix.Avalonia/DesignData/DesignData.cs
  3. 7
      StabilityMatrix.Avalonia/ViewModels/Dialogs/NewOneClickInstallViewModel.cs
  4. 7
      StabilityMatrix.Avalonia/ViewModels/Dialogs/OneClickInstallViewModel.cs
  5. 2
      StabilityMatrix.Avalonia/ViewModels/PackageManagerViewModel.cs
  6. 39
      StabilityMatrix.Avalonia/Views/Dialogs/NewOneClickInstallDialog.axaml
  7. 4
      StabilityMatrix.Avalonia/Views/MainWindow.axaml
  8. 12
      StabilityMatrix.Core/Models/PackageDifficulty.cs
  9. 2
      StabilityMatrix.Core/Models/PackageModification/IPackageModificationRunner.cs
  10. 2
      StabilityMatrix.Core/Models/PackageModification/PackageModificationRunner.cs
  11. 2
      StabilityMatrix.Core/Models/Packages/ComfyUI.cs
  12. 2
      StabilityMatrix.Core/Models/Packages/SDWebForge.cs

5
CHANGELOG.md

@ -7,7 +7,10 @@ and this project adheres to [Semantic Versioning 2.0](https://semver.org/spec/v2
## v2.10.0-dev.3 ## v2.10.0-dev.3
### Fixed ### Fixed
- Fix model download location options for VAEs in the CivitAI Model Browser - Fixed model download location options for VAEs in the CivitAI Model Browser
- Fixed crash on startup when library directory is not set
- Fixed One-Click install progress dialog not disappearing after completion
- Fixed ComfyUI with Inference pop-up during one-click install appearing below the visible scroll area
## v2.10.0-dev.2 ## v2.10.0-dev.2
### Added ### Added

3
StabilityMatrix.Avalonia/DesignData/DesignData.cs

@ -417,7 +417,8 @@ public static class DesignData
new PackageInstallProgressItemViewModel( new PackageInstallProgressItemViewModel(
new PackageModificationRunner new PackageModificationRunner
{ {
CurrentProgress = new ProgressReport(0.5f, "Installing package...") CurrentProgress = new ProgressReport(0.5f, "Installing package..."),
ModificationCompleteMessage = "Package installed successfully"
} }
) )
} }

7
StabilityMatrix.Avalonia/ViewModels/Dialogs/NewOneClickInstallViewModel.cs

@ -75,7 +75,7 @@ public partial class NewOneClickInstallViewModel : ContentDialogViewModelBase
.Connect() .Connect()
.DeferUntilLoaded() .DeferUntilLoaded()
.Filter(incompatiblePredicate) .Filter(incompatiblePredicate)
.Filter(p => p.OfferInOneClickInstaller || ShowIncompatiblePackages) .Filter(p => p.OfferInOneClickInstaller)
.Sort( .Sort(
SortExpressionComparer<BasePackage> SortExpressionComparer<BasePackage>
.Ascending(p => p.InstallerSortOrder) .Ascending(p => p.InstallerSortOrder)
@ -85,6 +85,10 @@ public partial class NewOneClickInstallViewModel : ContentDialogViewModelBase
.Subscribe(); .Subscribe();
AllPackagesCache.AddOrUpdate(packageFactory.GetAllAvailablePackages()); AllPackagesCache.AddOrUpdate(packageFactory.GetAllAvailablePackages());
if (ShownPackages.Count > 0)
return;
ShowIncompatiblePackages = true;
} }
[RelayCommand] [RelayCommand]
@ -182,6 +186,7 @@ public partial class NewOneClickInstallViewModel : ContentDialogViewModelBase
{ {
ShowDialogOnStart = false, ShowDialogOnStart = false,
HideCloseButton = false, HideCloseButton = false,
ModificationCompleteMessage = $"{installedPackage.DisplayName} Install Complete",
}; };
runner runner

7
StabilityMatrix.Avalonia/ViewModels/Dialogs/OneClickInstallViewModel.cs

@ -192,7 +192,12 @@ public partial class OneClickInstallViewModel : ContentDialogViewModelBase
var addInstalledPackageStep = new AddInstalledPackageStep(settingsManager, installedPackage); var addInstalledPackageStep = new AddInstalledPackageStep(settingsManager, installedPackage);
steps.Add(addInstalledPackageStep); steps.Add(addInstalledPackageStep);
var runner = new PackageModificationRunner { ShowDialogOnStart = true, HideCloseButton = true, }; var runner = new PackageModificationRunner
{
ShowDialogOnStart = true,
HideCloseButton = true,
ModificationCompleteMessage = "Install complete"
};
EventManager.Instance.OnPackageInstallProgressAdded(runner); EventManager.Instance.OnPackageInstallProgressAdded(runner);
await runner.ExecuteSteps(steps); await runner.ExecuteSteps(steps);

2
StabilityMatrix.Avalonia/ViewModels/PackageManagerViewModel.cs

@ -120,7 +120,7 @@ public partial class PackageManagerViewModel : PageViewModelBase
public override async Task OnLoadedAsync() public override async Task OnLoadedAsync()
{ {
if (Design.IsDesignMode) if (Design.IsDesignMode || !settingsManager.IsLibraryDirSet)
return; return;
installedPackages.EditDiff(settingsManager.Settings.InstalledPackages, InstalledPackage.Comparer); installedPackages.EditDiff(settingsManager.Settings.InstalledPackages, InstalledPackage.Comparer);

39
StabilityMatrix.Avalonia/Views/Dialogs/NewOneClickInstallDialog.axaml

@ -62,6 +62,27 @@
VerticalAlignment="Top"> VerticalAlignment="Top">
<controls:Card.Styles> <controls:Card.Styles>
<Style Selector="controls|Card[Tag=ReallyRecommended]">
<Setter Property="Background"
Value="{DynamicResource ThemeGreenColorTransparent}" />
<Setter Property="BorderBrush"
Value="{DynamicResource ThemeGreenColorTransparent}" />
<Style
Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
<Setter Property="Foreground"
Value="{DynamicResource ButtonForeground}" />
</Style>
<Setter Property="Content">
<Template>
<TextBlock
FontWeight="Medium"
HorizontalAlignment="Center"
Text="Recommended"
TextAlignment="Center"
VerticalAlignment="Center" />
</Template>
</Setter>
</Style>
<Style Selector="controls|Card[Tag=Recommended]"> <Style Selector="controls|Card[Tag=Recommended]">
<Setter Property="Background" <Setter Property="Background"
Value="{DynamicResource ThemeGreenColorTransparent}" /> Value="{DynamicResource ThemeGreenColorTransparent}" />
@ -117,6 +138,24 @@
</Template> </Template>
</Setter> </Setter>
</Style> </Style>
<Style Selector="controls|Card[Tag=InferenceCompatible]">
<Setter Property="Background"
Value="{DynamicResource ThemePurpleColor}" />
<Setter Property="BorderBrush"
Value="{DynamicResource ThemePurpleColor}" />
<Setter Property="Foreground"
Value="White" />
<Setter Property="Content">
<Template>
<TextBlock
FontWeight="Medium"
HorizontalAlignment="Center"
Text="Inference Compatible"
TextAlignment="Center"
VerticalAlignment="Center" />
</Template>
</Setter>
</Style>
<Style Selector="controls|Card"> <Style Selector="controls|Card">
<Setter Property="Background" <Setter Property="Background"
Value="{DynamicResource ThemeDarkRedColor}" /> Value="{DynamicResource ThemeDarkRedColor}" />

4
StabilityMatrix.Avalonia/Views/MainWindow.axaml

@ -14,8 +14,8 @@
d:DataContext="{x:Static mocks:DesignData.MainWindowViewModel}" d:DataContext="{x:Static mocks:DesignData.MainWindowViewModel}"
x:DataType="vm:MainWindowViewModel" x:DataType="vm:MainWindowViewModel"
Icon="/Assets/Icon.ico" Icon="/Assets/Icon.ico"
Width="1100" Width="1300"
Height="750" Height="950"
BackRequested="TopLevel_OnBackRequested" BackRequested="TopLevel_OnBackRequested"
Title="Stability Matrix" Title="Stability Matrix"
DockProperties.IsDragEnabled="True" DockProperties.IsDragEnabled="True"

12
StabilityMatrix.Core/Models/PackageDifficulty.cs

@ -2,11 +2,13 @@
public enum PackageDifficulty public enum PackageDifficulty
{ {
ReallyRecommended = -1,
Recommended = 0, Recommended = 0,
Simple = 1, InferenceCompatible = 1,
Advanced = 2, Simple = 2,
Expert = 3, Advanced = 3,
Nightmare = 4, Expert = 4,
UltraNightmare = 5, Nightmare = 5,
UltraNightmare = 6,
Impossible = 999 Impossible = 999
} }

2
StabilityMatrix.Core/Models/PackageModification/IPackageModificationRunner.cs

@ -32,7 +32,7 @@ public interface IPackageModificationRunner
string? ModificationCompleteTitle { get; init; } string? ModificationCompleteTitle { get; init; }
string? ModificationCompleteMessage { get; init; } string ModificationCompleteMessage { get; init; }
string? ModificationFailedTitle { get; init; } string? ModificationFailedTitle { get; init; }

2
StabilityMatrix.Core/Models/PackageModification/PackageModificationRunner.cs

@ -80,7 +80,7 @@ public class PackageModificationRunner : IPackageModificationRunner
public string? ModificationCompleteTitle { get; init; } = "Install Complete"; public string? ModificationCompleteTitle { get; init; } = "Install Complete";
public string? ModificationCompleteMessage { get; init; } public required string ModificationCompleteMessage { get; init; }
public string? ModificationFailedTitle { get; init; } = "Install Failed"; public string? ModificationFailedTitle { get; init; } = "Install Failed";

2
StabilityMatrix.Core/Models/Packages/ComfyUI.cs

@ -43,7 +43,7 @@ public class ComfyUI(
public override bool ShouldIgnoreReleases => true; public override bool ShouldIgnoreReleases => true;
public override bool IsInferenceCompatible => true; public override bool IsInferenceCompatible => true;
public override string OutputFolderName => "output"; public override string OutputFolderName => "output";
public override PackageDifficulty InstallerSortOrder => PackageDifficulty.Advanced; public override PackageDifficulty InstallerSortOrder => PackageDifficulty.InferenceCompatible;
public override SharedFolderMethod RecommendedSharedFolderMethod => SharedFolderMethod.Configuration; public override SharedFolderMethod RecommendedSharedFolderMethod => SharedFolderMethod.Configuration;

2
StabilityMatrix.Core/Models/Packages/SDWebForge.cs

@ -39,6 +39,8 @@ public class SDWebForge(
public override bool ShouldIgnoreReleases => true; public override bool ShouldIgnoreReleases => true;
public override IPackageExtensionManager ExtensionManager => null; public override IPackageExtensionManager ExtensionManager => null;
public override string OutputFolderName => "output"; public override string OutputFolderName => "output";
public override PackageDifficulty InstallerSortOrder => PackageDifficulty.ReallyRecommended;
public override Dictionary<SharedOutputType, IReadOnlyList<string>>? SharedOutputFolders => public override Dictionary<SharedOutputType, IReadOnlyList<string>>? SharedOutputFolders =>
new() new()
{ {

Loading…
Cancel
Save