Skip to content

Commit

Permalink
Merge pull request #514 from ionite34/fix-extension-dialog
Browse files Browse the repository at this point in the history
Fixed extension modification dialog not showing any progress messages…
  • Loading branch information
mohnjiles authored Feb 9, 2024
2 parents dfc27fc + 59af8bc commit 269a912
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 7 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning 2.0](https://semver.org/spec/v2.0.0.html).

## v2.8.2
### Added
- Added missing GFPGAN link to Automatic1111 packages
### Fixed
- Fixed Inference Image to Image Denoise setting becoming hidden after changing schedulers
- Fixed Inference ControlNet models showing as downloadable even when they are already installed
- Fixed Inference Sampler Addon conditioning not applying (i.e. ControlNet)
- Fixed extension modification dialog not showing any progress messages

## v2.8.1
### Fixed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,12 @@ public async Task InstallSelectedExtensions()
.Cast<IPackageStep>()
.ToArray();

var runner = new PackageModificationRunner { ShowDialogOnStart = true };
var runner = new PackageModificationRunner
{
ShowDialogOnStart = true,
ModificationCompleteTitle = "Installed Extensions",
ModificationCompleteMessage = "Finished installing extensions"
};
EventManager.Instance.OnPackageInstallProgressAdded(runner);

await runner.ExecuteSteps(steps);
Expand Down Expand Up @@ -209,7 +214,12 @@ public async Task UpdateSelectedExtensions()
.Cast<IPackageStep>()
.ToArray();

var runner = new PackageModificationRunner { ShowDialogOnStart = true };
var runner = new PackageModificationRunner
{
ShowDialogOnStart = true,
ModificationCompleteTitle = "Updated Extensions",
ModificationCompleteMessage = "Finished updating extensions"
};
EventManager.Instance.OnPackageInstallProgressAdded(runner);

await runner.ExecuteSteps(steps);
Expand Down Expand Up @@ -239,7 +249,12 @@ public async Task UninstallSelectedExtensions()
.Cast<IPackageStep>()
.ToArray();

var runner = new PackageModificationRunner { ShowDialogOnStart = true };
var runner = new PackageModificationRunner
{
ShowDialogOnStart = true,
ModificationCompleteTitle = "Uninstalled Extensions",
ModificationCompleteMessage = "Finished uninstalling extensions"
};
EventManager.Instance.OnPackageInstallProgressAdded(runner);

await runner.ExecuteSteps(steps);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ public async Task ExecuteSteps(IReadOnlyList<IPackageStep> steps)
ConsoleOutput.Add(report.Message);
}

if (!string.IsNullOrWhiteSpace(report.Title))
{
ConsoleOutput.Add(report.Title);
}

OnProgressChanged(report);
});

Expand Down
1 change: 1 addition & 0 deletions StabilityMatrix.Core/Models/Packages/A3WebUI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ IPrerequisiteHelper prerequisiteHelper
{
[SharedFolderType.StableDiffusion] = new[] { "models/Stable-diffusion" },
[SharedFolderType.ESRGAN] = new[] { "models/ESRGAN" },
[SharedFolderType.GFPGAN] = new[] { "models/GFPGAN" },
[SharedFolderType.RealESRGAN] = new[] { "models/RealESRGAN" },
[SharedFolderType.SwinIR] = new[] { "models/SwinIR" },
[SharedFolderType.Lora] = new[] { "models/Lora" },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,13 +155,15 @@ public virtual async Task InstallExtensionAsync(
{
cancellationToken.ThrowIfCancellationRequested();

progress?.Report(new ProgressReport(0f, $"Cloning {repositoryUri}", isIndeterminate: true));
progress?.Report(
new ProgressReport(0f, message: $"Cloning {repositoryUri}", isIndeterminate: true)
);

await prerequisiteHelper
.CloneGitRepository(cloneRoot, repositoryUri.ToString(), version)
.ConfigureAwait(false);

progress?.Report(new ProgressReport(1f, $"Cloned {repositoryUri}"));
progress?.Report(new ProgressReport(1f, message: $"Cloned {repositoryUri}"));
}
}

Expand Down Expand Up @@ -191,7 +193,11 @@ public virtual async Task UpdateExtensionAsync(
.ConfigureAwait(false);

progress?.Report(
new ProgressReport(0f, $"Updating git repository {repoPath.Name}", isIndeterminate: true)
new ProgressReport(
0f,
message: $"Updating git repository {repoPath.Name}",
isIndeterminate: true
)
);

// If version not provided, use current branch
Expand All @@ -206,7 +212,7 @@ await prerequisiteHelper
.UpdateGitRepository(repoPath, remoteUrlResult.StandardOutput!.Trim(), version)
.ConfigureAwait(false);

progress?.Report(new ProgressReport(1f, $"Updated git repository {repoPath.Name}"));
progress?.Report(new ProgressReport(1f, message: $"Updated git repository {repoPath.Name}"));
}
}

Expand All @@ -233,5 +239,7 @@ await directoryPath
await path.DeleteAsync().ConfigureAwait(false);
}
}

progress?.Report(new ProgressReport(1f, message: "Uninstalled extension"));
}
}

0 comments on commit 269a912

Please sign in to comment.