Browse Source

Merge pull request #590 from ionite34/fix-stuffs

Fixed incorrect output path for A3WebUI
pull/629/head
JT 7 months ago committed by GitHub
parent
commit
60ab7bb3a7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 1
      CHANGELOG.md
  2. 5
      StabilityMatrix.Avalonia/Services/RunningPackageService.cs
  3. 17
      StabilityMatrix.Core/Models/Packages/A3WebUI.cs
  4. 5
      StabilityMatrix.Core/Models/Packages/SDWebForge.cs

1
CHANGELOG.md

@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning 2.0](https://semver.org/spec/v2
- Updated translations for French, Spanish, and Turkish - Updated translations for French, Spanish, and Turkish
### Fixed ### Fixed
- Fixed [#559](https://github.com/LykosAI/StabilityMatrix/issues/559) - "Unable to load bitmap from provided data" error in Checkpoints page - Fixed [#559](https://github.com/LykosAI/StabilityMatrix/issues/559) - "Unable to load bitmap from provided data" error in Checkpoints page
- Fixed [#522](https://github.com/LykosAI/StabilityMatrix/issues/522) - Incorrect output directory path for latest Auto1111
## v2.10.0-pre.2 ## v2.10.0-pre.2
### Added ### Added

5
StabilityMatrix.Avalonia/Services/RunningPackageService.cs

@ -100,6 +100,11 @@ public partial class RunningPackageService(
installedPackage.PreferredSharedFolderMethod ?? basePackage.RecommendedSharedFolderMethod installedPackage.PreferredSharedFolderMethod ?? basePackage.RecommendedSharedFolderMethod
); );
if (installedPackage.UseSharedOutputFolder)
{
await basePackage.SetupOutputFolderLinks(installedPackage.FullPath!);
}
// Load user launch args from settings and convert to string // Load user launch args from settings and convert to string
var userArgs = installedPackage.LaunchArgs ?? []; var userArgs = installedPackage.LaunchArgs ?? [];
var userArgsString = string.Join(" ", userArgs.Select(opt => opt.ToArgString())); var userArgsString = string.Join(" ", userArgs.Select(opt => opt.ToArgString()));

17
StabilityMatrix.Core/Models/Packages/A3WebUI.cs

@ -72,12 +72,12 @@ public class A3WebUI(
public override Dictionary<SharedOutputType, IReadOnlyList<string>>? SharedOutputFolders => public override Dictionary<SharedOutputType, IReadOnlyList<string>>? SharedOutputFolders =>
new() new()
{ {
[SharedOutputType.Extras] = new[] { "outputs/extras-images" }, [SharedOutputType.Extras] = new[] { "output/extras-images" },
[SharedOutputType.Saved] = new[] { "log/images" }, [SharedOutputType.Saved] = new[] { "log/images" },
[SharedOutputType.Img2Img] = new[] { "outputs/img2img-images" }, [SharedOutputType.Img2Img] = new[] { "output/img2img-images" },
[SharedOutputType.Text2Img] = new[] { "outputs/txt2img-images" }, [SharedOutputType.Text2Img] = new[] { "output/txt2img-images" },
[SharedOutputType.Img2ImgGrids] = new[] { "outputs/img2img-grids" }, [SharedOutputType.Img2ImgGrids] = new[] { "output/img2img-grids" },
[SharedOutputType.Text2ImgGrids] = new[] { "outputs/txt2img-grids" } [SharedOutputType.Text2ImgGrids] = new[] { "output/txt2img-grids" }
}; };
[SuppressMessage("ReSharper", "ArrangeObjectCreationWhenTypeNotEvident")] [SuppressMessage("ReSharper", "ArrangeObjectCreationWhenTypeNotEvident")]
@ -184,7 +184,7 @@ public class A3WebUI(
public override string MainBranch => "master"; public override string MainBranch => "master";
public override string OutputFolderName => "outputs"; public override string OutputFolderName => "output";
public override IPackageExtensionManager ExtensionManager => new A3WebUiExtensionManager(this); public override IPackageExtensionManager ExtensionManager => new A3WebUiExtensionManager(this);
@ -294,6 +294,11 @@ public class A3WebUI(
VenvRunner.RunDetached(args.TrimEnd(), HandleConsoleOutput, OnExit); VenvRunner.RunDetached(args.TrimEnd(), HandleConsoleOutput, OnExit);
} }
public override string? ExtraLaunchArguments { get; set; } =
settingsManager.IsLibraryDirSet
? $"--gradio-allowed-path \"{settingsManager.ImagesDirectory}\""
: string.Empty;
private class A3WebUiExtensionManager(A3WebUI package) private class A3WebUiExtensionManager(A3WebUI package)
: GitPackageExtensionManager(package.PrerequisiteHelper) : GitPackageExtensionManager(package.PrerequisiteHelper)
{ {

5
StabilityMatrix.Core/Models/Packages/SDWebForge.cs

@ -178,9 +178,4 @@ public class SDWebForge(
await venvRunner.PipInstall(pipArgs, onConsoleOutput).ConfigureAwait(false); await venvRunner.PipInstall(pipArgs, onConsoleOutput).ConfigureAwait(false);
progress?.Report(new ProgressReport(1f, "Install complete", isIndeterminate: false)); progress?.Report(new ProgressReport(1f, "Install complete", isIndeterminate: false));
} }
public override string? ExtraLaunchArguments { get; set; } =
settingsManager.IsLibraryDirSet
? $"--gradio-allowed-path \"{settingsManager.ImagesDirectory}\""
: string.Empty;
} }

Loading…
Cancel
Save