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.13.3 #1131

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open

v2.13.3 #1131

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
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,24 @@ 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.13.3
### Added
- Added Safetensor Metadata viewer to the Checkpoint Manager context menu - thanks to @genteure!
### Changed
- "Remove symbolic links on shutdown" option now also removes links from Output Sharing
### Fixed
- Fixed [#1083](https://github.com/LykosAI/StabilityMatrix/issues/1083) - "Show Nested Models" incorrectly displaying models from some non-nested folders
- Fixed [#1120](https://github.com/LykosAI/StabilityMatrix/issues/1120) - crash when right clicking in the console after restarting a package
- Fixed issue with InvokeAI model sharing when the host address is set to 0.0.0.0
- Fixed issue when parsing index URLs in Python Dependencies Override menu
- Fixed issue where models were filtered incorrectly in the Checkpoint Manager
- Fixed ComfyUI-Zluda not using the user-defined pip overrides
### Supporters
#### Visionaries
- A heartfelt thank you to our incredible Visionary-tier Patrons, **Waterclouds**, **TheTekknician**, and **Corey**! Your unwavering support means the world to us!
#### Pioneers
- A big shoutout to our outstanding Pioneer-tier Patrons, **tankfox**, **Mr. Unknown**, **Szir777**, and **NowFallenAngel**! We deeply appreciate your ongoing support and dedication!

## v2.13.2
### Changed
- Removed SimpleSDXL due to security concerns - thanks to @iwr-redmond for the detailed report. For more information please visit https://github.com/LykosAI/StabilityMatrix/security/advisories.
Expand Down
2 changes: 0 additions & 2 deletions StabilityMatrix.Avalonia/App.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@
<SolidColorBrush x:Key="ToolTipBackground" Color="#1E1F22" />
<SolidColorBrush x:Key="ToolTipForeground" Color="#9FBDC3" />
<FontFamily x:Key="NotoSansJP">avares://StabilityMatrix.Avalonia/Assets/Fonts/NotoSansJP#Noto Sans JP</FontFamily>

<PathIcon x:Key="OpenAiIcon" Data="F1 M925.8 456.3C936.2 479.5 942.8 504.3 945.5 529.6C948.1 554.9 946.8 580.5 941.4 605.4C936.1 630.3 926.9 654.2 914.1 676.2C905.7 690.9 895.8 704.7 884.4 717.4C873.1 730 860.5 741.4 846.8 751.4C833 761.4 818.3 769.8 802.7 776.7C787.2 783.5 771 788.7 754.4 792.1C746.6 816.3 735 839.2 720 859.8C705.1 880.4 687 898.5 666.4 913.4C645.8 928.4 623 940 598.8 947.8C574.6 955.7 549.3 959.6 523.8 959.6C506.9 959.7 489.9 957.9 473.3 954.5C456.8 951 440.6 945.7 425.1 938.8C409.6 931.9 394.9 923.3 381.2 913.3C367.6 903.3 355 891.8 343.8 879.1C318.8 884.5 293.2 885.8 267.9 883.2C242.6 880.5 217.8 873.9 194.5 863.5C171.3 853.2 149.8 839.2 130.9 822.1C112 805 95.9001 785 83.2001 763C74.7001 748.3 67.7001 732.8 62.4001 716.7C57.1001 700.6 53.6001 684 51.8001 667.1C50.0001 650.3 50.1001 633.3 51.9001 616.4C53.7001 599.6 57.4001 583 62.7001 566.9C45.7001 548 31.7001 526.5 21.3001 503.3C11.0001 480 4.30011 455.3 1.70011 430C-0.999887 404.7 0.400113 379.1 5.70011 354.2C11.0001 329.3 20.2001 305.4 33.0001 283.4C41.4001 268.7 51.3001 254.8 62.6001 242.2C73.9001 229.6 86.6001 218.2 100.3 208.2C114 198.2 128.8 189.7 144.3 182.9C159.9 176 176.1 170.9 192.7 167.5C200.5 143.2 212.1 120.4 227 99.8C242 79.2 260.1 61.1 280.7 46.1C301.3 31.2 324.1 19.6 348.3 11.7C372.5 3.89997 397.8 -0.10003 423.3 -2.95639e-05C440.2 -0.10003 457.2 1.59997 473.8 5.09997C490.4 8.59997 506.6 13.8 522.1 20.7C537.6 27.7 552.3 36.2 566 46.2C579.7 56.3 592.3 67.7 603.5 80.4C628.4 75.1 654 73.8 679.3 76.4C704.6 79 729.3 85.7 752.6 96C775.8 106.4 797.3 120.3 816.2 137.4C835.1 154.4 851.2 174.3 863.9 196.4C872.4 211 879.4 226.5 884.7 242.7C890 258.8 893.6 275.4 895.3 292.3C897.1 309.2 897.1 326.2 895.2 343.1C893.4 360 889.7 376.6 884.4 392.7C901.5 411.6 915.4 433 925.8 456.3L925.8 456.3ZM592.6 883.2C614.4 874.2 634.2 860.9 650.9 844.2C667.6 827.5 680.9 807.7 689.9 785.8C698.9 764 703.6 740.6 703.6 717L703.6 494Q703.5 493.7 703.4 493.3Q703.3 493 703.1 492.7Q702.9 492.4 702.6 492.2Q702.3 491.9 702 491.8L621.3 445.2L621.3 714.6C621.3 717.3 620.9 720.1 620.2 722.7C619.5 725.4 618.5 727.9 617.1 730.3C615.7 732.7 614.1 734.9 612.1 736.8Q610.642 738.253 609.01 739.508Q607.379 740.763 605.6 741.8L414.5 852.1C412.9 853.1 410.2 854.5 408.8 855.3C416.7 862 425.3 867.9 434.3 873.1C443.4 878.3 452.8 882.7 462.6 886.3C472.4 889.8 482.5 892.5 492.7 894.3C503 896.1 513.4 897 523.8 897C547.4 897 570.8 892.3 592.6 883.2L592.6 883.2ZM137.5 731.8C149.4 752.3 165.1 770.1 183.8 784.5C202.6 798.9 223.9 809.4 246.7 815.5C269.5 821.6 293.3 823.2 316.7 820.1C340.1 817 362.6 809.4 383.1 797.6L576.3 686.1L576.8 685.6Q577 685.4 577.1 685Q577.3 684.7 577.4 684.4L577.4 590.4L344.2 725.3C341.8 726.7 339.3 727.7 336.7 728.5C334 729.2 331.3 729.5 328.5 729.5C325.8 729.5 323.1 729.2 320.4 728.5C317.8 727.7 315.2 726.7 312.8 725.3L121.7 614.9C120 613.9 117.5 612.4 116.1 611.5C114.3 621.8 113.4 632.2 113.4 642.6C113.4 653 114.4 663.4 116.2 673.7C118 683.9 120.8 694 124.3 703.8C127.9 713.6 132.3 723 137.5 732L137.5 731.8ZM87.3 314.8C75.5 335.3 67.9 357.9 64.8 381.3C61.7 404.7 63.3 428.4 69.4 451.3C75.5 474.1 86 495.4 100.4 514.2C114.8 532.9 132.7 548.6 153.1 560.4L346.2 672Q346.5 672.1 346.9 672.2L347.6 672.2Q348 672.2 348.3 672Q348.6 671.9 348.9 671.7L429.9 624.9L196.7 490.3C194.4 488.9 192.2 487.2 190.2 485.3Q188.747 483.842 187.492 482.21Q186.236 480.579 185.2 478.8C183.9 476.4 182.8 473.9 182.1 471.2C181.4 468.6 181 465.9 181.1 463.1L181.1 236C171.3 239.6 161.8 244 152.8 249.2C143.8 254.5 135.3 260.5 127.3 267.2C119.4 273.9 112 281.3 105.3 289.3C98.6 297.2 92.7 305.8 87.5 314.8L87.3 314.8ZM750.6 469.2C753 470.6 755.2 472.2 757.2 474.2C759.1 476.1 760.8 478.3 762.2 480.7C763.5 483.1 764.6 485.7 765.3 488.3C765.9 491 766.3 493.7 766.2 496.5L766.2 723.6C798.3 711.8 826.3 691.1 847 663.9C867.8 636.7 880.3 604.2 883.2 570.2C886.1 536.2 879.3 502 863.5 471.7C847.7 441.4 823.6 416.2 794 399.2L600.9 287.6Q600.6 287.5 600.2 287.4L599.5 287.4Q599.2 287.5 598.8 287.6Q598.5 287.7 598.2 287.9L517.6 334.5L750.8 469.2L750.6 469.2ZM831.1 348.2L831 348.2L831 348.3L831.1 348.2ZM831 348.1C836.8 314.5 832.9 279.9 819.7 248.4C806.6 216.9 784.7 189.8 756.7 170.2C728.7 150.7 695.7 139.5 661.6 138C627.4 136.6 593.6 144.9 564 161.9L370.9 273.4Q370.6 273.6 370.4 273.9L370 274.5Q369.9 274.8 369.8 275.2Q369.7 275.5 369.7 275.9L369.7 369.1L602.9 234.4C605.3 233 607.9 232 610.5 231.2C613.2 230.5 615.9 230.2 618.6 230.2C621.4 230.2 624.1 230.5 626.8 231.2C629.4 232 631.9 233 634.3 234.4L825.4 344.8C827.1 345.8 829.6 347.2 831 348.1ZM325.7 244.9C325.7 242.2 326.1 239.5 326.8 236.8C327.5 234.2 328.5 231.6 329.9 229.2C331.3 226.9 332.9 224.7 334.9 222.7C336.8 220.8 339 219.1 341.4 217.8L532.5 107.5C534.3 106.4 536.8 105 538.2 104.3C512 82.3999 480 68.3999 446.1 64.0999C412.2 59.6999 377.8 65.0999 346.9 79.5999C315.9 94.0999 289.7 117.2 271.4 146C253.1 174.9 243.4 208.3 243.4 242.5L243.4 465.5Q243.5 465.9 243.6 466.2Q243.7 466.5 243.9 466.8Q244.1 467.1 244.4 467.4Q244.6 467.6 245 467.8L325.7 514.4L325.7 244.9ZM369.5 539.6L473.4 599.6L577.3 539.6L577.3 419.7L473.5 359.7L369.6 419.7L369.5 539.6Z" />
</ResourceDictionary>
</Application.Resources>

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions StabilityMatrix.Avalonia/Languages/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions StabilityMatrix.Avalonia/Languages/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -418,10 +418,10 @@
<value>Checkpoint Manager</value>
</data>
<data name="Label_RemoveSymlinksOnShutdown" xml:space="preserve">
<value>Remove shared checkpoints directory symbolic links on shutdown</value>
<value>Remove shared folder symbolic links on shutdown</value>
</data>
<data name="Label_RemoveSymlinksOnShutdown_Details" xml:space="preserve">
<value>Select this option if you&apos;re having problems moving Stability Matrix to another drive</value>
<value>Removes both model and output folder symbolic links when closing Stability Matrix. Select this option if you're having problems moving Stability Matrix to another drive</value>
</data>
<data name="Label_ResetCheckpointsCache" xml:space="preserve">
<value>Reset Checkpoints Cache</value>
Expand Down
1 change: 1 addition & 0 deletions StabilityMatrix.Avalonia/StabilityMatrix.Avalonia.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@
<AvaloniaResource Include="Assets\hf-packages.json" />
<AvaloniaResource Include="Assets\santahat.png" />
<AvaloniaResource Include="Assets\markdown.css" />
<AvaloniaResource Include="Assets\openai-white-logomark.png" />
</ItemGroup>

<ItemGroup>
Expand Down
29 changes: 22 additions & 7 deletions StabilityMatrix.Avalonia/ViewModels/CheckpointsPageViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1041,8 +1041,9 @@ private bool FilterModels(LocalModelFile file)
{
if (SelectedCategory?.Path is null || SelectedCategory?.Path == settingsManager.ModelsDirectory)
return file.HasConnectedModel
? SelectedBaseModels.Contains(file.ConnectedModelInfo.BaseModel ?? "Other")
: SelectedBaseModels.Contains("Other");
? SelectedBaseModels.Count == 0
|| SelectedBaseModels.Contains(file.ConnectedModelInfo.BaseModel ?? "Other")
: SelectedBaseModels.Count == 0 || SelectedBaseModels.Contains("Other");

var folderPath = Path.GetDirectoryName(file.RelativePath);
var categoryRelativePath = SelectedCategory
Expand All @@ -1056,16 +1057,30 @@ private bool FilterModels(LocalModelFile file)
if (
(
file.HasConnectedModel
? SelectedBaseModels.Contains(file.ConnectedModelInfo?.BaseModel ?? "Other")
: SelectedBaseModels.Contains("Other")
? SelectedBaseModels.Count == 0
|| SelectedBaseModels.Contains(file.ConnectedModelInfo?.BaseModel ?? "Other")
: SelectedBaseModels.Count == 0 || SelectedBaseModels.Contains("Other")
)
is false
)
return false;

return ShowModelsInSubfolders
? folderPath.StartsWith(categoryRelativePath)
: categoryRelativePath.Equals(folderPath);
// If not showing nested models, just check if the file is directly in this folder
if (!ShowModelsInSubfolders)
return categoryRelativePath.Equals(folderPath, StringComparison.OrdinalIgnoreCase);

// Split paths into segments
var categorySegments = categoryRelativePath.Split(Path.DirectorySeparatorChar);
var folderSegments = folderPath.Split(Path.DirectorySeparatorChar);

// Check if folder is a subfolder of category by comparing path segments
if (folderSegments.Length < categorySegments.Length)
return false;

// Compare each segment of the category path with the folder path
return !categorySegments
.Where((t, i) => !t.Equals(folderSegments[i], StringComparison.OrdinalIgnoreCase))
.Any();
}

private bool FilterCategories(CheckpointCategory category)
Expand Down
7 changes: 5 additions & 2 deletions StabilityMatrix.Avalonia/Views/ConsoleOutputPage.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,11 @@
<MenuItem
Command="{Binding SearchWithChatGptCommand}"
CommandParameter="{Binding ., ElementName=Console}"
Header="Search with ChatGPT"
Icon="{StaticResource OpenAiIcon}" />
Header="Search with ChatGPT">
<MenuItem.Icon>
<controls:BetterAdvancedImage Source="avares://StabilityMatrix.Avalonia/Assets/openai-white-logomark.png" />
</MenuItem.Icon>
</MenuItem>
</MenuFlyout>
</avaloniaEdit:TextEditor.ContextFlyout>
</avaloniaEdit:TextEditor>
Expand Down
6 changes: 6 additions & 0 deletions StabilityMatrix.Core/Helper/SharedFolders.cs
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,12 @@ public void RemoveLinksForAllPackages()
.RemoveModelFolderLinks(package.FullPath, sharedFolderMethod)
.GetAwaiter()
.GetResult();

// Remove output folder links if enabled
if (package.UseSharedOutputFolder)
{
basePackage.RemoveOutputFolderLinks(package.FullPath).GetAwaiter().GetResult();
}
}
catch (Exception e)
{
Expand Down
2 changes: 1 addition & 1 deletion StabilityMatrix.Core/Models/Packages/A3WebUI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ IPrerequisiteHelper prerequisiteHelper
new("https://github.com/AUTOMATIC1111/stable-diffusion-webui/raw/master/screenshot.png");
public string RelativeArgsDefinitionScriptPath => "modules.cmd_args";

public override PackageDifficulty InstallerSortOrder => PackageDifficulty.Recommended;
public override PackageDifficulty InstallerSortOrder => PackageDifficulty.Simple;

public override SharedFolderMethod RecommendedSharedFolderMethod => SharedFolderMethod.Symlink;

Expand Down
5 changes: 5 additions & 0 deletions StabilityMatrix.Core/Models/Packages/ComfyZluda.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ await requirements.ReadAllTextAsync(cancellationToken).ConfigureAwait(false),

pipArgs = pipArgs.AddArg("numpy==1.26.0");

if (installedPackage.PipOverrides != null)
{
pipArgs = pipArgs.WithUserOverrides(installedPackage.PipOverrides);
}

progress?.Report(
new ProgressReport(-1f, "Installing Package Requirements...", isIndeterminate: true)
);
Expand Down
85 changes: 30 additions & 55 deletions StabilityMatrix.Core/Models/Packages/InvokeAI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public class InvokeAI : BaseGitPackage
{
private static readonly Logger Logger = LogManager.GetCurrentClassLogger();
private const string RelativeRootPath = "invokeai-root";
private string RelativeFrontendBuildPath = Path.Combine("invokeai", "frontend", "web", "dist");
private readonly string relativeFrontendBuildPath = Path.Combine("invokeai", "frontend", "web", "dist");

public override string Name => "InvokeAI";
public override string DisplayName { get; set; } = "InvokeAI";
Expand All @@ -35,7 +35,7 @@ public class InvokeAI : BaseGitPackage
public override PackageDifficulty InstallerSortOrder => PackageDifficulty.Nightmare;

public override IReadOnlyList<string> ExtraLaunchCommands =>
new[] { "invokeai-db-maintenance", "invokeai-import-images", };
["invokeai-db-maintenance", "invokeai-import-images"];

public override Uri PreviewImageUri =>
new("https://raw.githubusercontent.com/invoke-ai/InvokeAI/main/docs/assets/canvas_preview.png");
Expand All @@ -57,80 +57,50 @@ IPrerequisiteHelper prerequisiteHelper
public override Dictionary<SharedFolderType, IReadOnlyList<string>> SharedFolders =>
new()
{
[SharedFolderType.StableDiffusion] = new[]
{
Path.Combine(RelativeRootPath, "autoimport", "main")
},
[SharedFolderType.Lora] = new[] { Path.Combine(RelativeRootPath, "autoimport", "lora") },
[SharedFolderType.TextualInversion] = new[]
{
Path.Combine(RelativeRootPath, "autoimport", "embedding")
},
[SharedFolderType.ControlNet] = new[]
{
Path.Combine(RelativeRootPath, "autoimport", "controlnet")
},
[SharedFolderType.InvokeIpAdapters15] = new[]
{
[SharedFolderType.StableDiffusion] = [Path.Combine(RelativeRootPath, "autoimport", "main")],
[SharedFolderType.Lora] = [Path.Combine(RelativeRootPath, "autoimport", "lora")],
[SharedFolderType.TextualInversion] = [Path.Combine(RelativeRootPath, "autoimport", "embedding")],
[SharedFolderType.ControlNet] = [Path.Combine(RelativeRootPath, "autoimport", "controlnet")],
[SharedFolderType.InvokeIpAdapters15] =
[
Path.Combine(RelativeRootPath, "models", "sd-1", "ip_adapter")
},
[SharedFolderType.InvokeIpAdaptersXl] = new[]
{
],
[SharedFolderType.InvokeIpAdaptersXl] =
[
Path.Combine(RelativeRootPath, "models", "sdxl", "ip_adapter")
},
[SharedFolderType.InvokeClipVision] = new[]
{
],
[SharedFolderType.InvokeClipVision] =
[
Path.Combine(RelativeRootPath, "models", "any", "clip_vision")
},
[SharedFolderType.T2IAdapter] = new[]
{
Path.Combine(RelativeRootPath, "autoimport", "t2i_adapter")
}
],
[SharedFolderType.T2IAdapter] = [Path.Combine(RelativeRootPath, "autoimport", "t2i_adapter")]
};

public override Dictionary<SharedOutputType, IReadOnlyList<string>>? SharedOutputFolders =>
new() { [SharedOutputType.Text2Img] = new[] { Path.Combine("invokeai-root", "outputs", "images") } };
new() { [SharedOutputType.Text2Img] = [Path.Combine("invokeai-root", "outputs", "images")] };

public override string OutputFolderName => Path.Combine("invokeai-root", "outputs", "images");

// https://github.com/invoke-ai/InvokeAI/blob/main/docs/features/CONFIGURATION.md
public override List<LaunchOptionDefinition> LaunchOptions =>
[
new LaunchOptionDefinition
{
Name = "Host",
Type = LaunchOptionType.String,
DefaultValue = "localhost",
Options = ["--host"]
},
new LaunchOptionDefinition
new()
{
Name = "Port",
Name = "Root Directory",
Type = LaunchOptionType.String,
DefaultValue = "9090",
Options = ["--port"]
Options = ["--root"]
},
new LaunchOptionDefinition
new()
{
Name = "Allow Origins",
Description =
"List of host names or IP addresses that are allowed to connect to the "
+ "InvokeAI API in the format ['host1','host2',...]",
Name = "Config File",
Type = LaunchOptionType.String,
DefaultValue = "[]",
Options = ["--allow-origins"]
},
new LaunchOptionDefinition
{
Name = "Precision",
Type = LaunchOptionType.Bool,
Options = ["--precision auto", "--precision float16", "--precision float32"]
Options = ["--config"]
},
LaunchOptionDefinition.Extras
];

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

public override TorchIndex GetRecommendedTorchVersion()
{
Expand Down Expand Up @@ -325,7 +295,7 @@ private async Task RunInvokeCommand(
VenvRunner.UpdateEnvironmentVariables(env => GetEnvVars(env, installedPackagePath));

// fix frontend build missing for people who updated to v3.6 before the fix
var frontendExistsPath = Path.Combine(installedPackagePath, RelativeFrontendBuildPath);
var frontendExistsPath = Path.Combine(installedPackagePath, relativeFrontendBuildPath);
if (!Directory.Exists(frontendExistsPath))
{
await SetupAndBuildInvokeFrontend(
Expand Down Expand Up @@ -422,6 +392,11 @@ ProcessOutput s
)
{
var invokeAiUrl = match.Value;
if (invokeAiUrl.Contains("0.0.0.0"))
{
invokeAiUrl = invokeAiUrl.Replace("0.0.0.0", "127.0.0.1");
}

var invokeAiApi = RestService.For<IInvokeAiApi>(
invokeAiUrl,
new RefitSettings
Expand Down
Loading
Loading