Skip to content

Commit

Permalink
Merge pull request LykosAI#397 from LykosAI/main
Browse files Browse the repository at this point in the history
v2.7.8
  • Loading branch information
mohnjiles authored Jan 12, 2024
2 parents 7c0a100 + 0b88add commit ca69748
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,7 @@ private Task ModifySelectedPackage(PythonPackagesItemViewModel? item)
? 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;
Expand All @@ -167,9 +164,7 @@ private async Task UpgradePackageVersion(
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;
Expand Down Expand Up @@ -225,7 +220,7 @@ private async Task InstallPackage()
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;
}
Expand All @@ -236,14 +231,14 @@ private async Task InstallPackage()
{
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);
Expand Down

0 comments on commit ca69748

Please sign in to comment.