Skip to content

Commit 25d648b

Browse files
authored
Merge pull request LykosAI#1030 from LykosAI/main
v2.12.4
2 parents 2973228 + 5f6d792 commit 25d648b

Some content is hidden

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

50 files changed

+807
-220
lines changed

CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,25 @@ All notable changes to Stability Matrix will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning 2.0](https://semver.org/spec/v2.0.0.html).
77

8+
## v2.12.4
9+
### Added
10+
- Added new package - [CogVideo](https://github.com/THUDM/CogVideo) - many thanks to @NullDev for the contribution!
11+
- Added more formatting options for Inference output filenames - thanks to @yansigit!
12+
### Changed
13+
- Model browser base model types are now loaded dynamically from CivitAI, reducing the need for updates to add new types
14+
### Fixed
15+
- Fixed crash when clicking "Remind me Later" on the update dialog
16+
- Fixed some cases of crashing when GitHub API rate limits are exceeded
17+
- Fixed Git missing from env vars when running SwarmUI
18+
- Fixed missing package thumbnails due to moved or inaccessible urls
19+
- Fixed an issue with updating FluxGym in certain cases - thanks to @NullDev!
20+
- Fixed a typo in the Japanese translation - thanks to @mattyatea!
21+
### Supporters
22+
#### Visionaries
23+
- A huge thank you to our dedicated Visionary-tier Patreon supporter, **Waterclouds**! We’re thrilled to have your ongoing support!
24+
#### Pioneers
25+
- Shoutout to our great Pioneer-tier patrons: **tankfox**, **tanangular**, **Mr. Unknown**, **Szir777**, and our newest Pioneer, **Tigon**!. Your continued support is greatly appreciated!
26+
827
## v2.12.3
928
### Added
1029
- Added new package - [SimpleSDXL](https://github.com/metercai/SimpleSDXL) - many thanks to @NullDev for the contribution!

Directory.Build.props

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,10 @@
22
<PropertyGroup>
33
<AvaloniaVersion>11.1.4</AvaloniaVersion>
44
</PropertyGroup>
5+
6+
<PropertyGroup>
7+
<!--Some bug with SDK 8.0.403
8+
https://github.com/dotnet/sdk/issues/44026-->
9+
<NoWarn>$(NoWarn);CsWinRT1028</NoWarn>
10+
</PropertyGroup>
511
</Project>

StabilityMatrix.Avalonia/Behaviors/TextEditorToolTipBehavior.cs

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
using System;
22
using System.Diagnostics.CodeAnalysis;
33
using System.Linq;
4+
using System.Reactive.Linq;
5+
using System.Threading;
46
using Avalonia;
57
using Avalonia.Controls;
68
using Avalonia.Input;
@@ -29,9 +31,7 @@ public class TextEditorToolTipBehavior : Behavior<TextEditor>
2931
private ToolTip? toolTip;
3032

3133
public static readonly StyledProperty<ITokenizerProvider?> TokenizerProviderProperty =
32-
AvaloniaProperty.Register<TextEditorCompletionBehavior, ITokenizerProvider?>(
33-
"TokenizerProvider"
34-
);
34+
AvaloniaProperty.Register<TextEditorCompletionBehavior, ITokenizerProvider?>("TokenizerProvider");
3535

3636
public ITokenizerProvider? TokenizerProvider
3737
{
@@ -137,6 +137,7 @@ private void TextEditor_OnPointerHover(object? sender, PointerEventArgs e)
137137

138138
toolTip
139139
.GetPropertyChangedObservable(ToolTip.IsOpenProperty)
140+
.ObserveOn(SynchronizationContext.Current)
140141
.Subscribe(c =>
141142
{
142143
if (c.NewValue as bool? != true)
@@ -159,10 +160,7 @@ private void TextEditor_OnPointerHover(object? sender, PointerEventArgs e)
159160
private ToolTipData? GetCaretToolTipData(TextViewPosition position)
160161
{
161162
var logicalPosition = position.Location;
162-
var pointerOffset = textEditor.Document.GetOffset(
163-
logicalPosition.Line,
164-
logicalPosition.Column
165-
);
163+
var pointerOffset = textEditor.Document.GetOffset(logicalPosition.Line, logicalPosition.Column);
166164

167165
var line = textEditor.Document.GetLineByOffset(pointerOffset);
168166
var lineText = textEditor.Document.GetText(line.Offset, line.Length);
@@ -227,10 +225,7 @@ private void TextEditor_OnPointerHover(object? sender, PointerEventArgs e)
227225
if (result.Tokens.ElementAtOrDefault(currentTokenIndex + tokenOffset) is { } token)
228226
{
229227
// Check supported scopes
230-
if (
231-
token.Scopes.Where(s => s.Contains("invalid")).ToArray() is
232-
{ Length: > 0 } results
233-
)
228+
if (token.Scopes.Where(s => s.Contains("invalid")).ToArray() is { Length: > 0 } results)
234229
{
235230
// Special cases
236231
if (results.Contains("invalid.illegal.mismatched.parenthesis.closing.prompt"))

StabilityMatrix.Avalonia/Collections/SearchCollection.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
using System.Reactive;
44
using System.Reactive.Disposables;
55
using System.Reactive.Linq;
6+
using System.Threading;
67
using DynamicData;
78
using DynamicData.Binding;
89
using JetBrains.Annotations;
@@ -72,6 +73,7 @@ public SearchCollection(
7273
.Filter(dynamicPredicate)
7374
.Sort(SortComparer)
7475
.Bind(FilteredItems)
76+
.ObserveOn(SynchronizationContext.Current)
7577
.Subscribe();
7678
}
7779

@@ -114,6 +116,7 @@ public SearchCollection(
114116
.Sort(SearchItemSortComparer, SortOptimisations.ComparesImmutableValuesOnly)
115117
.Transform(searchItem => searchItem.Item)
116118
.Bind(FilteredItems)
119+
.ObserveOn(SynchronizationContext.Current)
117120
.Subscribe()
118121
);
119122
}

StabilityMatrix.Avalonia/Controls/BetterComboBox.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
using System.Linq;
33
using System.Reactive.Linq;
44
using System.Reactive.Subjects;
5+
using System.Threading;
56
using Avalonia;
67
using Avalonia.Controls;
78
using Avalonia.Controls.Presenters;
@@ -48,7 +49,9 @@ public BetterComboBox()
4849
.Select(_ => currentInput);
4950

5051
// Subscribe to the observable to filter the ComboBox items
51-
subscription = inputObservable.Subscribe(OnInputReceived, _ => ResetPopupText());
52+
subscription = inputObservable
53+
.ObserveOn(SynchronizationContext.Current)
54+
.Subscribe(OnInputReceived, _ => ResetPopupText());
5255

5356
// Initialize the popup
5457
inputPopup = new Popup
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
using Markdown.Avalonia;
2+
using StabilityMatrix.Avalonia.Styles.Markdown;
3+
4+
namespace StabilityMatrix.Avalonia.Controls;
5+
6+
/// <summary>
7+
/// Fix MarkdownScrollViewer IBrush errors and not working with Avalonia 11.2.0
8+
/// </summary>
9+
public class BetterMarkdownScrollViewer : MarkdownScrollViewer
10+
{
11+
public BetterMarkdownScrollViewer()
12+
{
13+
MarkdownStyleName = "Empty";
14+
MarkdownStyle = new MarkdownStyleFluentAvalonia();
15+
}
16+
}

StabilityMatrix.Avalonia/Controls/Inference/SelectImageCard.axaml.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
using System;
2+
using System.Reactive.Linq;
3+
using System.Threading;
24
using Avalonia.Controls;
35
using Avalonia.Controls.Primitives;
46
using DynamicData.Binding;
@@ -24,6 +26,7 @@ protected override void OnApplyTemplate(TemplateAppliedEventArgs e)
2426

2527
imageControl
2628
.WhenPropertyChanged(x => x.CurrentImage)
29+
.ObserveOn(SynchronizationContext.Current)
2730
.Subscribe(propertyValue =>
2831
{
2932
if (propertyValue.Value is { } image)

StabilityMatrix.Avalonia/Controls/Painting/PaintCanvas.axaml.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
using System.Collections.Immutable;
44
using System.Diagnostics;
55
using System.Linq;
6+
using System.Reactive.Linq;
7+
using System.Threading;
68
using System.Threading.Tasks;
79
using Avalonia;
810
using Avalonia.Controls;
@@ -108,6 +110,7 @@ protected override void OnDataContextChanged(EventArgs e)
108110
viewModelSubscription?.Dispose();
109111
viewModelSubscription = viewModel
110112
.WhenPropertyChanged(vm => vm.CanvasSize)
113+
.ObserveOn(SynchronizationContext.Current)
111114
.Subscribe(change =>
112115
{
113116
if (MainCanvas is not null && !change.Value.IsEmpty)

StabilityMatrix.Avalonia/DialogHelper.cs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,11 @@ public static BetterContentDialog CreateTextEntryDialog(
8181
IReadOnlyList<TextBoxField> textFields
8282
)
8383
{
84-
return CreateTextEntryDialog(title, new MarkdownScrollViewer { Markdown = description }, textFields);
84+
return CreateTextEntryDialog(
85+
title,
86+
new BetterMarkdownScrollViewer { Markdown = description },
87+
textFields
88+
);
8589
}
8690

8791
/// <summary>
@@ -94,7 +98,7 @@ public static BetterContentDialog CreateTextEntryDialog(
9498
IReadOnlyList<TextBoxField> textFields
9599
)
96100
{
97-
var markdown = new MarkdownScrollViewer { Markdown = description };
101+
var markdown = new BetterMarkdownScrollViewer { Markdown = description };
98102
var image = new BetterAdvancedImage((Uri?)null)
99103
{
100104
Source = imageSource,
@@ -235,7 +239,7 @@ public static BetterContentDialog CreateMarkdownDialog(
235239
{
236240
Dispatcher.UIThread.VerifyAccess();
237241

238-
var viewer = new MarkdownScrollViewer { Markdown = markdown };
242+
var viewer = new BetterMarkdownScrollViewer { Markdown = markdown };
239243

240244
// Apply syntax highlighting to code blocks if preset is provided
241245
if (editorPreset != default)

StabilityMatrix.Avalonia/Services/InferenceClientManager.cs

Lines changed: 34 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
using System.Diagnostics.CodeAnalysis;
44
using System.IO;
55
using System.Linq;
6+
using System.Reactive.Linq;
67
using System.Threading;
78
using System.Threading.Tasks;
89
using AsyncAwaitBestPractices;
@@ -164,6 +165,7 @@ ICompletionProvider completionProvider
164165
)
165166
.DeferUntilLoaded()
166167
.Bind(Models)
168+
.ObserveOn(SynchronizationContext.Current)
167169
.Subscribe();
168170

169171
controlNetModelsSource
@@ -176,6 +178,7 @@ ICompletionProvider completionProvider
176178
)
177179
.DeferUntilLoaded()
178180
.Bind(ControlNetModels)
181+
.ObserveOn(SynchronizationContext.Current)
179182
.Subscribe();
180183

181184
loraModelsSource
@@ -185,6 +188,7 @@ ICompletionProvider completionProvider
185188
LoraModels,
186189
SortExpressionComparer<HybridModelFile>.Ascending(f => f.Type).ThenByAscending(f => f.SortKey)
187190
)
191+
.ObserveOn(SynchronizationContext.Current)
188192
.Subscribe();
189193

190194
promptExpansionModelsSource
@@ -197,6 +201,7 @@ ICompletionProvider completionProvider
197201
)
198202
.DeferUntilLoaded()
199203
.Bind(PromptExpansionModels)
204+
.ObserveOn(SynchronizationContext.Current)
200205
.Subscribe();
201206

202207
ultralyticsModelsSource
@@ -209,6 +214,7 @@ ICompletionProvider completionProvider
209214
)
210215
.DeferUntilLoaded()
211216
.Bind(UltralyticsModels)
217+
.ObserveOn(SynchronizationContext.Current)
212218
.Subscribe();
213219

214220
samModelsSource
@@ -221,6 +227,7 @@ ICompletionProvider completionProvider
221227
)
222228
.DeferUntilLoaded()
223229
.Bind(SamModels)
230+
.ObserveOn(SynchronizationContext.Current)
224231
.Subscribe();
225232

226233
unetModelsSource
@@ -232,6 +239,7 @@ ICompletionProvider completionProvider
232239
)
233240
.DeferUntilLoaded()
234241
.Bind(UnetModels)
242+
.ObserveOn(SynchronizationContext.Current)
235243
.Subscribe();
236244

237245
clipModelsSource
@@ -244,25 +252,47 @@ ICompletionProvider completionProvider
244252
)
245253
.DeferUntilLoaded()
246254
.Bind(ClipModels)
255+
.ObserveOn(SynchronizationContext.Current)
247256
.Subscribe();
248257

249258
vaeModelsDefaults.AddOrUpdate(HybridModelFile.Default);
250259

251-
vaeModelsDefaults.Connect().Or(vaeModelsSource.Connect()).Bind(VaeModels).Subscribe();
260+
vaeModelsDefaults
261+
.Connect()
262+
.Or(vaeModelsSource.Connect())
263+
.Bind(VaeModels)
264+
.ObserveOn(SynchronizationContext.Current)
265+
.Subscribe();
252266

253-
samplersSource.Connect().DeferUntilLoaded().Bind(Samplers).Subscribe();
267+
samplersSource
268+
.Connect()
269+
.DeferUntilLoaded()
270+
.Bind(Samplers)
271+
.ObserveOn(SynchronizationContext.Current)
272+
.Subscribe();
254273

255274
latentUpscalersSource
256275
.Connect()
257276
.Or(modelUpscalersSource.Connect())
258277
.Or(downloadableUpscalersSource.Connect())
259278
.Sort(SortExpressionComparer<ComfyUpscaler>.Ascending(f => f.Type).ThenByAscending(f => f.Name))
260279
.Bind(Upscalers)
280+
.ObserveOn(SynchronizationContext.Current)
261281
.Subscribe();
262282

263-
schedulersSource.Connect().DeferUntilLoaded().Bind(Schedulers).Subscribe();
283+
schedulersSource
284+
.Connect()
285+
.DeferUntilLoaded()
286+
.Bind(Schedulers)
287+
.ObserveOn(SynchronizationContext.Current)
288+
.Subscribe();
264289

265-
preprocessorsSource.Connect().DeferUntilLoaded().Bind(Preprocessors).Subscribe();
290+
preprocessorsSource
291+
.Connect()
292+
.DeferUntilLoaded()
293+
.Bind(Preprocessors)
294+
.ObserveOn(SynchronizationContext.Current)
295+
.Subscribe();
266296

267297
settingsManager.RegisterOnLibraryDirSet(_ =>
268298
{

0 commit comments

Comments
 (0)