Skip to content

Commit 4c8aae2

Browse files
committed
2 parents 3aee57d + 26c8f83 commit 4c8aae2

File tree

218 files changed

+17806
-3404
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

218 files changed

+17806
-3404
lines changed

CHANGELOG.md

Lines changed: 180 additions & 0 deletions
Large diffs are not rendered by default.

Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
</PropertyGroup>
1111

1212
<PropertyGroup>
13-
<AvaloniaVersion>11.2.5</AvaloniaVersion>
13+
<AvaloniaVersion>11.3.2</AvaloniaVersion>
1414
</PropertyGroup>
1515

1616
<PropertyGroup>

Directory.Packages.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@
7979
<PackageVersion Include="Sylvan.Data.Csv" Version="1.3.9" />
8080
<PackageVersion Include="System.Drawing.Common" Version="9.0.0" />
8181
<PackageVersion Include="System.IO.Hashing" Version="9.0.0" />
82+
<PackageVersion Include="System.Runtime.Serialization.Formatters" Version="9.0.3" />
8283
<PackageVersion Include="System.Text.Json" Version="9.0.0" />
8384
<PackageVersion Include="System.Private.Uri" Version="4.3.2" Label="CVE-2019-0981" />
8485
<PackageVersion Include="URISchemeTools" Version="1.0.2" />

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ Stability Matrix is now available in the following languages, thanks to our comm
132132
- 🇷🇺 Русский
133133
- aolko
134134
- den1251
135+
- vanja-san
135136
- 🇹🇷 Türkçe
136137
- Progesor
137138
- 🇩🇪 Deutsch
@@ -143,6 +144,10 @@ Stability Matrix is now available in the following languages, thanks to our comm
143144
- thiagojramos
144145
- 🇰🇷 한국어
145146
- maakcode
147+
- 🇺🇦 Українська
148+
- rodtty
149+
- 🇨🇿 Čeština
150+
- PEKArt!
146151

147152
If you would like to contribute a translation, please create an issue or contact us on Discord. Include an email where we'll send an invite to our [POEditor](https://poeditor.com/) project.
148153

StabilityMatrix.Avalonia/App.axaml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@
9999
<StyleInclude Source="Controls/MarkdownViewer.axaml" />
100100
<StyleInclude Source="Controls/Inference/WanModelCard.axaml" />
101101
<StyleInclude Source="Controls/Inference/PlasmaNoiseCard.axaml" />
102+
<StyleInclude Source="Controls/Inference/NrsCard.axaml" />
102103
<labs:ControlThemes />
103104

104105
<Style Selector="DockControl">
@@ -107,5 +108,48 @@
107108
<Style Selector="ScrollViewer">
108109
<Setter Property="BringIntoViewOnFocusChange" Value="False" />
109110
</Style>
111+
112+
<Style Selector="DataValidationErrors">
113+
<Setter Property="Template">
114+
<ControlTemplate>
115+
<DockPanel LastChildFill="True">
116+
<ContentControl
117+
Content="{Binding (DataValidationErrors.Errors)}"
118+
ContentTemplate="{TemplateBinding ErrorTemplate}"
119+
DataContext="{TemplateBinding Owner}"
120+
DockPanel.Dock="Bottom"
121+
IsVisible="{Binding (DataValidationErrors.HasErrors)}" />
122+
<ContentPresenter
123+
Name="PART_ContentPresenter"
124+
Padding="{TemplateBinding Padding}"
125+
Background="{TemplateBinding Background}"
126+
BorderBrush="{TemplateBinding BorderBrush}"
127+
BorderThickness="{TemplateBinding BorderThickness}"
128+
Content="{TemplateBinding Content}"
129+
ContentTemplate="{TemplateBinding ContentTemplate}"
130+
CornerRadius="{TemplateBinding CornerRadius}" />
131+
</DockPanel>
132+
</ControlTemplate>
133+
</Setter>
134+
<Setter Property="ErrorTemplate">
135+
<DataTemplate x:DataType="{x:Type x:Object}">
136+
<StackPanel
137+
Margin="4,8,1,0"
138+
Background="Transparent"
139+
Orientation="Horizontal">
140+
<Path
141+
VerticalAlignment="Center"
142+
Data="M14,7 A7,7 0 0,0 0,7 M0,7 A7,7 0 1,0 14,7 M7,3l0,5 M7,9l0,2"
143+
Stroke="OrangeRed"
144+
StrokeThickness="2" />
145+
<ItemsControl
146+
Margin="4,0,0,0"
147+
VerticalAlignment="Center"
148+
Foreground="OrangeRed"
149+
ItemsSource="{Binding}" />
150+
</StackPanel>
151+
</DataTemplate>
152+
</Setter>
153+
</Style>
110154
</Application.Styles>
111155
</Application>

