Browse Source

Fix outputs page crash & update chagenlog

pull/438/head
JT 10 months ago
parent
commit
2088d3c0aa
  1. 5
      CHANGELOG.md
  2. 28
      StabilityMatrix.Avalonia/ViewModels/OutputsPageViewModel.cs

5
CHANGELOG.md

@ -9,13 +9,16 @@ and this project adheres to [Semantic Versioning 2.0](https://semver.org/spec/v2
### Added
- Added Recommended Models dialog after one-click installer
- Added new launch argument options for Fooocus
- Added Automatic1111 & Stable Diffusion WebUI-UX to the compatible macOS packages
### Changed
- Changed one-click installer to match the new package installation style
- Automatic1111 packages will now use PyTorch v2.1.2. Upgrade will occur during the next package update or upon fresh installation.
- Updated French translation with the latest changes
### Fixed
- Fixed Environment Variables not being editable
- Fixed potential SD.Next update issues by moving to shared update process
- Fixed potential SD.Next update issues by moving to shared update process
- Fixed Invoke install trying to use system nodejs
- Fixed crash on startup when Outputs page failed to load categories properly
## v2.8.0-pre.3
### Added

28
StabilityMatrix.Avalonia/ViewModels/OutputsPageViewModel.cs

@ -136,8 +136,11 @@ public partial class OutputsPageViewModel : PageViewModelBase
settings => settings.OutputsImageSize,
delay: TimeSpan.FromMilliseconds(250)
);
}
RefreshCategories(false);
protected override void OnInitialLoaded()
{
RefreshCategories();
}
public override void OnLoaded()
@ -148,6 +151,8 @@ public partial class OutputsPageViewModel : PageViewModelBase
if (!settingsManager.IsLibraryDirSet)
return;
base.OnLoaded();
Directory.CreateDirectory(settingsManager.ImagesDirectory);
SelectedCategory ??= Categories.First();
@ -528,7 +533,7 @@ public partial class OutputsPageViewModel : PageViewModelBase
}
}
private void RefreshCategories(bool updateProperty = true)
private void RefreshCategories()
{
if (Design.IsDesignMode)
return;
@ -542,7 +547,10 @@ public partial class OutputsPageViewModel : PageViewModelBase
.Settings.InstalledPackages.Where(x => !x.UseSharedOutputFolder)
.Select(packageFactory.GetPackagePair)
.WhereNotNull()
.Where(p => p.BasePackage.SharedOutputFolders != null && p.BasePackage.SharedOutputFolders.Any())
.Where(
p =>
p.BasePackage.SharedOutputFolders is { Count: > 0 } && p.InstalledPackage.FullPath != null
)
.Select(
pair =>
new PackageOutputCategory
@ -572,17 +580,7 @@ public partial class OutputsPageViewModel : PageViewModelBase
Categories = new ObservableCollection<PackageOutputCategory>(packageCategories);
if (updateProperty)
{
SelectedCategory =
Categories.FirstOrDefault(x => x.Name == previouslySelectedCategory?.Name)
?? Categories.First();
}
else
{
selectedCategory =
Categories.FirstOrDefault(x => x.Name == previouslySelectedCategory?.Name)
?? Categories.First();
}
SelectedCategory =
Categories.FirstOrDefault(x => x.Name == previouslySelectedCategory?.Name) ?? Categories.First();
}
}

Loading…
Cancel
Save