diff --git a/CHANGELOG.md b/CHANGELOG.md index c92f1ec6..af55be1c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning 2.0](https://semver.org/spec/v2 - Fixed package launch not working when environment variable `SETUPTOOLS_USE_DISTUTILS` is set due to conflict with a default environment variable. User environment variables will now correctly override any default environment variables. - Fixed "No refresh token found" error when failing to login with Lykos account in some cases. - Fixed [#574](https://github.com/LykosAI/StabilityMatrix/issues/574) - local images not showing on macOS or Linux +- Fixed [#578](https://github.com/LykosAI/StabilityMatrix/issues/578) - "python setup.py egg_info did not run successfully" failure when installing Auto1111 or SDWebUI Forge ## v2.10.0 ### Added diff --git a/StabilityMatrix.Core/Models/Packages/A3WebUI.cs b/StabilityMatrix.Core/Models/Packages/A3WebUI.cs index 9635cecc..8ae0f0f2 100644 --- a/StabilityMatrix.Core/Models/Packages/A3WebUI.cs +++ b/StabilityMatrix.Core/Models/Packages/A3WebUI.cs @@ -204,6 +204,8 @@ public class A3WebUI( await using var venvRunner = new PyVenvRunner(venvPath); venvRunner.WorkingDirectory = installLocation; + venvRunner.EnvironmentVariables = settingsManager.Settings.EnvironmentVariables; + await venvRunner.Setup(true, onConsoleOutput).ConfigureAwait(false); await venvRunner.PipInstall("--upgrade pip wheel", onConsoleOutput).ConfigureAwait(false); diff --git a/StabilityMatrix.Core/Models/Packages/ComfyUI.cs b/StabilityMatrix.Core/Models/Packages/ComfyUI.cs index c620182c..61c10f96 100644 --- a/StabilityMatrix.Core/Models/Packages/ComfyUI.cs +++ b/StabilityMatrix.Core/Models/Packages/ComfyUI.cs @@ -195,8 +195,9 @@ public class ComfyUI( // Setup venv await using var venvRunner = new PyVenvRunner(Path.Combine(installLocation, "venv")); venvRunner.WorkingDirectory = installLocation; - await venvRunner.Setup(true, onConsoleOutput).ConfigureAwait(false); + venvRunner.EnvironmentVariables = settingsManager.Settings.EnvironmentVariables; + await venvRunner.Setup(true, onConsoleOutput).ConfigureAwait(false); await venvRunner.PipInstall("--upgrade pip wheel", onConsoleOutput).ConfigureAwait(false); progress?.Report( @@ -245,6 +246,7 @@ public class ComfyUI( excludePattern: "torch" ); + await venvRunner.PipUninstall("xformers", onConsoleOutput).ConfigureAwait(false); await venvRunner.PipInstall(pipArgs, onConsoleOutput).ConfigureAwait(false); progress?.Report(new ProgressReport(1, "Installed Package Requirements", isIndeterminate: false)); diff --git a/StabilityMatrix.Core/Models/Packages/Fooocus.cs b/StabilityMatrix.Core/Models/Packages/Fooocus.cs index 2faaab4f..fcaff953 100644 --- a/StabilityMatrix.Core/Models/Packages/Fooocus.cs +++ b/StabilityMatrix.Core/Models/Packages/Fooocus.cs @@ -193,6 +193,7 @@ public class Fooocus( ) { var venvRunner = await SetupVenv(installLocation, forceRecreate: true).ConfigureAwait(false); + venvRunner.EnvironmentVariables = settingsManager.Settings.EnvironmentVariables; progress?.Report(new ProgressReport(-1f, "Installing requirements...", isIndeterminate: true)); diff --git a/StabilityMatrix.Core/Models/Packages/FooocusMre.cs b/StabilityMatrix.Core/Models/Packages/FooocusMre.cs index 82497f0f..4ecaea25 100644 --- a/StabilityMatrix.Core/Models/Packages/FooocusMre.cs +++ b/StabilityMatrix.Core/Models/Packages/FooocusMre.cs @@ -111,6 +111,7 @@ public class FooocusMre( ) { var venvRunner = await SetupVenv(installLocation, forceRecreate: true).ConfigureAwait(false); + venvRunner.EnvironmentVariables = settingsManager.Settings.EnvironmentVariables; progress?.Report(new ProgressReport(-1f, "Installing torch...", isIndeterminate: true)); diff --git a/StabilityMatrix.Core/Models/Packages/KohyaSs.cs b/StabilityMatrix.Core/Models/Packages/KohyaSs.cs index 594f95ec..701da699 100644 --- a/StabilityMatrix.Core/Models/Packages/KohyaSs.cs +++ b/StabilityMatrix.Core/Models/Packages/KohyaSs.cs @@ -126,9 +126,12 @@ public class KohyaSs( .ConfigureAwait(false); progress?.Report(new ProgressReport(-1f, "Setting up venv", isIndeterminate: true)); + // Setup venv await using var venvRunner = new PyVenvRunner(Path.Combine(installLocation, "venv")); venvRunner.WorkingDirectory = installLocation; + venvRunner.EnvironmentVariables = settingsManager.Settings.EnvironmentVariables; + await venvRunner.Setup(true, onConsoleOutput).ConfigureAwait(false); // Extra dep needed before running setup since v23.0.x diff --git a/StabilityMatrix.Core/Models/Packages/OneTrainer.cs b/StabilityMatrix.Core/Models/Packages/OneTrainer.cs index d4a92c34..4a6887e6 100644 --- a/StabilityMatrix.Core/Models/Packages/OneTrainer.cs +++ b/StabilityMatrix.Core/Models/Packages/OneTrainer.cs @@ -57,6 +57,8 @@ public class OneTrainer( await using var venvRunner = new PyVenvRunner(Path.Combine(installLocation, "venv")); venvRunner.WorkingDirectory = installLocation; + venvRunner.EnvironmentVariables = settingsManager.Settings.EnvironmentVariables; + await venvRunner.Setup(true, onConsoleOutput).ConfigureAwait(false); progress?.Report(new ProgressReport(-1f, "Installing requirements", isIndeterminate: true)); diff --git a/StabilityMatrix.Core/Models/Packages/RuinedFooocus.cs b/StabilityMatrix.Core/Models/Packages/RuinedFooocus.cs index 96dc5d65..194b431e 100644 --- a/StabilityMatrix.Core/Models/Packages/RuinedFooocus.cs +++ b/StabilityMatrix.Core/Models/Packages/RuinedFooocus.cs @@ -116,6 +116,7 @@ public class RuinedFooocus( if (torchVersion == TorchVersion.Cuda) { var venvRunner = await SetupVenv(installLocation, forceRecreate: true).ConfigureAwait(false); + venvRunner.EnvironmentVariables = settingsManager.Settings.EnvironmentVariables; progress?.Report(new ProgressReport(-1f, "Installing requirements...", isIndeterminate: true)); diff --git a/StabilityMatrix.Core/Models/Packages/SDWebForge.cs b/StabilityMatrix.Core/Models/Packages/SDWebForge.cs index f64a4197..a253b177 100644 --- a/StabilityMatrix.Core/Models/Packages/SDWebForge.cs +++ b/StabilityMatrix.Core/Models/Packages/SDWebForge.cs @@ -142,6 +142,8 @@ public class SDWebForge( await using var venvRunner = new PyVenvRunner(venvPath); venvRunner.WorkingDirectory = installLocation; + venvRunner.EnvironmentVariables = settingsManager.Settings.EnvironmentVariables; + await venvRunner.Setup(true, onConsoleOutput).ConfigureAwait(false); await venvRunner.PipInstall("--upgrade pip wheel", onConsoleOutput).ConfigureAwait(false); diff --git a/StabilityMatrix.Core/Models/Packages/StableDiffusionDirectMl.cs b/StabilityMatrix.Core/Models/Packages/StableDiffusionDirectMl.cs index c35b37b8..037725a8 100644 --- a/StabilityMatrix.Core/Models/Packages/StableDiffusionDirectMl.cs +++ b/StabilityMatrix.Core/Models/Packages/StableDiffusionDirectMl.cs @@ -76,6 +76,8 @@ public class StableDiffusionDirectMl( // Setup venv await using var venvRunner = new PyVenvRunner(Path.Combine(installLocation, "venv")); venvRunner.WorkingDirectory = installLocation; + venvRunner.EnvironmentVariables = settingsManager.Settings.EnvironmentVariables; + await venvRunner.Setup(true, onConsoleOutput).ConfigureAwait(false); switch (torchVersion) diff --git a/StabilityMatrix.Core/Models/Packages/StableDiffusionUx.cs b/StabilityMatrix.Core/Models/Packages/StableDiffusionUx.cs index 98f85350..5b5cacfa 100644 --- a/StabilityMatrix.Core/Models/Packages/StableDiffusionUx.cs +++ b/StabilityMatrix.Core/Models/Packages/StableDiffusionUx.cs @@ -190,6 +190,8 @@ public class StableDiffusionUx( // Setup venv await using var venvRunner = new PyVenvRunner(Path.Combine(installLocation, "venv")); venvRunner.WorkingDirectory = installLocation; + venvRunner.EnvironmentVariables = settingsManager.Settings.EnvironmentVariables; + await venvRunner.Setup(true, onConsoleOutput).ConfigureAwait(false); switch (torchVersion) diff --git a/StabilityMatrix.Core/Models/Packages/VoltaML.cs b/StabilityMatrix.Core/Models/Packages/VoltaML.cs index 95acb970..dba66a52 100644 --- a/StabilityMatrix.Core/Models/Packages/VoltaML.cs +++ b/StabilityMatrix.Core/Models/Packages/VoltaML.cs @@ -21,12 +21,15 @@ public class VoltaML( public override string DisplayName { get; set; } = "VoltaML"; public override string Author => "VoltaML"; public override string LicenseType => "GPL-3.0"; - public override string LicenseUrl => "https://github.com/VoltaML/voltaML-fast-stable-diffusion/blob/main/License"; + public override string LicenseUrl => + "https://github.com/VoltaML/voltaML-fast-stable-diffusion/blob/main/License"; public override string Blurb => "Fast Stable Diffusion with support for AITemplate"; public override string LaunchCommand => "main.py"; public override Uri PreviewImageUri => - new("https://github.com/LykosAI/StabilityMatrix/assets/13956642/d9a908ed-5665-41a5-a380-98458f4679a8"); + new( + "https://github.com/LykosAI/StabilityMatrix/assets/13956642/d9a908ed-5665-41a5-a380-98458f4679a8" + ); public override PackageDifficulty InstallerSortOrder => PackageDifficulty.Simple; @@ -155,6 +158,7 @@ public class VoltaML( progress?.Report(new ProgressReport(-1, "Setting up venv", isIndeterminate: true)); await using var venvRunner = new PyVenvRunner(Path.Combine(installLocation, "venv")); venvRunner.WorkingDirectory = installLocation; + venvRunner.EnvironmentVariables = settingsManager.Settings.EnvironmentVariables; await venvRunner.Setup(true, onConsoleOutput).ConfigureAwait(false);