Skip to content

Commit

Permalink
Merge pull request #1002 from NullDev/fix/fluxgym-update
Browse files Browse the repository at this point in the history
[fix/fluxgym-update] Fix fluxgym update process
  • Loading branch information
mohnjiles authored Nov 19, 2024
2 parents fd27b58 + 1e22a60 commit 8d1315b
Showing 1 changed file with 18 additions and 8 deletions.
26 changes: 18 additions & 8 deletions StabilityMatrix.Core/Models/Packages/FluxGym.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,24 @@ public override async Task InstallPackage(
CancellationToken cancellationToken = default
)
{
progress?.Report(new ProgressReport(-1f, "Cloning sd-scripts", isIndeterminate: true));
await prerequisiteHelper
.RunGit(
["clone", "-b", "sd3", "https://github.com/kohya-ss/sd-scripts"],
onConsoleOutput,
installLocation
)
.ConfigureAwait(false);
progress?.Report(new ProgressReport(-1f, "Cloning / updating sd-scripts", isIndeterminate: true));
// check if sd-scripts is already installed - if so: pull, else: clone
if (Directory.Exists(Path.Combine(installLocation, "sd-scripts")))
{
await prerequisiteHelper
.RunGit(["pull"], onConsoleOutput, Path.Combine(installLocation, "sd-scripts"))
.ConfigureAwait(false);
}
else
{
await prerequisiteHelper
.RunGit(
["clone", "-b", "sd3", "https://github.com/kohya-ss/sd-scripts"],
onConsoleOutput,
installLocation
)
.ConfigureAwait(false);
}

progress?.Report(new ProgressReport(-1f, "Setting up venv", isIndeterminate: true));
await using var venvRunner = await SetupVenvPure(installLocation).ConfigureAwait(false);
Expand Down

0 comments on commit 8d1315b

Please sign in to comment.