Skip to content

Commit 6dfe649

Browse files
authored
Merge branch 'dev' into downmerge
2 parents b22ec12 + 97f4d27 commit 6dfe649

134 files changed

Lines changed: 3105 additions & 507 deletions

File tree

Some content is hidden

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

.github/workflows/backport.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ jobs:
2727
"commitConflicts": "true",
2828
"prTitle": "[{{sourceBranch}} to {{targetBranch}}] backport: {{sourcePullRequest.title}} ({{sourcePullRequest.number}})"
2929
}
30-
30+
3131
- name: Backport Action
32-
uses: sorenlouv/backport-github-action@v9.3.0
32+
uses: sorenlouv/backport-github-action@v9.5.1
3333
with:
3434
github_token: ${{ secrets.GITHUB_TOKEN }}
3535
auto_backport_label_prefix: backport-to-

.husky/pre-commit

100644100755
File mode changed.

Avalonia.Gif/Avalonia.Gif.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
</PropertyGroup>
1212
<ItemGroup>
1313
<PackageReference Include="Avalonia" Version="$(AvaloniaVersion)" />
14-
<PackageReference Include="SkiaSharp" Version="2.88.7" />
14+
<PackageReference Include="SkiaSharp" Version="3.0.0-preview.4.1" />
1515
<PackageReference Include="DotNet.Bundle" Version="0.9.13" />
1616
</ItemGroup>
1717