StabilityMatrix.Avalonia/App.axaml.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363
using StabilityMatrix.Core.Models.Configs;
6464
using StabilityMatrix.Core.Models.FileInterfaces;
6565
using StabilityMatrix.Core.Models.Settings;
66+
using StabilityMatrix.Core.Python;
6667
using StabilityMatrix.Core.Services;
6768
using StabilityMatrix.Core.Updater;
6869
using ApiOptions = StabilityMatrix.Core.Models.Configs.ApiOptions;
@@ -719,6 +720,15 @@ internal static IServiceCollection ConfigureServices(bool disableMessagePipeInte
719720
})
720721
.AddPolicyHandler(retryPolicy);
721722

723+
services
724+
.AddRefitClient<IHuggingFaceApi>(defaultRefitSettings) // Assuming defaultRefitSettings is suitable
725+
.ConfigureHttpClient(c =>
726+
{
727+
c.BaseAddress = new Uri("https://huggingface.co");
728+
c.Timeout = TimeSpan.FromHours(1); // Or a more appropriate timeout like 60 seconds, consistent with retry policy
729+
})
730+
.AddPolicyHandler(retryPolicy); // Assuming retryPolicy is suitable
731+
722732
// Apizr clients
723733
services.AddApizrManagerFor<IOpenModelDbApi, OpenModelDbManager>(options =>
724734
{
80.2 KB
Loading

StabilityMatrix.Avalonia/Assets/hf-packages.json

Lines changed: 92 additions & 1 deletion
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",
@@ -1146,7 +1227,8 @@
11461227
"Files": [
11471228
"ae.safetensors"
11481229
],
1149-
"LicenseType": "Apache 2.0"
1230+
"LicenseType": "Apache 2.0",
1231+
"LoginRequired": true
11501232
},
11511233
{
11521234
"ModelCategory": "Vae",
@@ -1157,6 +1239,15 @@
11571239
],
11581240
"LicenseType": "Apache 2.0"
11591241
},
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+
},
11601251
{
11611252
"ModelCategory": "Vae",
11621253
"ModelName": "HiDream I1 VAE",

StabilityMatrix.Avalonia/Controls/AdvancedImageBox.axaml.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ public ZoomLevelCollection(IEnumerable<int> collection)
163163
5800,
164164
6800,
165165
7800,
166-
8800
166+
8800,
167167
}
168168
);
169169

@@ -426,7 +426,7 @@ public enum SizeModes : byte
426426
/// <summary>
427427
/// The image is stretched to fill as much of the client area of the control as possible, whilst retaining the same aspect ratio for the width and height.
428428
/// </summary>
429-
Fit
429+
Fit,
430430
}
431431

432432
[Flags]
@@ -435,7 +435,7 @@ public enum MouseButtons : byte
435435
None = 0,
436436
LeftButton = 1,
437437
MiddleButton = 2,
438-
RightButton = 4
438+
RightButton = 4,
439439
}
440440

441441
/// <summary>
@@ -462,7 +462,7 @@ public enum ZoomActions : byte
462462
/// <summary>
463463
/// The control zoom was reset.
464464
/// </summary>
465-
ActualSize = 4
465+
ActualSize = 4,
466466
}
467467

468468
public enum SelectionModes
@@ -480,7 +480,7 @@ public enum SelectionModes
480480
/// <summary>
481481
/// Zoom selection.
482482
/// </summary>
483-
Zoom
483+
Zoom,
484484
}
485485

486486
#endregion
@@ -511,7 +511,7 @@ public Vector Offset
511511
}
512512
}
513513

