diff --git a/StabilityMatrix/InstallerWindow.xaml b/StabilityMatrix/InstallerWindow.xaml
index f14b3bd6..4f1603ec 100644
--- a/StabilityMatrix/InstallerWindow.xaml
+++ b/StabilityMatrix/InstallerWindow.xaml
@@ -215,10 +215,6 @@
-
-
-
diff --git a/StabilityMatrix/LaunchPage.xaml b/StabilityMatrix/LaunchPage.xaml
index 693cb24b..f2e5ddea 100644
--- a/StabilityMatrix/LaunchPage.xaml
+++ b/StabilityMatrix/LaunchPage.xaml
@@ -59,7 +59,9 @@
d:DataContext="{d:DesignInstance Type=models:InstalledPackage,
IsDesignTimeCreatable=True}">
-
+
+
+
diff --git a/StabilityMatrix/Models/InstalledPackage.cs b/StabilityMatrix/Models/InstalledPackage.cs
index d8c52a36..1f3dcd29 100644
--- a/StabilityMatrix/Models/InstalledPackage.cs
+++ b/StabilityMatrix/Models/InstalledPackage.cs
@@ -34,8 +34,8 @@ public class InstalledPackage
///
/// Full path to the package, using LibraryPath and GlobalConfig.LibraryDir.
///
- // [JsonIgnore]
- // public string? FullPath => LibraryPath != null ? System.IO.Path.Combine(GlobalConfig.LibraryDir, LibraryPath) : null;
+ [JsonIgnore]
+ public string? FullPath => LibraryPath != null ? System.IO.Path.Combine(GlobalConfig.LibraryDir, LibraryPath) : null;
public string? LaunchCommand { get; set; }
public List? LaunchArgs { get; set; }
diff --git a/StabilityMatrix/PackageManagerPage.xaml b/StabilityMatrix/PackageManagerPage.xaml
index 1a8bdfbc..1691bc3e 100644
--- a/StabilityMatrix/PackageManagerPage.xaml
+++ b/StabilityMatrix/PackageManagerPage.xaml
@@ -111,9 +111,9 @@
-
+ Margin="0,5,0,5"
+ Text="{Binding SelectedPackage.FullPath, FallbackValue=Packages\stable-diffusion}" />
+
- {
- InstallPath = Path.Combine(libraryDir, "Packages");
- };
}
public async Task OnLoaded()
@@ -255,16 +246,11 @@ public partial class InstallerViewModel : ObservableObject
OnSelectedPackageChanged(SelectedPackage);
}
- partial void OnInstallNameChanged(string oldValue, string newValue)
- {
- var path = Path.GetFullPath($"{InstallPath}\\{newValue}");
- ShowDuplicateWarning = settingsManager.Settings.InstalledPackages.Any(p => p.Path.Equals(path));
- }
-
- partial void OnInstallPathChanged(string oldValue, string newValue)
+ partial void OnInstallNameChanged(string? oldValue, string newValue)
{
- var path = Path.GetFullPath($"{newValue}\\{InstallName}");
- ShowDuplicateWarning = settingsManager.Settings.InstalledPackages.Any(p => p.Path.Equals(path));
+ ShowDuplicateWarning =
+ settingsManager.Settings.InstalledPackages.Any(p =>
+ p.LibraryPath.Equals($"Packages\\{newValue}"));
}
partial void OnSelectedVersionChanged(PackageVersion? value)
@@ -303,7 +289,7 @@ public partial class InstallerViewModel : ObservableObject
await InstallGitIfNecessary();
- SelectedPackage.InstallLocation = $"{InstallPath}\\{InstallName}";
+ SelectedPackage.InstallLocation = $"{settingsManager.LibraryDir}\\Packages\\{InstallName}";
SelectedPackage.DisplayName = InstallName;
if (!PyRunner.PipInstalled || !PyRunner.VenvInstalled)
@@ -339,7 +325,7 @@ public partial class InstallerViewModel : ObservableObject
var package = new InstalledPackage
{
DisplayName = SelectedPackage.DisplayName,
- Path = SelectedPackage.InstallLocation,
+ LibraryPath = $"Packages\\{InstallName}",
Id = Guid.NewGuid(),
PackageName = SelectedPackage.Name,
PackageVersion = version,
diff --git a/StabilityMatrix/ViewModels/LaunchViewModel.cs b/StabilityMatrix/ViewModels/LaunchViewModel.cs
index 829cace9..c691e305 100644
--- a/StabilityMatrix/ViewModels/LaunchViewModel.cs
+++ b/StabilityMatrix/ViewModels/LaunchViewModel.cs
@@ -203,7 +203,7 @@ public partial class LaunchViewModel : ObservableObject
// Use dynamic parsed args over static
if (package is IArgParsable parsable)
{
- var rootPath = activeInstall.Path!;
+ var rootPath = activeInstall.FullPath!;
var moduleName = parsable.RelativeArgsDefinitionScriptPath;
var parser = new ArgParser(pyRunner, rootPath, moduleName);
definitions = await parser.GetArgsAsync();