From 34908a2f00bd5190aabfd20311766707111410bc Mon Sep 17 00:00:00 2001 From: ionite34 Date: Thu, 28 Dec 2023 11:35:11 +0800 Subject: [PATCH 1/2] Allow multiple arguments in pip install args (cherry picked from commit 868edbffd1dce0f341389dd02b000cb191077366) --- .../ViewModels/Dialogs/PythonPackagesViewModel.cs | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/StabilityMatrix.Avalonia/ViewModels/Dialogs/PythonPackagesViewModel.cs b/StabilityMatrix.Avalonia/ViewModels/Dialogs/PythonPackagesViewModel.cs index b7d00f8e..6f00313b 100644 --- a/StabilityMatrix.Avalonia/ViewModels/Dialogs/PythonPackagesViewModel.cs +++ b/StabilityMatrix.Avalonia/ViewModels/Dialogs/PythonPackagesViewModel.cs @@ -140,10 +140,7 @@ public partial class PythonPackagesViewModel : ContentDialogViewModelBase ? UpgradePackageVersion( item.Package.Name, item.SelectedVersion, - PythonPackagesItemViewModel.GetKnownIndexUrl( - item.Package.Name, - item.SelectedVersion - ), + PythonPackagesItemViewModel.GetKnownIndexUrl(item.Package.Name, item.SelectedVersion), isDowngrade: item.CanDowngrade ) : Task.CompletedTask; @@ -167,9 +164,7 @@ public partial class PythonPackagesViewModel : ContentDialogViewModelBase Resources.Label_ConfirmQuestion ); - dialog.PrimaryButtonText = isDowngrade - ? Resources.Action_Downgrade - : Resources.Action_Upgrade; + dialog.PrimaryButtonText = isDowngrade ? Resources.Action_Downgrade : Resources.Action_Upgrade; dialog.IsPrimaryButtonEnabled = true; dialog.DefaultButton = ContentDialogButton.Primary; dialog.CloseButtonText = Resources.Action_Cancel; @@ -225,7 +220,7 @@ public partial class PythonPackagesViewModel : ContentDialogViewModelBase var dialog = DialogHelper.CreateTextEntryDialog("Install Package", "", fields); var result = await dialog.ShowAsync(); - if (result != ContentDialogResult.Primary || fields[0].Text is not { } packageName) + if (result != ContentDialogResult.Primary || fields[0].Text is not { } packageArgs) { return; } @@ -236,14 +231,14 @@ public partial class PythonPackagesViewModel : ContentDialogViewModelBase { VenvDirectory = VenvPath, WorkingDirectory = VenvPath.Parent, - Args = new[] { "install", packageName } + Args = new ProcessArgs(packageArgs).Prepend("install") } }; var runner = new PackageModificationRunner { ShowDialogOnStart = true, - ModificationCompleteMessage = $"Installed Python Package '{packageName}'" + ModificationCompleteMessage = $"Installed Python Package '{packageArgs}'" }; EventManager.Instance.OnPackageInstallProgressAdded(runner); await runner.ExecuteSteps(steps); From 0210d59fd4a263403e1a852cc815c056f5e683d1 Mon Sep 17 00:00:00 2001 From: Ionite Date: Thu, 11 Jan 2024 14:31:54 +0800 Subject: [PATCH 2/2] Update CHANGELOG.md --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 903abd15..8c93fcbe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ 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.7.8 +### Changed +- Python Packages install dialog now allows entering multiple arguments or option flags +### Fixed +- Fixed InvokeAI Package dependency versions ([#395](https://github.com/LykosAI/StabilityMatrix/pull/395)) + ## v2.7.7 ### Added - Added `--use-directml` launch argument for SDWebUI DirectML fork