Skip to content

Commit cdb1893

Browse files
authored
Merge pull request #1128 from ionite34/delete-by-committee
New delete dialog and added wan2.2 models to HF page
2 parents 35f550c + dac0bf3 commit cdb1893

File tree

6 files changed

+271
-58
lines changed

6 files changed

+271
-58
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,11 @@ and this project adheres to [Semantic Versioning 2.0](https://semver.org/spec/v2
1212
- Added Next and Previous buttons to the Civitai details page to navigate between results
1313
- Added Negative Rejection Steering (NRS) by @reithan to Inference
1414
- Added Czech translation thanks to @PEKArt!
15+
- Added Wan 2.2 models to the HuggingFace tab of the model browser
1516
### Changed
1617
- Brought back the "size remaining after download" tooltip in the new Civitai details page
1718
- Updated ComfyUI installs for AMD users on Linux to use the latest rocm6.4 torch index
19+
- Updated package delete confirmation dialog
1820
### Fixed
1921
- Fixed Inference custom step (e.g. HiresFix) Samplers potentially sharing state with other card UIs like model browser.
2022
- Fixed extension manager failing to install extensions due to incorrect clone directory

StabilityMatrix.Avalonia/Assets/hf-packages.json

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1085,6 +1085,87 @@
10851085
],
10861086
"LicenseType": "Apache 2.0"
10871087
},
1088+
{
1089+
"ModelCategory": "Unet",
1090+
"ModelName": "Wan 2.2 TI2V 5B fp16",
1091+
"RepositoryPath": "Comfy-Org/Wan_2.2_ComfyUI_Repackaged",
1092+
"Files": [
1093+
"split_files/diffusion_models/wan2.2_ti2v_5B_fp16.safetensors"
1094+
],
1095+
"LicenseType": "Apache 2.0"
1096+
},
1097+
{
1098+
"ModelCategory": "Unet",
1099+
"ModelName": "Wan 2.2 I2V High Noise 14B fp16",
1100+
"RepositoryPath": "Comfy-Org/Wan_2.2_ComfyUI_Repackaged",
1101+
"Files": [
1102+
"split_files/diffusion_models/wan2.2_i2v_high_noise_14B_fp16.safetensors"
1103+
],
1104+
"LicenseType": "Apache 2.0"
1105+
},
1106+
{
1107+
"ModelCategory": "Unet",
1108+
"ModelName": "Wan 2.2 I2V High Noise 14B fp8",
1109+
"RepositoryPath": "Comfy-Org/Wan_2.2_ComfyUI_Repackaged",
1110+
"Files": [
1111+
"split_files/diffusion_models/wan2.2_i2v_high_noise_14B_fp8_scaled.safetensors"
1112+
],
1113+
"LicenseType": "Apache 2.0"
1114+
},
1115+
{
1116+
"ModelCategory": "Unet",
1117+
"ModelName": "Wan 2.2 I2V Low Noise 14B fp16",
1118+
"RepositoryPath": "Comfy-Org/Wan_2.2_ComfyUI_Repackaged",
1119+
"Files": [
1120+
"split_files/diffusion_models/wan2.2_i2v_low_noise_14B_fp16.safetensors"
1121+
],
1122+
"LicenseType": "Apache 2.0"
1123+
},
1124+
{
1125+
"ModelCategory": "Unet",
1126+
"ModelName": "Wan 2.2 I2V Low Noise 14B fp8",
1127+
"RepositoryPath": "Comfy-Org/Wan_2.2_ComfyUI_Repackaged",
1128+
"Files": [
1129+
"split_files/diffusion_models/wan2.2_i2v_low_noise_14B_fp8_scaled.safetensors"
1130+
],
1131+
"LicenseType": "Apache 2.0"
1132+
},
1133+
{
1134+
"ModelCategory": "Unet",
1135+
"ModelName": "Wan 2.2 T2V High Noise 14B fp16",
1136+
"RepositoryPath": "Comfy-Org/Wan_2.2_ComfyUI_Repackaged",
1137+
"Files": [
1138+
"split_files/diffusion_models/wan2.2_t2v_high_noise_14B_fp16.safetensors"
1139+
],
1140+
"LicenseType": "Apache 2.0"
1141+
},
1142+
{
1143+
"ModelCategory": "Unet",
1144+
"ModelName": "Wan 2.2 T2V High Noise 14B fp8",
1145+
"RepositoryPath": "Comfy-Org/Wan_2.2_ComfyUI_Repackaged",
1146+
"Files": [
1147+
"split_files/diffusion_models/wan2.2_t2v_high_noise_14B_fp8_scaled.safetensors"
1148+
],
1149+
"LicenseType": "Apache 2.0"
1150+
},
1151+
{
1152+
"ModelCategory": "Unet",
1153+
"ModelName": "Wan 2.2 T2V Low Noise 14B fp16",
1154+
"RepositoryPath": "Comfy-Org/Wan_2.2_ComfyUI_Repackaged",
1155+
"Files": [
1156+
"split_files/diffusion_models/wan2.2_t2v_low_noise_14B_fp16.safetensors"
1157+
],
1158+
"LicenseType": "Apache 2.0"
1159+
},
1160+
{
1161+
"ModelCategory": "Unet",
1162+
"ModelName": "Wan 2.2 T2V Low Noise 14B fp8",
1163+
"RepositoryPath": "Comfy-Org/Wan_2.2_ComfyUI_Repackaged",
1164+
"Files": [
1165+
"split_files/diffusion_models/wan2.2_t2v_low_noise_14B_fp8_scaled.safetensors"
1166+
],
1167+
"LicenseType": "Apache 2.0"
1168+
},
10881169
{
10891170
"ModelCategory": "Unet",
10901171
"ModelName": "HiDream I1 Dev bf16",
@@ -1158,6 +1239,15 @@
11581239
],
11591240
"LicenseType": "Apache 2.0"
11601241
},
1242+
{
1243+
"ModelCategory": "Vae",
1244+
"ModelName": "Wan 2.2 VAE",
1245+
"RepositoryPath": "Comfy-Org/Wan_2.2_ComfyUI_Repackaged",
1246+
"Files": [
1247+
"split_files/vae/wan2.2_vae.safetensors"
1248+
],
1249+
"LicenseType": "Apache 2.0"
1250+
},
11611251
{
11621252
"ModelCategory": "Vae",
11631253
"ModelName": "HiDream I1 VAE",

StabilityMatrix.Avalonia/DesignData/DesignData.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1134,6 +1134,16 @@ public static UpdateSettingsViewModel UpdateSettingsViewModel
11341134
public static ExtraNetworkCardViewModel ExtraNetworkCardViewModel =>
11351135
DialogFactory.Get<ExtraNetworkCardViewModel>();
11361136

1137+
public static ConfirmPackageDeleteDialogViewModel ConfirmPackageDeleteDialogViewModel =>
1138+
DialogFactory.Get<ConfirmPackageDeleteDialogViewModel>(vm =>
1139+
vm.Package = new InstalledPackage
1140+
{
1141+
PackageName = "a1111",
1142+
DisplayName = "Automatic1111 WebUI",
1143+
LibraryPath = "packages\\a1111",
1144+
}
1145+
);
1146+
11371147
public static InstalledWorkflowsViewModel InstalledWorkflowsViewModel
11381148
{
11391149
get
Lines changed: 36 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
using System;
2-
using CommunityToolkit.Mvvm.ComponentModel;
1+
using CommunityToolkit.Mvvm.ComponentModel;
2+
using CommunityToolkit.Mvvm.Input;
33
using Injectio.Attributes;
44
using StabilityMatrix.Avalonia.ViewModels.Base;
55
using StabilityMatrix.Avalonia.Views.Dialogs;
66
using StabilityMatrix.Core.Attributes;
7+
using StabilityMatrix.Core.Models;
78

89
namespace StabilityMatrix.Avalonia.ViewModels.Dialogs;
910

@@ -12,11 +13,41 @@ namespace StabilityMatrix.Avalonia.ViewModels.Dialogs;
1213
[RegisterTransient<ConfirmPackageDeleteDialogViewModel>]
1314
public partial class ConfirmPackageDeleteDialogViewModel : ContentDialogViewModelBase
1415
{
15-
public required string ExpectedPackageName { get; set; }
16+
[ObservableProperty]
17+
[NotifyPropertyChangedFor(nameof(IsValid), nameof(ExpectedPackageName))]
18+
public required partial InstalledPackage Package { get; set; }
1619

1720
[ObservableProperty]
1821
[NotifyPropertyChangedFor(nameof(IsValid))]
19-
private string packageName = string.Empty;
22+
public partial string PackageName { get; set; } = string.Empty;
23+
24+
public string? ExpectedPackageName => Package.DisplayName;
25+
public bool IsValid => ExpectedPackageName?.Equals(PackageName, StringComparison.Ordinal) ?? false;
26+
public string DeleteWarningText
27+
{
28+
get
29+
{
30+
var items = new List<string>
31+
{
32+
$"• The {ExpectedPackageName} application",
33+
$"• {(Package.PackageName == "ComfyUI" ? "Custom nodes" : "Extensions")}",
34+
};
35+
36+
if (!Package.UseSharedOutputFolder)
37+
items.Add("• Images/outputs");
38+
39+
if (Package.PreferredSharedFolderMethod is SharedFolderMethod.None)
40+
items.Add("• Models/checkpoints placed in the package's model folders");
41+
42+
items.Add("• Any custom files in the package folder");
43+
44+
return string.Join(Environment.NewLine, items);
45+
}
46+
}
2047

21-
public bool IsValid => ExpectedPackageName.Equals(PackageName, StringComparison.Ordinal);
48+
[RelayCommand]
49+
private async Task CopyExpectedPackageName()
50+
{
51+
await App.Clipboard?.SetTextAsync(ExpectedPackageName);
52+
}
2253
}

StabilityMatrix.Avalonia/ViewModels/PackageManager/PackageCardViewModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ public async Task Uninstall()
372372

373373
var dialogViewModel = vmFactory.Get<ConfirmPackageDeleteDialogViewModel>(vm =>
374374
{
375-
vm.ExpectedPackageName = Package?.DisplayName;
375+
vm.Package = Package;
376376
});
377377

378378
var dialog = new BetterContentDialog
Lines changed: 132 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,135 @@
1-
<controls:UserControlBase xmlns="https://github.com/avaloniaui"
2-
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3-
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
4-
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
5-
xmlns:controls="clr-namespace:StabilityMatrix.Avalonia.Controls"
6-
xmlns:lang="clr-namespace:StabilityMatrix.Avalonia.Languages"
7-
xmlns:dialogs="clr-namespace:StabilityMatrix.Avalonia.ViewModels.Dialogs"
8-
xmlns:controls1="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia"
9-
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
10-
x:DataType="dialogs:ConfirmPackageDeleteDialogViewModel"
11-
x:Class="StabilityMatrix.Avalonia.Views.Dialogs.ConfirmPackageDeleteDialog">
12-
<Grid RowDefinitions="Auto, Auto, Auto, Auto, *"
13-
Margin="8">
14-
<TextBlock Text="{x:Static lang:Resources.Text_PackageUninstall_Details}"
15-
FontWeight="Bold"
16-
FontSize="20"
17-
TextAlignment="Center"
18-
TextWrapping="Wrap"/>
19-
<TextBlock Grid.Row="1"
20-
Margin="0,32,0,8"
21-
TextAlignment="Center">
22-
<Run Text="Please type"/>
23-
<Run FontWeight="Bold" Text="{Binding ExpectedPackageName}"/>
24-
<Run Text="to confirm the deletion of the package:"/>
25-
</TextBlock>
26-
27-
<TextBox Grid.Row="2"
28-
Text="{Binding PackageName, Mode=TwoWay}"
29-
Margin="0,16,0,0"/>
30-
31-
<controls1:InfoBar Grid.Row="3"
32-
Margin="0,16,0,0"
33-
IsClosable="False"
34-
IsOpen="True"
35-
Title="{x:Static lang:Resources.Label_ActionCannotBeUndone}"
36-
Severity="Warning"/>
37-
38-
<UniformGrid Grid.Row="4" HorizontalAlignment="Stretch"
39-
VerticalAlignment="Bottom"
40-
Margin="0,32,0,0">
41-
<Button Content="{x:Static lang:Resources.Action_Delete}"
42-
Classes="danger"
43-
IsEnabled="{Binding IsValid}"
44-
HorizontalAlignment="Stretch"
45-
Margin="0,0,4,0"
46-
Command="{Binding OnPrimaryButtonClick}"
47-
FontSize="16"/>
48-
<Button Content="{x:Static lang:Resources.Action_Cancel}"
49-
Command="{Binding OnCloseButtonClick}"
50-
Margin="4,0,0,0"
51-
HorizontalAlignment="Stretch"
52-
FontSize="16"/>
1+
<controls:UserControlBase
2+
x:Class="StabilityMatrix.Avalonia.Views.Dialogs.ConfirmPackageDeleteDialog"
3+
xmlns="https://github.com/avaloniaui"
4+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
5+
xmlns:avalonia="https://github.com/projektanker/icons.avalonia"
6+
xmlns:controls="clr-namespace:StabilityMatrix.Avalonia.Controls"
7+
xmlns:controls1="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia"
8+
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
9+
xmlns:designData="clr-namespace:StabilityMatrix.Avalonia.DesignData"
10+
xmlns:dialogs="clr-namespace:StabilityMatrix.Avalonia.ViewModels.Dialogs"
11+
xmlns:lang="clr-namespace:StabilityMatrix.Avalonia.Languages"
12+
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
13+
d:DataContext="{x:Static designData:DesignData.ConfirmPackageDeleteDialogViewModel}"
14+
d:DesignHeight="650"
15+
d:DesignWidth="800"
16+
x:DataType="dialogs:ConfirmPackageDeleteDialogViewModel"
17+
mc:Ignorable="d">
18+
<Grid Margin="8" RowDefinitions="Auto, Auto, Auto, Auto, Auto, Auto, Auto, Auto, *">
19+
<StackPanel
20+
Grid.Row="0"
21+
Margin="0,4,0,0"
22+
HorizontalAlignment="Center"
23+
Orientation="Horizontal">
24+
<avalonia:Icon
25+
Margin="0,0,-4,0"
26+
FontSize="18"
27+
Value="fa-solid fa-wind">
28+
<avalonia:Icon.RenderTransform>
29+
<ScaleTransform ScaleX="-1" />
30+
</avalonia:Icon.RenderTransform>
31+
</avalonia:Icon>
32+
<avalonia:Icon FontSize="32" Value="fa-solid fa-dolly" />
33+
</StackPanel>
34+
35+
<TextBlock
36+
Grid.Row="1"
37+
Margin="0,4,0,0"
38+
FontSize="24"
39+
Text="{Binding ExpectedPackageName, StringFormat={}Delete {0}?}"
40+
TextAlignment="Center" />
41+
42+
<TextBlock
43+
Grid.Row="2"
44+
Margin="0,4,0,0"
45+
Foreground="{DynamicResource TextFillColorSecondaryBrush}"
46+
Text="{Binding Package.FullPath}"
47+
TextAlignment="Center" />
48+
49+
<controls1:InfoBar
50+
Title="{x:Static lang:Resources.Label_ActionCannotBeUndone}"
51+
Grid.Row="3"
52+
Margin="0,16,0,0"
53+
IsClosable="False"
54+
IsOpen="True"
55+
Severity="Warning" />
56+
57+
<TextBlock
58+
Grid.Row="4"
59+
Margin="0,16,0,8"
60+
VerticalAlignment="Center"
61+
FontSize="16"
62+
FontWeight="Bold"
63+
Foreground="{DynamicResource ThemeCoralRedColor}"
64+
Text="This will permanently delete the following:"
65+
TextWrapping="Wrap" />
66+
67+
<TextBlock
68+
Grid.Row="5"
69+
Margin="0,0,0,8"
70+
VerticalAlignment="Center"
71+
FontSize="16"
72+
Foreground="{DynamicResource TextFillColorSecondaryBrush}"
73+
Text="{Binding DeleteWarningText}"
74+
TextWrapping="Wrap" />
75+
76+
<StackPanel
77+
Grid.Row="6"
78+
Margin="0,32,0,4"
79+
HorizontalAlignment="Center"
80+
Orientation="Horizontal"
81+
Spacing="0">
82+
<TextBlock
83+
FontSize="16"
84+
Text="To confirm, please type &quot;"
85+
TextAlignment="Center" />
86+
<TextBlock
87+
Cursor="Hand"
88+
FontSize="16"
89+
Text="{Binding ExpectedPackageName}"
90+
TextAlignment="Center"
91+
ToolTip.Tip="Click to copy">
92+
<Interaction.Behaviors>
93+
<EventTriggerBehavior EventName="PointerPressed">
94+
<InvokeCommandAction Command="{Binding CopyExpectedPackageNameCommand}" />
95+
</EventTriggerBehavior>
96+
</Interaction.Behaviors>
97+
<TextBlock.Styles>
98+
<Style Selector="TextBlock:pointerover">
99+
<Setter Property="Foreground" Value="{DynamicResource TextFillColorSecondaryBrush}" />
100+
</Style>
101+
</TextBlock.Styles>
102+
</TextBlock>
103+
<TextBlock
104+
FontSize="16"
105+
Text="&quot; in the box below:"
106+
TextAlignment="Center" />
107+
</StackPanel>
108+
109+
<TextBox
110+
Grid.Row="7"
111+
Margin="0,8,0,0"
112+
Text="{Binding PackageName, Mode=TwoWay}" />
113+
114+
<UniformGrid
115+
Grid.Row="8"
116+
Margin="0,32,0,0"
117+
HorizontalAlignment="Stretch"
118+
VerticalAlignment="Bottom">
119+
<Button
120+
Margin="0,0,4,0"
121+
HorizontalAlignment="Stretch"
122+
Classes="danger"
123+
Command="{Binding OnPrimaryButtonClick}"
124+
Content="{x:Static lang:Resources.Action_Delete}"
125+
FontSize="16"
126+
IsEnabled="{Binding IsValid}" />
127+
<Button
128+
Margin="4,0,0,0"
129+
HorizontalAlignment="Stretch"
130+
Command="{Binding OnCloseButtonClick}"
131+
Content="{x:Static lang:Resources.Action_Cancel}"
132+
FontSize="16" />
53133
</UniformGrid>
54134
</Grid>
55135
</controls:UserControlBase>

0 commit comments

Comments
 (0)