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

v2.12.1 #927

Merged
merged 13 commits into from
Oct 3, 2024
Merged
Show file tree
Hide file tree
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
17 changes: 16 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,21 @@ All notable changes to Stability Matrix will be documented in this file.
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.12.1
### Fixed
- Fixed [#916](https://github.com/LykosAI/StabilityMatrix/issues/916) - InvokeAI failing to install/update on macOS
- Fixed [#914](https://github.com/LykosAI/StabilityMatrix/issues/914) - Unable to use escaped colon `:` character in Inference prompts
- Fixed [#908](https://github.com/LykosAI/StabilityMatrix/issues/908) - Forge unable to use models from "unet" shared folder
- Fixed [#902](https://github.com/LykosAI/StabilityMatrix/issues/902) - Images from shared outputs folder not displaying properly in Stable Diffusion WebUI-UX
- Fixed [#898](https://github.com/LykosAI/StabilityMatrix/issues/898) - Incorrect launch options for RuinedFooocus
- Fixed index url parsing in Python Packages window causing some packages to not have versions available
- Fixed a crash when switching between Model Sharing options for certain packages
### Supporters
#### Visionaries
- A sincere thank you to our valued Visionary-tier Patreon supporter, **Waterclouds**. Your continued support is truly appreciated, and we’re grateful to have you with us on this journey.
#### Pioneers
- We’d also like to extend our gratitude to our Pioneer-tier patrons: **tankfox**, **tanangular**, **Mr. Unknown**, and **Szir777**. Your ongoing support means a great deal to us!

## v2.12.0
### Added
#### New Packages
Expand Down Expand Up @@ -79,7 +94,7 @@ and this project adheres to [Semantic Versioning 2.0](https://semver.org/spec/v2
### Supporters
#### Visionaries
- A heartfelt thank you to our Visionary-tier patron, **Waterclouds**! We greatly appreciate your continued support!
### Pioneers
#### Pioneers
- A special shoutout to our Pioneer-tier patrons: **tankfox**, **tanangular**, **Mr. Unknown**, and **Szir777**! Your unwavering support means a great deal!

## v2.12.0-pre.3
Expand Down
4 changes: 2 additions & 2 deletions StabilityMatrix.Avalonia/Assets/ImagePrompt.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"name": "constant.character.escape.prompt"
}
},
"end": "[-+.!(){}\\[\\]<\\>]",
"end": "[-+.!(){}\\[\\]<\\>:]",
"endCaptures": {
"0": {
"name": "constant.character.escape.target.prompt"
Expand All @@ -35,7 +35,7 @@
"name": "meta.structure.escape.prompt",
"patterns": [
{
"match": "[^-+.!(){}\\[\\]<\\>]",
"match": "[^-+.!(){}\\[\\]<\\>:]",
"name": "invalid.illegal.escape.prompt"
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -451,11 +451,6 @@ public async Task Update()

IsUpdateAvailable = false;
InstalledVersion = Package.Version?.DisplayVersion ?? "Unknown";
notificationService.Show(
Resources.Progress_UpdateComplete,
string.Format(Resources.TextTemplate_PackageUpdatedToLatest, packageName),
NotificationType.Success
);
}
catch (Exception e)
{
Expand Down
10 changes: 10 additions & 0 deletions StabilityMatrix.Core/Helper/FileTransfers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,16 @@ await MoveAllFiles(sourceDir, destinationDir, overwrite, overwriteIfHashMatches)
// Recursively move sub directories
await MoveAllFilesAndDirectories(subDir, destinationSubDir, overwrite, overwriteIfHashMatches)
.ConfigureAwait(false);

if (!subDir.EnumerateFileSystemInfos().Any())
{
subDir.Delete();
}

if (destinationSubDir.Exists)
continue;

destinationSubDir.Create();
}
}

Expand Down
67 changes: 34 additions & 33 deletions StabilityMatrix.Core/Models/Packages/A3WebUI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,41 +47,42 @@ IPrerequisiteHelper prerequisiteHelper
public override Dictionary<SharedFolderType, IReadOnlyList<string>> SharedFolders =>
new()
{
[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" },
[SharedFolderType.LyCORIS] = new[] { "models/LyCORIS" },
[SharedFolderType.ApproxVAE] = new[] { "models/VAE-approx" },
[SharedFolderType.VAE] = new[] { "models/VAE" },
[SharedFolderType.DeepDanbooru] = new[] { "models/deepbooru" },
[SharedFolderType.Karlo] = new[] { "models/karlo" },
[SharedFolderType.TextualInversion] = new[] { "embeddings" },
[SharedFolderType.Hypernetwork] = new[] { "models/hypernetworks" },
[SharedFolderType.ControlNet] = new[] { "models/controlnet/ControlNet" },
[SharedFolderType.Codeformer] = new[] { "models/Codeformer" },
[SharedFolderType.LDSR] = new[] { "models/LDSR" },
[SharedFolderType.AfterDetailer] = new[] { "models/adetailer" },
[SharedFolderType.T2IAdapter] = new[] { "models/controlnet/T2IAdapter" },
[SharedFolderType.IpAdapter] = new[] { "models/controlnet/IpAdapter" },
[SharedFolderType.InvokeIpAdapters15] = new[] { "models/controlnet/DiffusersIpAdapters" },
[SharedFolderType.InvokeIpAdaptersXl] = new[] { "models/controlnet/DiffusersIpAdaptersXL" },
[SharedFolderType.SVD] = new[] { "models/svd" },
[SharedFolderType.CLIP] = new[] { "models/text_encoder" }
[SharedFolderType.StableDiffusion] = ["models/Stable-diffusion/sd"],
[SharedFolderType.ESRGAN] = ["models/ESRGAN"],
[SharedFolderType.GFPGAN] = ["models/GFPGAN"],
[SharedFolderType.RealESRGAN] = ["models/RealESRGAN"],
[SharedFolderType.SwinIR] = ["models/SwinIR"],
[SharedFolderType.Lora] = ["models/Lora"],
[SharedFolderType.LyCORIS] = ["models/LyCORIS"],
[SharedFolderType.ApproxVAE] = ["models/VAE-approx"],
[SharedFolderType.VAE] = ["models/VAE"],
[SharedFolderType.DeepDanbooru] = ["models/deepbooru"],
[SharedFolderType.Karlo] = ["models/karlo"],
[SharedFolderType.TextualInversion] = ["embeddings"],
[SharedFolderType.Hypernetwork] = ["models/hypernetworks"],
[SharedFolderType.ControlNet] = ["models/controlnet/ControlNet"],
[SharedFolderType.Codeformer] = ["models/Codeformer"],
[SharedFolderType.LDSR] = ["models/LDSR"],
[SharedFolderType.AfterDetailer] = ["models/adetailer"],
[SharedFolderType.T2IAdapter] = ["models/controlnet/T2IAdapter"],
[SharedFolderType.IpAdapter] = ["models/controlnet/IpAdapter"],
[SharedFolderType.InvokeIpAdapters15] = ["models/controlnet/DiffusersIpAdapters"],
[SharedFolderType.InvokeIpAdaptersXl] = ["models/controlnet/DiffusersIpAdaptersXL"],
[SharedFolderType.SVD] = ["models/svd"],
[SharedFolderType.CLIP] = ["models/text_encoder"],
[SharedFolderType.Unet] = ["models/Stable-diffusion/unet"],
};

public override Dictionary<SharedOutputType, IReadOnlyList<string>>? SharedOutputFolders =>
new()
{
[SharedOutputType.Extras] = new[] { "outputs/extras-images" },
[SharedOutputType.Saved] = new[] { "log/images" },
[SharedOutputType.Img2Img] = new[] { "outputs/img2img-images" },
[SharedOutputType.Text2Img] = new[] { "outputs/txt2img-images" },
[SharedOutputType.Img2ImgGrids] = new[] { "outputs/img2img-grids" },
[SharedOutputType.Text2ImgGrids] = new[] { "outputs/txt2img-grids" },
[SharedOutputType.SVD] = new[] { "outputs/svd" }
[SharedOutputType.Extras] = ["outputs/extras-images"],
[SharedOutputType.Saved] = ["log/images"],
[SharedOutputType.Img2Img] = ["outputs/img2img-images"],
[SharedOutputType.Text2Img] = ["outputs/txt2img-images"],
[SharedOutputType.Img2ImgGrids] = ["outputs/img2img-grids"],
[SharedOutputType.Text2ImgGrids] = ["outputs/txt2img-grids"],
[SharedOutputType.SVD] = ["outputs/svd"]
};

[SuppressMessage("ReSharper", "ArrangeObjectCreationWhenTypeNotEvident")]
Expand All @@ -101,7 +102,7 @@ IPrerequisiteHelper prerequisiteHelper
DefaultValue = "7860",
Options = ["--port"]
},
new LaunchOptionDefinition
new()
{
Name = "Share",
Type = LaunchOptionType.Bool,
Expand Down Expand Up @@ -181,10 +182,10 @@ IPrerequisiteHelper prerequisiteHelper
];

public override IEnumerable<SharedFolderMethod> AvailableSharedFolderMethods =>
new[] { SharedFolderMethod.Symlink, SharedFolderMethod.None };
[SharedFolderMethod.Symlink, SharedFolderMethod.None];

public override IEnumerable<TorchIndex> AvailableTorchIndices =>
new[] { TorchIndex.Cpu, TorchIndex.Cuda, TorchIndex.Rocm, TorchIndex.Mps };
[TorchIndex.Cpu, TorchIndex.Cuda, TorchIndex.Rocm, TorchIndex.Mps];

public override string MainBranch => "master";

Expand Down
6 changes: 0 additions & 6 deletions StabilityMatrix.Core/Models/Packages/Fooocus.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,6 @@ IPrerequisiteHelper prerequisiteHelper
Options = { "--language" }
},
new LaunchOptionDefinition
{
Name = "Auto-Launch",
Type = LaunchOptionType.Bool,
Options = { "--auto-launch" }
},
new LaunchOptionDefinition
{
Name = "Disable Image Log",
Type = LaunchOptionType.Bool,
Expand Down
20 changes: 4 additions & 16 deletions StabilityMatrix.Core/Models/Packages/InvokeAI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,10 @@ await SetupAndBuildInvokeFrontend(
torchInstallArgs = torchInstallArgs.WithUserOverrides(installedPackage.PipOverrides);
}

await venvRunner.PipInstall(torchInstallArgs, onConsoleOutput).ConfigureAwait(false);
if (torchInstallArgs.Arguments.Count > 0)
{
await venvRunner.PipInstall(torchInstallArgs, onConsoleOutput).ConfigureAwait(false);
}

await venvRunner
.PipInstall($"{pipCommandArgs}{(exists ? " --upgrade" : "")}", onConsoleOutput)
Expand Down Expand Up @@ -345,21 +348,6 @@ await SetupAndBuildInvokeFrontend(
// above the minimum in invokeai.frontend.install.widgets

var code = $"""
try:
import os
import shutil
from invokeai.frontend.install import widgets

_min_cols = widgets.MIN_COLS
_min_lines = widgets.MIN_LINES

static_size_fn = lambda: os.terminal_size((_min_cols, _min_lines))
shutil.get_terminal_size = static_size_fn
widgets.get_terminal_size = static_size_fn
except Exception as e:
import warnings
warnings.warn('Could not patch terminal size for InvokeAI' + str(e))

import sys
from {split[0]} import {split[1]}
sys.exit({split[1]}())
Expand Down
57 changes: 12 additions & 45 deletions StabilityMatrix.Core/Models/Packages/RuinedFooocus.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,77 +32,44 @@ IPrerequisiteHelper prerequisiteHelper
public override SharedFolderMethod RecommendedSharedFolderMethod => SharedFolderMethod.Symlink;

public override List<LaunchOptionDefinition> LaunchOptions =>
new()
{
new LaunchOptionDefinition
{
Name = "Preset",
Type = LaunchOptionType.Bool,
Options = { "--preset anime", "--preset realistic" }
},
new LaunchOptionDefinition
[
new()
{
Name = "Port",
Type = LaunchOptionType.String,
Description = "Sets the listen port",
Options = { "--port" }
},
new LaunchOptionDefinition
new()
{
Name = "Share",
Type = LaunchOptionType.Bool,
Description = "Set whether to share on Gradio",
Options = { "--share" }
},
new LaunchOptionDefinition
new()
{
Name = "Listen",
Type = LaunchOptionType.String,
Description = "Set the listen interface",
Options = { "--listen" }
},
new LaunchOptionDefinition
new()
{
Name = "Output Directory",
Name = "Auth",
Type = LaunchOptionType.String,
Description = "Override the output directory",
Options = { "--output-directory" }
Description = "Set credentials username/password",
Options = { "--auth" }
},
new()
{
Name = "VRAM",
Type = LaunchOptionType.Bool,
InitialValue = HardwareHelper.IterGpuInfo().Select(gpu => gpu.MemoryLevel).Max() switch
{
MemoryLevel.Low => "--lowvram",
MemoryLevel.Medium => "--normalvram",
_ => null
},
Options = { "--highvram", "--normalvram", "--lowvram", "--novram" }
},
new LaunchOptionDefinition
{
Name = "Use DirectML",
Type = LaunchOptionType.Bool,
Description = "Use pytorch with DirectML support",
InitialValue = HardwareHelper.PreferDirectML(),
Options = { "--directml" }
},
new LaunchOptionDefinition
{
Name = "Disable Xformers",
Type = LaunchOptionType.Bool,
InitialValue = !HardwareHelper.HasNvidiaGpu(),
Options = { "--disable-xformers" }
},
new LaunchOptionDefinition
{
Name = "Auto-Launch",
Name = "No Browser",
Type = LaunchOptionType.Bool,
Options = { "--auto-launch" }
Description = "Do not launch in browser",
Options = { "--nobrowser" }
},
LaunchOptionDefinition.Extras
};
];

public override async Task InstallPackage(
string installLocation,
Expand Down
Loading
Loading