Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix/fluxgym-update] Fix fluxgym update process #1002

Merged
merged 1 commit into from
Nov 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading