Skip to content

Commit f6513d4

Browse files
committed
Merge pull request LykosAI#993 from ionite34/fixes-n-stuf
update to avalonia 11.2.5 and some packages fixes n stuff (cherry picked from commit 17f068b) # Conflicts: # CHANGELOG.md # StabilityMatrix.Core/Models/Packages/SDWebForge.cs
1 parent 1940b0d commit f6513d4

File tree

11 files changed

+283
-18
lines changed

11 files changed

+283
-18
lines changed

CHANGELOG.md

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,94 @@ and this project adheres to [Semantic Versioning 2.0](https://semver.org/spec/v2
77

88
## v2.13.4
99
### Added
10+
<<<<<<< HEAD
1011
- Added support for RTX 5000-series GPUs in ComfyUI
1112
### Changed
1213
- Upgraded ComfyUI CUDA torch to 12.6
14+
=======
15+
- Added new package - [Stable Diffusion WebUI AMDGPU Forge](https://github.com/lshqqytiger/stable-diffusion-webui-amdgpu-forge)
16+
- Added support for RTX 5000-series GPUs in ComfyUI, Forge, and reForge
17+
- Added "Rebuild .NET Project" command to SwarmUI installs - available via the 3-dots menu -> Package Commands -> Rebuild .NET Project
18+
### Changed
19+
- Upgraded ComfyUI CUDA torch to 12.6
20+
- Upgraded Lykos account connection to use OAuth 2.0 device flow
21+
- (Internal) Updated Avalonia to 11.2.5
22+
>>>>>>> 17f068b3 (Merge pull request #993 from ionite34/fixes-n-stuf)
1323
### Fixed
1424
- Fixed [#1128](https://github.com/LykosAI/StabilityMatrix/issues/1128) - overwriting models when downloading multiple with the same name
1525
- Fixed ROCm torch indexes for ComfyUI & Forge
1626
- Fixed model browser sometimes downloading to `ModelsLora` or `ModelsStableDiffusion` folders instead of the correct folder
1727
- Fixed incorrect Unet folder path for ComfyUI users on Linux/macOS
1828
- Fixed [#1157](https://github.com/LykosAI/StabilityMatrix/issues/1157) - crash when broken symlinks exist in model directories
1929
- Fixed [#1154](https://github.com/LykosAI/StabilityMatrix/issues/1154) - increased width for package name on the package cards
30+
<<<<<<< HEAD
31+
=======
32+
- Fixed ComfyUI-Zluda not being recognized as an option for Inference or SwarmUI
33+
- Fixed SwarmUI showing Python options in the 3-dots menu
34+
- Fixed SD.Next install failures in certain cases when using Zluda
35+
### Supporters
36+
#### Visionaries
37+
- Many thanks to our amazing Visionary-tier Patreon supporters, **Waterclouds**, **TheTekknician**, and **Corey T**! Your unwavering support is very much appreciated!
38+
39+
## v2.14.0-dev.2
40+
### Added
41+
- Added Align Your Steps scheduler to Inference
42+
- Added wildcards to Inference prompts, e.g. `{blue|green|red}` will randomly select one of the colors
43+
- Added Safetensor Metadata viewer to the Checkpoint Manager context menu - thanks to @genteure!
44+
### Changed
45+
- Updated the Civitai Model Browser base model selector to match the new Checkpoint Manager filter UI
46+
- FaceDetailers in Inference will now inherit the primary sampler/scheduler/etc. by default. You can still manually set these by enabling the options via the ⚙️ button on the FaceDetailer card
47+
- Slightly rearranged the FaceDetailer card layout due to the above change
48+
- "Remove symbolic links on shutdown" option now also removes links from Output Sharing
49+
- Inference "Extra Networks" selector now filters extra networks based on the selected base model
50+
- Updated Japanese, Brazilian Portuguese, Chinese, and Russian translations
51+
### Fixed
52+
- Fixed crash when dragging & dropping images in Inference (hopefully)
53+
- Fixed HiresFix Inference addon not inheriting sampler/scheduler properly
54+
- Fixed some plus (+) buttons getting cut off in the Inference UI
55+
- Fixed CFG Rescale addon interfering with refiner model in Inference
56+
- Fixed [#1083](https://github.com/LykosAI/StabilityMatrix/issues/1083) - "Show Nested Models" incorrectly displaying models from some non-nested folders
57+
- Fixed issue with InvokeAI model sharing when the host address is set to 0.0.0.0
58+
- Fixed issue when parsing index URLs in Python Dependencies Override menu
59+
- Fixed ComfyUI-Zluda not respecting pip user overrides
60+
- Fixed issue with Checkpoint Manager not displaying any models
61+
- (dev.2 re-release) Fixed autocomplete not showing in certain cases when using wildcards
62+
- (dev.2 re-release) Fixed package restart button not working
63+
- (dev.2 re-release) Fixed [#1120](https://github.com/LykosAI/StabilityMatrix/issues/1120) - crash when right clicking in the console after restarting a package
64+
### Supporters
65+
#### Visionaries
66+
- A huge thank you to our incredible Visionary-tier Patreon supporters, **Waterclouds**, **TheTekknician**, and our newest Visionary, **Corey**! Your generous support is greatly appreciated!
67+
68+
## v2.14.0-dev.1
69+
### Added
70+
- Added Rescale CFG addon to Inference
71+
- Added Swap Dimensions button between the width/height input in Inference
72+
- Added Ctrl+Tab/Ctrl+Shift+Tab shortcuts for navigating between Inference tabs
73+
- Added OpenModelDB tab to the Model Browser
74+
### Changed
75+
- Improved the quality of Inference inpainting by upgrading the workflow behind the scenes. The workflow remains the same for you — just better results!
76+
- Redesigned the Checkpoint Manager Filter flyout to include more options and improve the layout
77+
- "Clear All" button will now remain at the top of the Downloads list regardless of scroll position - thanks to @Genteure!
78+
- Improved image metadata parsing - thanks to @Genteure!
79+
### Fixed
80+
- Fixed Inference image selector card buttons taking up the whole height of the card
81+
- Fixed Inference mask editor failing to paint to the right-most edge on large images
82+
- Fixed Inference mask editor not showing the entire image in certain circumstances
83+
- Fixed an issue where certain sampler/scheduler combos would not get saved in image metadata - thanks to @yansigit!
84+
- Fixed [#1078](https://github.com/LykosAI/StabilityMatrix/issues/1078) - "Call from invalid thread" error after one-click install finishes
85+
- Fixed [#1080](https://github.com/LykosAI/StabilityMatrix/issues/1080) - Some models not displayed in Checkpoint Manager
86+
### Supporters
87+
#### Visionaries
88+
- Many thanks to our incredible Visionary-tier Patreon supporters, **Waterclouds** and **TheTekknician**! Your support helps us continue to improve Stability Matrix!
89+
90+
## v2.13.4
91+
### Changed
92+
- Upgraded ComfyUI CUDA torch to 12.6
93+
### Fixed
94+
- Fixed [#1128](https://github.com/LykosAI/StabilityMatrix/issues/1128) - overwriting models when downloading multiple with the same name
95+
- Fixed ROCm torch indexes for ComfyUI & Forge
96+
- Fixed model browser sometimes downloading to `ModelsLora` or `ModelsStableDiffusion` folders instead of the correct folder
97+
>>>>>>> 17f068b3 (Merge pull request #993 from ionite34/fixes-n-stuf)
2098
2199
## v2.13.3
22100
### Changed

Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
</PropertyGroup>
99

1010
<PropertyGroup>
11-
<AvaloniaVersion>11.2.2</AvaloniaVersion>
11+
<AvaloniaVersion>11.2.5</AvaloniaVersion>
1212
</PropertyGroup>
1313

1414
<PropertyGroup>

Directory.Packages.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,4 +127,4 @@
127127
<PackageVersion Include="xunit" Version="2.9.0" />
128128
<PackageVersion Include="xunit.runner.visualstudio" Version="2.8.2" />
129129
</ItemGroup>
130-
</Project>
130+
</Project>

StabilityMatrix.Avalonia/ViewModels/Dialogs/InferenceConnectionHelpViewModel.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ RunningPackageService runningPackageService
7070

7171
// Get comfy type installed packages
7272
var comfyPackages = this.settingsManager.Settings.InstalledPackages.Where(
73-
p => p.PackageName == "ComfyUI"
73+
p => p.PackageName is "ComfyUI" or "ComfyUI-Zluda"
7474
)
7575
.ToImmutableArray();
7676

@@ -88,7 +88,7 @@ RunningPackageService runningPackageService
8888
// Use active package if its comfy, otherwise use the first comfy type
8989
if (
9090
this.settingsManager.Settings.ActiveInstalledPackage is
91-
{ PackageName: "ComfyUI" } activePackage
91+
{ PackageName: "ComfyUI" or "ComfyUI-Zluda" } activePackage
9292
)
9393
{
9494
SelectedPackage = activePackage;

StabilityMatrix.Avalonia/ViewModels/PackageManager/PackageCardViewModel.cs

Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,15 @@ RunningPackageService runningPackageService
102102
[ObservableProperty]
103103
private bool dontCheckForUpdates;
104104

105+
[ObservableProperty]
106+
private bool usesVenv;
107+
108+
[ObservableProperty]
109+
[NotifyPropertyChangedFor(nameof(ShowExtraCommands))]
110+
private List<ExtraPackageCommand>? extraCommands;
111+
112+
public bool ShowExtraCommands => ExtraCommands is { Count: > 0 };
113+
105114
private void RunningPackagesOnCollectionChanged(object? sender, NotifyCollectionChangedEventArgs e)
106115
{
107116
if (runningPackageService.RunningPackages.Select(x => x.Value) is not { } runningPackages)
@@ -141,7 +150,7 @@ partial void OnPackageChanged(InstalledPackage? value)
141150
{
142151
IsUnknownPackage = false;
143152

144-
var basePackage = packageFactory[value.PackageName];
153+
var basePackage = packageFactory[value.PackageName!];
145154
CardImageSource = basePackage?.PreviewImageUri ?? Assets.NoImage;
146155
InstalledVersion = value.Version?.DisplayVersion ?? "Unknown";
147156
CanUseConfigMethod =
@@ -152,6 +161,11 @@ partial void OnPackageChanged(InstalledPackage? value)
152161
CanUseSharedOutput = basePackage?.SharedOutputFolders != null;
153162
CanUseExtensions = basePackage?.SupportsExtensions ?? false;
154163
DontCheckForUpdates = Package?.DontCheckForUpdates ?? false;
164+
UsesVenv = basePackage?.UsesVenv ?? true;
165+
166+
// Set the extra commands if available from the package
167+
var packageExtraCommands = basePackage?.GetExtraCommands();
168+
ExtraCommands = packageExtraCommands?.Count > 0 ? packageExtraCommands : null;
155169

156170
runningPackageService.RunningPackages.CollectionChanged += RunningPackagesOnCollectionChanged;
157171
EventManager.Instance.PackageRelaunchRequested += InstanceOnPackageRelaunchRequested;
@@ -787,6 +801,39 @@ private async Task ShowLaunchOptions()
787801
}
788802
}
789803

804+
[RelayCommand]
805+
private async Task ExecuteExtraCommand(string commandName)
806+
{
807+
var command = ExtraCommands?.FirstOrDefault(cmd => cmd.CommandName == commandName);
808+
if (command == null)
809+
return;
810+
811+
Text = $"Executing {commandName}...";
812+
IsIndeterminate = true;
813+
Value = -1;
814+
815+
try
816+
{
817+
await command.Command(Package!);
818+
notificationService.Show("Command executed successfully", commandName, NotificationType.Success);
819+
}
820+
catch (Exception ex)
821+
{
822+
logger.LogError(ex, "Error executing command {CommandName}", commandName);
823+
notificationService.ShowPersistent(
824+
$"Error during {commandName} operation",
825+
ex.Message,
826+
NotificationType.Error
827+
);
828+
}
829+
finally
830+
{
831+
Text = "";
832+
IsIndeterminate = false;
833+
Value = 0;
834+
}
835+
}
836+
790837
private async Task<bool> HasUpdate()
791838
{
792839
if (Package == null || IsUnknownPackage || Design.IsDesignMode || Package.DontCheckForUpdates)

StabilityMatrix.Avalonia/Views/PackageManager/MainPackageManagerView.axaml

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,13 @@
66
xmlns:converters="clr-namespace:StabilityMatrix.Avalonia.Converters"
77
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
88
xmlns:designData="clr-namespace:StabilityMatrix.Avalonia.DesignData"
9+
xmlns:generic="clr-namespace:System.Collections.Generic;assembly=System.Runtime"
910
xmlns:icons="clr-namespace:Projektanker.Icons.Avalonia;assembly=Projektanker.Icons.Avalonia"
11+
xmlns:input="clr-namespace:FluentAvalonia.UI.Input;assembly=FluentAvalonia"
1012
xmlns:lang="clr-namespace:StabilityMatrix.Avalonia.Languages"
1113
xmlns:markupExtensions="clr-namespace:StabilityMatrix.Avalonia.MarkupExtensions"
1214
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
15+
xmlns:models="clr-namespace:StabilityMatrix.Core.Models;assembly=StabilityMatrix.Core"
1316
xmlns:packageManager="clr-namespace:StabilityMatrix.Avalonia.ViewModels.PackageManager"
1417
xmlns:ui="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia"
1518
xmlns:vendorLabs="clr-namespace:StabilityMatrix.Avalonia.Controls.VendorLabs"
@@ -160,15 +163,15 @@
160163
<MenuItem
161164
Command="{Binding OpenPythonPackagesDialogCommand}"
162165
Header="{x:Static lang:Resources.Label_PythonPackages}"
163-
IsVisible="{Binding !IsUnknownPackage}">
166+
IsVisible="{Binding UsesVenv}">
164167
<MenuItem.Icon>
165168
<icons:Icon Value="fa-brands fa-python" />
166169
</MenuItem.Icon>
167170
</MenuItem>
168171
<MenuItem
169172
Command="{Binding OpenPythonDependenciesOverrideDialogCommand}"
170173
Header="{x:Static lang:Resources.Label_PythonDependenciesOverride_Title}"
171-
IsVisible="{Binding !IsUnknownPackage}">
174+
IsVisible="{Binding UsesVenv}">
172175
<MenuItem.Icon>
173176
<icons:Icon Value="fa-solid fa-bandage" />
174177
</MenuItem.Icon>
@@ -268,6 +271,34 @@
268271

269272
<Separator IsVisible="{Binding !IsUnknownPackage}" />
270273

274+
<!-- Package-specific extra commands section -->
275+
<MenuItem
276+
Classes="SubItems"
277+
Header="Package Commands"
278+
IsVisible="{Binding ShowExtraCommands}">
279+
<MenuItem.Resources>
280+
<input:StandardUICommand x:Key="ExecuteExtraCommandCommand" Command="{Binding ExecuteExtraCommandCommand}" />
281+
</MenuItem.Resources>
282+
283+
<MenuItem.Icon>
284+
<icons:Icon Value="fa-solid fa-toolbox" />
285+
</MenuItem.Icon>
286+
287+
<MenuItem.ItemsSource>
288+
<Binding Path="ExtraCommands" />
289+
</MenuItem.ItemsSource>
290+
291+
<MenuItem.Styles>
292+
<Style x:DataType="models:ExtraPackageCommand" Selector="MenuItem.SubItems MenuItem">
293+
<Setter Property="Header" Value="{Binding CommandName}" />
294+
<Setter Property="Command" Value="{StaticResource ExecuteExtraCommandCommand}" />
295+
<Setter Property="CommandParameter" Value="{Binding CommandName}" />
296+
</Style>
297+
</MenuItem.Styles>
298+
</MenuItem>
299+
300+
<Separator IsVisible="{Binding ShowExtraCommands}" />
301+
271302
<MenuItem
272303
Command="{Binding Uninstall}"
273304
Header="{x:Static lang:Resources.Action_Uninstall}"
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
namespace StabilityMatrix.Core.Models;
2+
3+
public class ExtraPackageCommand
4+
{
5+
public required string CommandName { get; set; }
6+
public required Func<InstalledPackage, Task> Command { get; set; }
7+
}

StabilityMatrix.Core/Models/Packages/BasePackage.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,13 @@ public abstract class BasePackage(ISettingsManager settingsManager)
5353
public abstract PackageDifficulty InstallerSortOrder { get; }
5454

5555
public virtual PackageType PackageType => PackageType.SdInference;
56+
public virtual bool UsesVenv => true;
57+
58+
/// <summary>
59+
/// Returns a list of extra commands that can be executed for this package.
60+
/// The function takes an InstalledPackage parameter to operate on a specific installation.
61+
/// </summary>
62+
public virtual List<ExtraPackageCommand> GetExtraCommands() => [];
5663

5764
public abstract Task DownloadPackage(
5865
string installLocation,

StabilityMatrix.Core/Models/Packages/SDWebForge.cs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,10 +146,25 @@ public override async Task InstallPackage(
146146

147147
var pipArgs = new PipInstallArgs("setuptools==69.5.1");
148148

149+
var isBlackwell =
150+
SettingsManager.Settings.PreferredGpu?.IsBlackwellGpu() ?? HardwareHelper.HasBlackwellGpu();
149151
var torchVersion = options.PythonOptions.TorchIndex ?? GetRecommendedTorchVersion();
152+
<<<<<<< HEAD
150153
if (torchVersion is TorchIndex.DirectMl)
151154
{
152155
pipArgs = pipArgs.WithTorchDirectML();
156+
=======
157+
158+
if (isBlackwell && torchVersion is TorchIndex.Cuda)
159+
{
160+
pipArgs = pipArgs
161+
.AddArg(
162+
"https://huggingface.co/w-e-w/torch-2.6.0-cu128.nv/resolve/main/torch-2.6.0%2Bcu128.nv-cp310-cp310-win_amd64.whl"
163+
)
164+
.AddArg(
165+
"https://huggingface.co/w-e-w/torch-2.6.0-cu128.nv/resolve/main/torchvision-0.20.0a0%2Bcu128.nv-cp310-cp310-win_amd64.whl"
166+
);
167+
>>>>>>> 17f068b3 (Merge pull request #993 from ionite34/fixes-n-stuf)
153168
}
154169
else
155170
{

0 commit comments

Comments
 (0)