File tree Expand file tree Collapse file tree 4 files changed +10
-7
lines changed
StabilityMatrix.Avalonia/ViewModels
StabilityMatrix.Core/Models/Api Expand file tree Collapse file tree 4 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,8 @@ and this project adheres to [Semantic Versioning 2.0](https://semver.org/spec/v2
1414### Changed
1515- Updated install for kohya_ss to support RTX 5000-series GPUs
1616- (pre.2 re-release) Merged Inference GGUF workflows into the UNet model loader option (no longer need to choose GGUF separately)
17+ - (pre.2 re-release) Updated some date strings to take into account the user's locale
18+ - (pre.2 re-release) Fixed some crashes when using Accelerated Model Discovery
1719### Fixed
1820- Fixed Inference ControlNet Preprocessors using incorrect resolution and increased maximum of smallest dimension to 16384
1921- Fixed Triton/Sage install option showing for incompatible GPUs
Original file line number Diff line number Diff line change 2727using StabilityMatrix . Core . Models . Api ;
2828using StabilityMatrix . Core . Models . Database ;
2929using StabilityMatrix . Core . Models . FileInterfaces ;
30- using StabilityMatrix . Core . Models . Progress ;
3130using StabilityMatrix . Core . Processes ;
3231using StabilityMatrix . Core . Services ;
3332
@@ -267,7 +266,7 @@ private async Task ShowVersionDialog(CivitModel model)
267266 . Where ( v => ! settingsManager . Settings . HideEarlyAccessModels || ! v . IsEarlyAccess )
268267 . Select ( version => new ModelVersionViewModel ( modelIndexService , version ) )
269268 . ToImmutableArray ( ) ;
270- viewModel . SelectedVersionViewModel = viewModel . Versions [ 0 ] ;
269+ viewModel . SelectedVersionViewModel = viewModel . Versions . Any ( ) ? viewModel . Versions [ 0 ] : null ;
271270
272271 // Update with latest version (including files) if we have no files
273272 if ( model . ModelVersions ? . FirstOrDefault ( ) ? . Files is not { Count : > 0 } )
@@ -312,7 +311,9 @@ private async Task ShowVersionDialog(CivitModel model)
312311 . Where ( v => ! settingsManager . Settings . HideEarlyAccessModels || ! v . IsEarlyAccess )
313312 . Select ( version => new ModelVersionViewModel ( modelIndexService , version ) )
314313 . ToImmutableArray ( ) ;
315- viewModel . SelectedVersionViewModel = viewModel . Versions [ 0 ] ;
314+ viewModel . SelectedVersionViewModel = viewModel . Versions . Any ( )
315+ ? viewModel . Versions [ 0 ]
316+ : null ;
316317 } ) ;
317318
318319 // Save to db
Original file line number Diff line number Diff line change @@ -673,7 +673,7 @@ private async Task ShowCivitVersionDialog(CheckpointFileViewModel item)
673673 viewModel . Versions = versions
674674 . Select ( version => new ModelVersionViewModel ( modelIndexService , version ) )
675675 . ToImmutableArray ( ) ;
676- viewModel . SelectedVersionViewModel = viewModel . Versions [ 0 ] ;
676+ viewModel . SelectedVersionViewModel = viewModel . Versions . Any ( ) ? viewModel . Versions [ 0 ] : null ;
677677
678678 dialog . Content = new SelectModelVersionDialog { DataContext = viewModel } ;
679679
@@ -1107,7 +1107,7 @@ private void RefreshCategories()
11071107 previouslySelectedCategory
11081108 ?? Categories . FirstOrDefault ( x => x . Path == previouslySelectedCategory ? . Path )
11091109 ?? Categories . FirstOrDefault ( )
1110- ?? categoriesCache . Items [ 0 ] ;
1110+ ?? ( categoriesCache . Items . Any ( ) ? categoriesCache . Items [ 0 ] : null ) ;
11111111
11121112 var dirPath = new DirectoryPath ( SelectedCategory . Path ) ;
11131113
@@ -1128,7 +1128,7 @@ private void RefreshCategories()
11281128 previouslySelectedCategory
11291129 ?? Categories . FirstOrDefault ( x => x . Path == previouslySelectedCategory ? . Path )
11301130 ?? Categories . FirstOrDefault ( )
1131- ?? categoriesCache . Items [ 0 ] ;
1131+ ?? ( categoriesCache . Items . Any ( ) ? categoriesCache . Items [ 0 ] : null ) ;
11321132 } ) ;
11331133 }
11341134
Original file line number Diff line number Diff line change @@ -70,5 +70,5 @@ public FileSizeType FullFilesSize
7070 ModelVersions is { Count : > 0 }
7171 ? ModelVersions [ 0 ] . PublishedAt ?? DateTimeOffset . MinValue
7272 : DateTimeOffset . MinValue
73- ) . ToString ( "M/d/yy" ) ;
73+ ) . ToString ( "d" , System . Globalization . CultureInfo . CurrentCulture ) ;
7474}
You can’t perform that action at this time.
0 commit comments