CHANGELOG.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,53 @@ 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.0-dev.3
9+
### Added
10+
- Added Settings option "Console: History Size" to adjust the number of lines stored in the console history when running packages. Defaults to 9001 lines.
11+
#### Checkpoint Manager
12+
- Added "New Directory" and "Delete" options to the context menu of the tree view.
13+
- Added new toggle for drag & drop - when enabled, all selected models will now move together with the dragged model
14+
- Added "File Size" sorting option
15+
- Added "Hide Empty Categories" toggle
16+
- Added "Select All" button to the InfoBar (shown when at least one model is selected)
17+
### Changed
18+
- The "Download Failed" message for model downloads is now persistent until dismissed
19+
### Fixed
20+
- Fixed "The version of the native libSkiaSharp library (88.1) is incompatible with this version of SkiaSharp." error for Linux users
21+
- Fixed download links for IPAdapters in the HuggingFace model browser
22+
23+
## v2.12.0-dev.2
24+
### Added
25+
- Added Face Detailer module to Inference
26+
- Added ultralytics models to HuggingFace model browser
27+
- Added DoRA category to CivitAI model browser
28+
- Added macOS support for Fooocus & related forks
29+
- (Windows, Linux) Added Vulkan rendering support using launch argument `--vulkan`. (On Windows, the default WinUI composition renderer is likely still preferrable. Linux users are encouraged to try the new renderer to see if it improves performance and responsiveness.)
30+
### Changed
31+
- (Internal) Updated Avalonia to 11.1.1 - Includes major rendering and performance optimizations, animation refinements, improved IME / text selection, and improvements for window sizing / z-order / multi-monitor DPI scaling. ([avaloniaui.net/blog/avalonia-11-1-a-quantum-leap-in-cross-platform-ui-development](https://avaloniaui.net/blog/avalonia-11-1-a-quantum-leap-in-cross-platform-ui-development))
32+
- (Internal) Updated SkiaSharp (Rendering Backend) to 3.0.0-preview.4.1, potentially fixes issues with window rendering artifacts on some machines.
33+
- (Internal) Updated other dependencies for security and bug fixes.
34+
### Fixed
35+
- Fixed some ScrollViewers changing scroll position when focus changes
36+
- Fixed [#782](https://github.com/LykosAI/StabilityMatrix/issues/782) - conflict error when launching new versions of Forge
37+
- Fixed incorrect torch versions being installed for InvokeAI
38+
### Supporters
39+
#### Visionaries
40+
- A huge thank you goes out to our esteemed Visionary-tier Patreon backers: **Scopp Mcdee**, **Waterclouds**, and **Akiro_Senkai**. Your kind support means the world!
41+
42+
## v2.12.0-dev.1
43+
### Added
44+
- Added new package: [Fooocus - mashb1t's 1-Up Edition](https://github.com/mashb1t/Fooocus) by mashb1t
45+
- Added new package: [Stable Diffusion WebUI reForge](https://github.com/Panchovix/stable-diffusion-webui-reForge/) by Panchovix
46+
- Image viewer context menus now have 2 options: `Copy (Ctrl+C)` which now always copies the image as a file, and `Copy as Bitmap (Shift+Ctrl+C)` (Available on Windows) which copies to the clipboard as native bitmap. This changes the previous single `Copy` button behavior that would first attempt a native bitmap copy on Windows when available, and fall back to a file copy if not.
47+
- Added "Change Version" option to the package card overflow menu, allowing you to downgrade or upgrade a package to a specific version or commit
48+
- Added "Disable Update Check" option to the package card overflow menu, allowing you to disable update checks for a specific package
49+
- Added "Run Command" option in Settings for running a command with the embedded Python or Git executables
50+
- Added Intel OneAPI XPU backend (IPEX) option for SD.Next
51+
### Supporters
52+
#### Visionaries
53+
- Shoutout to our Visionary-tier Patreon supporters, **Scopp Mcdee**, **Waterclouds**, and our newest Visionary, **Akiro_Senkai**! Many thanks for your generous support!
54+
855
## v2.11.6
956
### Fixed
1057
- Fixed incorrect IPAdapter download links in the HuggingFace model browser

Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<Project>
22
<PropertyGroup>
3-
<AvaloniaVersion>11.0.9</AvaloniaVersion>
3+
<AvaloniaVersion>11.1.1</AvaloniaVersion>
44
</PropertyGroup>
55
</Project>

StabilityMatrix.Avalonia/Animations/BetterSlideNavigationTransition.cs

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
using System;
22
using System.Threading;
3-
using System.Threading.Tasks;
43
using Avalonia;
54
using Avalonia.Animation;
65
using Avalonia.Animation.Easings;
76
using Avalonia.Media;
87
using Avalonia.Styling;
98
using FluentAvalonia.UI.Media.Animation;
10-
using Projektanker.Icons.Avalonia;
119

1210
namespace StabilityMatrix.Avalonia.Animations;
1311

@@ -18,8 +16,7 @@ public class BetterSlideNavigationTransition : BaseTransitionInfo
1816
/// <summary>
1917
/// Gets or sets the type of animation effect to play during the slide transition.
2018
/// </summary>
21-
public SlideNavigationTransitionEffect Effect { get; set; } =
22-
SlideNavigationTransitionEffect.FromRight;
19+
public SlideNavigationTransitionEffect Effect { get; set; } = SlideNavigationTransitionEffect.FromRight;
2320

2421
/// <summary>
2522
/// Gets or sets the HorizontalOffset used when animating from the Left or Right
@@ -68,29 +65,21 @@ public override async void RunAnimation(Animatable ctrl, CancellationToken cance
6865
Setters =
6966
{
7067
new Setter(
71-
isVertical
72-
? TranslateTransform.YProperty
73-
: TranslateTransform.XProperty,
68+
isVertical ? TranslateTransform.YProperty : TranslateTransform.XProperty,
7469
length
7570
),
7671
new Setter(Visual.OpacityProperty, 0d)
7772
},
7873
Cue = new Cue(0d)
7974
},
80-
new KeyFrame
81-
{
82-
Setters = { new Setter(Visual.OpacityProperty, 1d) },
83-
Cue = new Cue(0.05d)
84-
},
75+
new KeyFrame { Setters = { new Setter(Visual.OpacityProperty, 1d) }, Cue = new Cue(0.05d) },
8576
new KeyFrame
8677
{
8778
Setters =
8879
{
8980
new Setter(Visual.OpacityProperty, 1d),
9081
new Setter(
91-
isVertical
92-
? TranslateTransform.YProperty
93-
: TranslateTransform.XProperty,
82+
isVertical ? TranslateTransform.YProperty : TranslateTransform.XProperty,
9483
0.0
9584
)
9685
},

StabilityMatrix.Avalonia/App.axaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
<Application.Styles>
4545
<styling:FluentAvaloniaTheme PreferUserAccentColor="True" UseSystemFontOnWindows="True"
4646
TextVerticalAlignmentOverrideBehavior="Disabled"/>
47-
<StyleInclude Source="avares://Dock.Avalonia/Themes/DockFluentTheme.axaml" />
47+
<StyleInclude Source="avares://Dock.Avalonia/Themes/DockSimpleTheme.axaml" />
4848
<StyleInclude Source="avares://AvaloniaEdit/Themes/Fluent/AvaloniaEdit.xaml"/>
4949
<StyleInclude Source="avares://AsyncImageLoader.Avalonia/AdvancedImage.axaml" />
5050
<StyleInclude Source="avares://Avalonia.Xaml.Interactions.Draggable/Styles.axaml" />
@@ -76,6 +76,7 @@
7676
<StyleInclude Source="Controls/Inference/PromptCard.axaml"/>
7777
<StyleInclude Source="Controls/Inference/UpscalerCard.axaml"/>
7878
<StyleInclude Source="Controls/Inference/ModelCard.axaml"/>
79+
<StyleInclude Source="Controls/Inference/FaceDetailerCard.axaml"/>
7980
<StyleInclude Source="Controls/Inference/BatchSizeCard.axaml"/>
8081
<StyleInclude Source="Controls/Inference/SelectImageCard.axaml"/>
8182
<StyleInclude Source="Controls/Inference/SharpenCard.axaml"/>
@@ -90,5 +91,8 @@
9091
<Style Selector="DockControl">
9192
<Setter Property="(DockProperties.ControlRecycling)" Value="{StaticResource ControlRecyclingKey}" />
9293
</Style>
94+
<Style Selector="ScrollViewer">
95+
<Setter Property="BringIntoViewOnFocusChange" Value="False"/>
96+
</Style>
9397
</Application.Styles>
9498
</Application>

StabilityMatrix.Avalonia/App.axaml.cs

Lines changed: 68 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -402,8 +402,7 @@ internal static IServiceCollection ConfigureServices()
402402
services.AddMemoryCache();
403403
services.AddLazyInstance();
404404

405-
services.AddMessagePipe();
406-
services.AddMessagePipeNamedPipeInterprocess("StabilityMatrix");
405+
services.AddMessagePipe().AddNamedPipeInterprocess("StabilityMatrix");
407406

408407
var exportedTypes = AppDomain
409408
.CurrentDomain.GetAssemblies()
@@ -571,63 +570,104 @@ internal static IServiceCollection ConfigureServices()
571570
HttpStatusCode.ServiceUnavailable, // 503
572571
HttpStatusCode.GatewayTimeout // 504
573572
};
574-
var delay = Backoff.DecorrelatedJitterBackoffV2(
575-
medianFirstRetryDelay: TimeSpan.FromMilliseconds(80),
576-
retryCount: 5
577-
);
573+
574+
// Default retry policy: ~30s max
578575
var retryPolicy = HttpPolicyExtensions
579576
.HandleTransientHttpError()
580577
.Or<TimeoutRejectedException>()
581578
.OrResult(r => retryStatusCodes.Contains(r.StatusCode))
582-
.WaitAndRetryAsync(delay);
579+
.WaitAndRetryAsync(
580+
Backoff.DecorrelatedJitterBackoffV2(
581+
medianFirstRetryDelay: TimeSpan.FromMilliseconds(750),
582+
retryCount: 6
583+
),
584+
onRetry: (result, timeSpan, retryCount, _) =>
585+
{
586+
if (retryCount > 3)
587+
{
588+
Logger.Info(
589+
"Retry attempt {Count}/{Max} after {Seconds:N2}s due to {Exception}",
590+
retryCount,
591+
6,
592+
timeSpan.TotalSeconds,
593+
result.Exception?.ToString()
594+
);
595+
}
596+
}
597+
)
598+
// 10s timeout for each attempt
599+
.WrapAsync(Policy.TimeoutAsync<HttpResponseMessage>(TimeSpan.FromSeconds(60)));
583600

584-
// Shorter timeout for local requests
585-
var localTimeout = Policy.TimeoutAsync<HttpResponseMessage>(TimeSpan.FromSeconds(3));
586-
var localDelay = Backoff.DecorrelatedJitterBackoffV2(
587-
medianFirstRetryDelay: TimeSpan.FromMilliseconds(50),
588-
retryCount: 3
589-
);
590-
var localRetryPolicy = HttpPolicyExtensions
601+
// Longer retry policy: ~60s max
602+
var retryPolicyLonger = HttpPolicyExtensions
591603
.HandleTransientHttpError()
592604
.Or<TimeoutRejectedException>()
593605
.OrResult(r => retryStatusCodes.Contains(r.StatusCode))
594606
.WaitAndRetryAsync(
595-
localDelay,
596-
onRetryAsync: (_, _) =>
607+
Backoff.DecorrelatedJitterBackoffV2(
608+
medianFirstRetryDelay: TimeSpan.FromMilliseconds(1000),
609+
retryCount: 7
610+
),
611+
onRetry: (result, timeSpan, retryCount, _) =>
597612
{
598-
Debug.WriteLine("Retrying local request...");
599-
return Task.CompletedTask;
613+
if (retryCount > 4)
614+
{
615+
Logger.Info(
616+
"Retry attempt {Count}/{Max} after {Seconds:N2}s due to {Exception}",
617+
retryCount,
618+
7,
619+
timeSpan.TotalSeconds,
620+
result.Exception?.ToString()
621+
);
622+
}
600623
}
601-
);
624+
)
625+
// 30s timeout for each attempt
626+
.WrapAsync(Policy.TimeoutAsync<HttpResponseMessage>(TimeSpan.FromSeconds(120)));
627+
628+
// Shorter local retry policy: ~5s total
629+
var localRetryPolicy = HttpPolicyExtensions
630+
.HandleTransientHttpError()
631+
.Or<TimeoutRejectedException>()
632+
.OrResult(r => retryStatusCodes.Contains(r.StatusCode))
633+
.WaitAndRetryAsync(
634+
Backoff.DecorrelatedJitterBackoffV2(
635+
medianFirstRetryDelay: TimeSpan.FromMilliseconds(320),
636+
retryCount: 5
637+
)
638+
)
639+
// 3s timeout for each attempt
640+
.WrapAsync(Policy.TimeoutAsync<HttpResponseMessage>(TimeSpan.FromSeconds(3)));
602641

603642
// named client for update
604643
services.AddHttpClient("UpdateClient").AddPolicyHandler(retryPolicy);
605644

606645
// Add Refit clients
646+
// Note: HttpClient.Timeout should be high to allow Polly to handle timeouts instead
607647
services
608648
.AddRefitClient<ICivitApi>(defaultRefitSettings)
609649
.ConfigureHttpClient(c =>
610650
{
611651
c.BaseAddress = new Uri("https://civitai.com");
612-
c.Timeout = TimeSpan.FromSeconds(30);
652+
c.Timeout = TimeSpan.FromHours(1);
613653
})
614-
.AddPolicyHandler(retryPolicy);
654+
.AddPolicyHandler(retryPolicyLonger);
615655

616656
services
617657
.AddRefitClient<ICivitTRPCApi>(defaultRefitSettings)
618658
.ConfigureHttpClient(c =>
619659
{
620660
c.BaseAddress = new Uri("https://civitai.com");
621-
c.Timeout = TimeSpan.FromSeconds(30);
661+
c.Timeout = TimeSpan.FromHours(1);
622662
})
623-
.AddPolicyHandler(retryPolicy);
663+
.AddPolicyHandler(retryPolicyLonger);
624664

625665
services
626666
.AddRefitClient<ILykosAuthApi>(defaultRefitSettings)
627667
.ConfigureHttpClient(c =>
628668
{
629669
c.BaseAddress = new Uri("https://auth.lykos.ai");
630-
c.Timeout = TimeSpan.FromSeconds(60);
670+
c.Timeout = TimeSpan.FromHours(1);
631671
})
632672
.ConfigurePrimaryHttpMessageHandler(() => new HttpClientHandler { AllowAutoRedirect = false })
633673
.AddPolicyHandler(retryPolicy)
@@ -641,21 +681,18 @@ internal static IServiceCollection ConfigureServices()
641681
.ConfigureHttpClient(c =>
642682
{
643683
c.BaseAddress = new Uri("https://openart.ai/api/public/workflows");
644-
c.Timeout = TimeSpan.FromSeconds(30);
684+
c.Timeout = TimeSpan.FromHours(1);
645685
})
646686
.AddPolicyHandler(retryPolicy);
647687

648688
// Add Refit client managers
649-
services.AddHttpClient("A3Client").AddPolicyHandler(localTimeout.WrapAsync(localRetryPolicy));
689+
services.AddHttpClient("A3Client").AddPolicyHandler(localRetryPolicy);
650690

651691
services
652692
.AddHttpClient("DontFollowRedirects")
653693
.ConfigurePrimaryHttpMessageHandler(() => new HttpClientHandler { AllowAutoRedirect = false })
654694
.AddPolicyHandler(retryPolicy);
655695

656-
/*services.AddHttpClient("IComfyApi")
657-
.AddPolicyHandler(localTimeout.WrapAsync(localRetryPolicy));*/
658-
659696
// Add Refit client factory
660697
services.AddSingleton<IApiFactory, ApiFactory>(
661698
provider =>
@@ -942,7 +979,8 @@ private static LoggingConfiguration ConfigureLogging()
942979
continue;
943980
}
944981

945-
builder.ForLogger(type.FullName).FilterMinLevel(NLog.LogLevel.Debug);
982+
// Set minimum level to Debug for these types
983+
builder.ForLogger(type.FullName).WriteToNil(NLog.LogLevel.Debug);
946984
}
947985

948986
// Debug console logging

0 commit comments

Comments
 (0)