514-
public Size ViewPortSize => ViewPort.Bounds.Size;
514+
public Size ViewPortSize => ViewPort?.Bounds.Size ?? new Size(50, 50);
515515
#endregion
516516

517517
#region Private Members
@@ -1355,13 +1355,13 @@ private void RenderBackgroundGrid(DrawingContext context)
13551355
var square1Drawing = new GeometryDrawing
13561356
{
13571357
Brush = GridColorAlternate,
1358-
Geometry = new RectangleGeometry(new Rect(0.0, 0.0, size, size))
1358+
Geometry = new RectangleGeometry(new Rect(0.0, 0.0, size, size)),
13591359
};
13601360

13611361
var square2Drawing = new GeometryDrawing
13621362
{
13631363
Brush = GridColorAlternate,
1364-
Geometry = new RectangleGeometry(new Rect(size, size, size, size))
1364+
Geometry = new RectangleGeometry(new Rect(size, size, size, size)),
13651365
};
13661366

13671367
var drawingGroup = new DrawingGroup { Children = { square1Drawing, square2Drawing } };

StabilityMatrix.Avalonia/Controls/Inference/FaceDetailerCard.axaml

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,33 @@
133133
DataContext="{Binding SeedCardViewModel}"
134134
IsVisible="{Binding !$parent[StackPanel].((vmInference:FaceDetailerViewModel)DataContext).InheritSeed, TargetNullValue=False, FallbackValue=False}" />
135135

136+
<avalonia:SpacedGrid
137+
Margin="0,8,0,0"
138+
ColumnDefinitions="*, *"
139+
RowDefinitions="Auto, Auto">
140+
<!-- Tiled Encode -->
141+
<TextBlock Margin="4,0,4,0" Text="Tiled Encode" />
142+
<ToggleSwitch
143+
Grid.Row="1"
144+
Grid.Column="0"
145+
Margin="8,-8,4,0"
146+
IsChecked="{Binding UseTiledEncode}" />
147+
148+
<!-- Tiled Decode -->
149+
<TextBlock
150+
Grid.Row="0"
151+
Grid.Column="1"
152+
Margin="4,0,4,0"
153+
VerticalAlignment="Center"
154+
Text="Tiled Decode" />
155+
<ToggleSwitch
156+
Grid.Row="1"
157+
Grid.Column="1"
158+
Margin="8,-8,4,0"
159+
HorizontalAlignment="Stretch"
160+
IsChecked="{Binding UseTiledDecode}" />
161+
</avalonia:SpacedGrid>
162+
136163
<Separator Margin="8,16" Background="#DDDDDD" />
137164

138165
<avalonia:SpacedGrid
@@ -144,7 +171,7 @@
144171
<ToggleSwitch
145172
Grid.Row="1"
146173
Grid.Column="0"
147-
Margin="8,0,4,8"
174+
Margin="8,-8,4,0"
148175
IsChecked="{Binding GuideSizeFor}"
149176
OffContent="Crop Region"
150177
OnContent="BBox" />
@@ -159,7 +186,7 @@
159186
<ToggleSwitch
160187
Grid.Row="1"
161188
Grid.Column="1"
162-
Margin="8,0,4,0"
189+
Margin="8,-8,4,0"
163190
HorizontalAlignment="Stretch"
164191
IsChecked="{Binding ForceInpaint}" />
165192
</avalonia:SpacedGrid>
@@ -440,6 +467,9 @@
440467

441468
<!-- Positive Prompt -->
442469
<controls:PromptCard DataContext="{Binding PromptCardViewModel}" IsVisible="{Binding $parent[StackPanel].((vmInference:FaceDetailerViewModel)DataContext).UseSeparatePrompt, TargetNullValue=False, FallbackValue=False}" />
470+
471+
<TextBlock Margin="4,8,4,4" Text="{x:Static lang:Resources.Label_Wildcards}" />
472+
<controls:PromptCard Margin="0,8,0,0" DataContext="{Binding WildcardViewModel}" />
443473
</StackPanel>
444474
</ControlTemplate>
445475
</Setter>

0 commit comments

Comments
 (0)