Browse Source

Merge pull request #602 from ionite34/actually-use-env-vars

Actually use the environment variables during install
pull/629/head
JT 7 months ago committed by GitHub
parent
commit
42545f03f3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 1
      CHANGELOG.md
  2. 2
      StabilityMatrix.Core/Models/Packages/A3WebUI.cs
  3. 4
      StabilityMatrix.Core/Models/Packages/ComfyUI.cs
  4. 1
      StabilityMatrix.Core/Models/Packages/Fooocus.cs
  5. 1
      StabilityMatrix.Core/Models/Packages/FooocusMre.cs
  6. 3
      StabilityMatrix.Core/Models/Packages/KohyaSs.cs
  7. 2
      StabilityMatrix.Core/Models/Packages/OneTrainer.cs
  8. 1
      StabilityMatrix.Core/Models/Packages/RuinedFooocus.cs
  9. 2
      StabilityMatrix.Core/Models/Packages/SDWebForge.cs
  10. 2
      StabilityMatrix.Core/Models/Packages/StableDiffusionDirectMl.cs
  11. 2
      StabilityMatrix.Core/Models/Packages/StableDiffusionUx.cs
  12. 8
      StabilityMatrix.Core/Models/Packages/VoltaML.cs

1
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

2
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);

4
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));

1
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));

1
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));

3
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

2
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));

1
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));

2
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);

2
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)

2
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)

8
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);

Loading…
Cancel
Save