Skip to content

Commit

Permalink
Merge pull request LykosAI#658 from ionite34/moar-fixs
Browse files Browse the repository at this point in the history
Made "move" the default for drag & drop imports as the poll demands …
  • Loading branch information
mohnjiles authored Jun 8, 2024
2 parents 1358e28 + 4141066 commit 6da7a1c
Show file tree
Hide file tree
Showing 8 changed files with 76 additions and 12 deletions.
54 changes: 54 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,60 @@ All notable changes to Stability Matrix will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning 2.0](https://semver.org/spec/v2.0.0.html).

## v2.11.0
### Added
- Added new package: [SDFX](https://github.com/sdfxai/sdfx/) by sdfxai
- Added ZLUDA option for SD.Next
- Added PixArt, SDXL Hyper, and SD3 options to the Civitai model browser
- Added option in Settings to choose whether to Copy or Move files when dragging and dropping files into the Checkpoint Manager
- Added more launch options for Forge - [#618](https://github.com/LykosAI/StabilityMatrix/issues/618)
- Added folder shortcuts in Settings for opening common app and system folders, such as Data Directory and Logs
- Added download speed indicator to model downloads in the Downloads tab
- Added XL ControlNets section to HuggingFace model browser
- Added toggle in Settings for model browser auto-search on load
- Added optional Recycle Bin mode when deleting images in the Inference image browser, can be disabled in settings (Currently on Windows only)
- Added Brazilian Portuguese language option, thanks to jbostroski for the translation!
- Added setting for locale specific or invariant number formatting
- Added support for jpg/jpeg & gif images in the Output Browser
- Added search bar to the Python Packages dialog
#### Inference
- Added Inpainting support for Image To Image projects using the new image mask canvas editor
- Alternate Lora / LyCORIS drop-down model selection, can be toggled via the model settings button. The existing prompt-based Lora / LyCORIS method is still available.
### Changed
- Maximized state is now stored on exit and restored on launch
- Drag & drop imports now move files by default instead of copying
- Clicking outside the Select Model Version dialog will now close it
- Changed Package card buttons to better indicate that they are buttons
- Log file storage has been moved from `%AppData%/StabilityMatrix` to a subfolder: `%AppData%/StabilityMatrix/Logs`
- Archived log files now have an increased rolling limit of 9 files, from 2 files previously. Their file names will now be in the format `app.{yyyy-MM-dd HH_mm_ss}.log`. The current session log file remains named `app.log`.
- Updated image controls on Recommended Models dialog to match the rest of the app
- Improved app shutdown clean-up process reliability and speed
- Improved ProcessTracker speed and clean-up safety for faster subprocess and package launching performance
- Updated HuggingFace page so the command bar stays fixed at the top
- Revamped Checkpoints page now shows available model updates and has better drag & drop functionality
- Revamped file deletion confirmation dialog with affected file paths display and recycle bin / permanent delete options (Checkpoint and Output Browsers) (Currently on Windows only)
### Fixed
- Fixed crash when parsing invalid generated images in Output Browser and Inference image viewer, errors will be logged instead and the image will be skipped
- Fixed missing progress text during package updates
- (Windows) Fixed "Open in Explorer" buttons across the app not opening the correct path on ReFS partitions
- (macOS, Linux) Fixed Subprocesses of packages sometimes not being closed when the app is closed
- Fixed Inference tabs sometimes not being restored from previous sessions
- Fixed multiple log files being archived in a single session, and losing some log entries
- Fixed error when installing certain packages with comments in the requirements file
- Fixed error when deleting Inference browser images in a nested project path with recycle bin mode
- Fixed extra text in positive prompt when loading image parameters in Inference with empty negative prompt value
- Fixed NullReferenceException that sometimes occurred when closing Inference tabs with images due to Avalonia.Bitmap.Size accessor issue
- Fixed [#598](https://github.com/LykosAI/StabilityMatrix/issues/598) - program not exiting after printing help or version text
- Fixed [#630](https://github.com/LykosAI/StabilityMatrix/issues/630) - InvokeAI update hangs forever waiting for input
- Fixed issue where the "installed" state on HuggingFace model browser was not always correct
- Fixed model folders not being created on startup

### Supporters
#### Visionaries
- Shoutout to our Visionary-tier supporters on Patreon, **Scopp Mcdee** and **Waterclouds**! Your generous support is appreciated and helps us continue to make Stability Matrix better for everyone!
#### Pioneers
- A big thank you to our Pioneer-tier supporters on Patreon, **tankfox** and **tanangular**! Your support helps us continue to improve Stability Matrix!

## v2.11.0-pre.2
### Added
- Added folder shortcuts in Settings for opening common app and system folders, such as Data Directory and Logs.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ public override void OnLoaded()
searchOptions = settingsManager.Settings.ModelSearchOptions;
}

SelectedPeriod = searchOptions?.SelectedPeriod ?? CivitPeriod.Month;
SelectedPeriod = searchOptions?.SelectedPeriod ?? CivitPeriod.AllTime;
SortMode = searchOptions?.SortMode ?? CivitSortMode.HighestRated;
SelectedModelType = searchOptions?.SelectedModelType ?? CivitModelType.Checkpoint;
SelectedBaseModelType = searchOptions?.SelectedBaseModelType ?? "All";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,8 +273,8 @@ private void IndexFolders()
{
var modelsDirectory = settingsManager.ModelsDirectory;

// Setup shared folders in case they're missing
sharedFolders.SetupSharedModelFolders();
// // Setup shared folders in case they're missing
// sharedFolders.SetupSharedModelFolders();

var folders = Directory.GetDirectories(modelsDirectory);

Expand Down
13 changes: 11 additions & 2 deletions StabilityMatrix.Avalonia/ViewModels/NewCheckpointsPageViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
using System.IO;
using System.Linq;
using System.Reactive.Linq;
using System.Threading;
using System.Threading.Tasks;
using AsyncAwaitBestPractices;
using Avalonia.Controls;
Expand All @@ -18,6 +17,7 @@
using DynamicData;
using DynamicData.Binding;
using FluentAvalonia.UI.Controls;
using Microsoft.Extensions.Logging;
using StabilityMatrix.Avalonia.Controls;
using StabilityMatrix.Avalonia.Languages;
using StabilityMatrix.Avalonia.Models;
Expand All @@ -32,7 +32,6 @@
using StabilityMatrix.Core.Extensions;
using StabilityMatrix.Core.Helper;
using StabilityMatrix.Core.Models;
using StabilityMatrix.Core.Models.Api;
using StabilityMatrix.Core.Models.Database;
using StabilityMatrix.Core.Models.FileInterfaces;
using StabilityMatrix.Core.Models.PackageModification;
Expand All @@ -47,6 +46,7 @@ namespace StabilityMatrix.Avalonia.ViewModels;
[View(typeof(NewCheckpointsPage))]
[Singleton]
public partial class NewCheckpointsPageViewModel(
ILogger<NewCheckpointsPageViewModel> logger,
ISettingsManager settingsManager,
IModelIndexService modelIndexService,
ModelFinder modelFinder,
Expand Down Expand Up @@ -282,6 +282,15 @@ or nameof(SortConnectedModelsFirst)
true
);

try
{
SharedFolders.SetupSharedModelFolders(settingsManager.ModelsDirectory);
}
catch (Exception e)
{
logger.LogError(e, @"Failed to setup shared model folders");
}

Refresh().SafeFireAndForget();

EventManager.Instance.ModelIndexChanged += (_, _) =>
Expand Down
1 change: 0 additions & 1 deletion StabilityMatrix.Core/Helper/ISharedFolders.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,4 @@ public interface ISharedFolders
{
void SetupLinksForPackage(BasePackage basePackage, DirectoryPath installDirectory);
void RemoveLinksForAllPackages();
void SetupSharedModelFolders();
}
9 changes: 4 additions & 5 deletions StabilityMatrix.Core/Helper/SharedFolders.cs
Original file line number Diff line number Diff line change
Expand Up @@ -210,17 +210,16 @@ public void RemoveLinksForAllPackages()
}
}

public void SetupSharedModelFolders()
public static void SetupSharedModelFolders(DirectoryPath rootModelsDir)
{
var modelsDir = settingsManager.ModelsDirectory;
if (string.IsNullOrWhiteSpace(modelsDir))
if (string.IsNullOrWhiteSpace(rootModelsDir))
return;

Directory.CreateDirectory(modelsDir);
Directory.CreateDirectory(rootModelsDir);
var allSharedFolderTypes = Enum.GetValues<SharedFolderType>();
foreach (var sharedFolder in allSharedFolderTypes)
{
var dir = new DirectoryPath(modelsDir, sharedFolder.GetStringValue());
var dir = new DirectoryPath(rootModelsDir, sharedFolder.GetStringValue());
dir.Create();
}
}
Expand Down
3 changes: 3 additions & 0 deletions StabilityMatrix.Core/Models/Api/CivitBaseModelType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ public enum CivitBaseModelType
[StringValue("SD 2.1")]
Sd21,

[StringValue("SD 3")]
Sd3,

[StringValue("SDXL 0.9")]
Sdxl09,

Expand Down
2 changes: 1 addition & 1 deletion StabilityMatrix.Core/Models/Settings/Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ public IReadOnlyDictionary<string, string> EnvironmentVariables
/// When false, will copy files when drag/drop import happens
/// Otherwise, it will move, as it states
/// </summary>
public bool MoveFilesOnImport { get; set; } = false;
public bool MoveFilesOnImport { get; set; } = true;

[JsonIgnore]
public bool IsHolidayModeActive =>
Expand Down

0 comments on commit 6da7a1c

Please sign in to comment.