Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
mohnjiles committed Jul 28, 2024
2 parents a106193 + cc2f261 commit da5b06d
Show file tree
Hide file tree
Showing 32 changed files with 528 additions and 114 deletions.
62 changes: 62 additions & 0 deletions .github/ISSUE_TEMPLATE/1-bug.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Bug report
description: Submit a bug report
labels: ["bug", "triage"]
body:
- type: markdown
attributes:
value: |
**New to Stability Matrix?**
For help or advice on using Stability Matrix, try one of the following options instead of opening a GitHub issue:
- Asking on our [Discord server](https://link.lykos.ai/discord?ref=github-issue-template)
- Creating a post on [Discussions](https://github.com/LykosAI/StabilityMatrix/discussions)
This template is for reporting bugs experienced within the Stability Matrix app.
If your issue is regarding Package behavior when running it, or when installing or updating a specific Package, please use the [Package issue template](https://github.com/LykosAI/StabilityMatrix/issues/new/choose) instead.
Make sure to also search the [existing issues](https://github.com/LykosAI/StabilityMatrix/issues) to see if your issue has already been reported.
- type: textarea
id: what-happened
attributes:
label: What happened?
description: Give a clear and concise description of what happened. Provide screenshots or videos of UI if necessary. Also tell us, what did you expect to happen?
placeholder: |
When dragging a model file into the ... page to import, I expected to see...
Instead, I saw...
validations:
required: true
- type: textarea
id: how-to-reproduce
attributes:
label: Steps to reproduce
description: Include a minimal step-by-step guide to reproduce the issue if possible.
placeholder: |
1. Open Stability Matrix
2. Go to the ... page
3. Click on the ... button
4. Expected to see ... open, but instead ...
- type: textarea
id: app-logs
attributes:
label: Relevant logs
description: Please copy and paste any relevant log output. (This will be automatically formatted, so no need for backticks.)
render: shell
- type: input
id: version
attributes:
label: Version
description: What version of Stability Matrix are you running? (Can be found at the bottom of the settings page)
placeholder: ex. v2.11.0
validations:
required: true
- type: dropdown
id: os-platform
attributes:
label: What Operating System are you using?
options:
- Windows
- macOS
- Linux
- Other
validations:
required: true
58 changes: 58 additions & 0 deletions .github/ISSUE_TEMPLATE/2-bug-crash.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Crash report
description: A crash of Stability Matrix, likely with the "An unexpected error occurred" dialog
labels: ["bug", "crash", "triage"]
body:
- type: markdown
attributes:
value: |
This template is for reporting crashes of Stability Matrix, likely with the "An unexpected error occurred" dialog.
If you are experiencing a different issue, please use the [Bug Report or Package Issue templates](https://github.com/LykosAI/StabilityMatrix/issues/new/choose).
- type: textarea
id: what-happened
attributes:
label: What happened?
description: Give a clear and concise description of what happened. Include some minimal steps to reproducible the issue if possible.
placeholder: |
1. Open Stability Matrix
2. Go to the "..." page
3. Click on the "..." button
4. See the crash
validations:
required: true
- type: textarea
id: exception-details
attributes:
label: Exception Details
description: Please click the "Copy Details" button on the crash dialog and paste the details exactly as formatted here.
placeholder: |
## Exception
OperationCanceledException: Example Message
### Sentry ID
```
bc7da9b2fcc3e3568ceb81a72f3a128d
```
### Stack Trace
```
at StabilityMatrix.Avalonia.ViewModels.Settings.MainSettingsViewModel.DebugThrowException() in MainSettingsViewModel.cs:line 716
at CommunityToolkit.Mvvm.Input.RelayCommand.Execute(Object parameter)
...
```
- type: input
id: version
attributes:
label: Version
description: What version of Stability Matrix are you running? (Can be found at the bottom of the settings page)
placeholder: ex. v2.11.0
validations:
required: true
- type: dropdown
id: os-platform
attributes:
label: What Operating System are you using?
options:
- Windows
- macOS
- Linux
- Other
validations:
required: true
78 changes: 78 additions & 0 deletions .github/ISSUE_TEMPLATE/3-bug-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: Package issue
description: Report an issue with installing, updating, or running a Package
labels: ["bug", "area: package", "triage"]
body:
- type: markdown
attributes:
value: |
**Experiencing an issue while running a Package?**
Make sure to also search the GitHub issues of the Package, to see if your issue has already been reported and being worked on by upstream authors.
- type: textarea
id: package-details
attributes:
label: Package
description: Provide the name of the Package you are experiencing issues with
placeholder: ex. `ComfyUI`
validations:
required: true
- type: dropdown
id: package-issue-phase
attributes:
label: When did the issue occur?
options:
- Installing the Package
- Updating the Package
- Running the Package
- Other
validations:
required: true
- type: input
id: hardware
attributes:
label: What GPU / hardware type are you using?
description: Installed dependencies and Package features often depend on the GPU or hardware type you are using.
placeholder: ex. Nvidia 2080 Super with CUDA, AMD Radeon VII, etc.
validations:
required: true
- type: textarea
id: what-happened
attributes:
label: What happened?
description: Give a clear and concise description of what happened. Provide screenshots if necessary. Also tell us, what did you expect to happen?
validations:
required: true
- type: textarea
id: console-output
attributes:
label: Console output
description: Please copy and paste any console output or error messages. For failed install or updates, locate the progress on the bottom left, open the dialog, and click on "More Details" to copy the full console output.
placeholder: |
```
Unpacking...
Successfully built lycoris_lora
Installing collected packages: library, tomlkit, onnx, ml-dtypes, onnxruntime-gpu
Running setup.py develop for library
Attempting uninstall: onnx
Found existing installation: onnx 1.14.1
...
```
- type: input
id: version
attributes:
label: Version
description: What version of Stability Matrix are you running? (Can be found at the bottom of the settings page)
placeholder: ex. v2.11.0
validations:
required: true
- type: dropdown
id: os-platform
attributes:
label: What Operating System are you using?
options:
- Windows
- macOS
- Linux
- Other
validations:
required: true
15 changes: 15 additions & 0 deletions .github/ISSUE_TEMPLATE/4-feature-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Feature or enhancement
description: Submit a proposal for a new Stability Matrix feature or enhancement
labels: ["enhancement"]
body:
- type: markdown
attributes:
value: |
Consider first discussing your idea on our [Discord server](https://link.lykos.ai/discord?ref=github-issue-template) to get feedback from the developers and the community.
- type: textarea
id: proposal
attributes:
label: Proposal
description: Explain your idea for a new feature or enhancement. Include any relevant details or links to resources like Package documentation.
validations:
required: true
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Getting help
url: https://link.lykos.ai/discord?ref=github-issue-template
about: Ask questions about using Stability Matrix and get tips on using Packages on our Discord server
29 changes: 29 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,35 @@ 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.11.5
### Added
- Added DoRA category to CivitAI model browser
### Fixed
- Fixed `TaskCanceledException` when adding CivitAI Api key or searching for models when the API takes too long to respond. Retry and timeout behavior has been improved.
- Fixed [#782](https://github.com/LykosAI/StabilityMatrix/issues/782) - conflict error when launching new versions of Forge
- Fixed incorrect torch versions being installed for InvokeAI
- Fixed `ArgumentOutOfRangeException` with the Python Packages dialog ItemSourceView when interacting too quickly after loading.
### Supporters
#### Visionaries
- Shoutout to our Visionary-tier Patreon supporters, **Scopp Mcdee**, **Waterclouds**, and our newest Visionary, **Akiro_Senkai**! Many thanks for your generous support!
#### Pioneers
- Many thanks to our Pioneer-tier supporters on Patreon, **tankfox**, **tanangular**, and our newest Pioneers, **Mr. Unknown** and **Szir777**! Your support is greatly appreciated!

## v2.11.4
### Changed
- Base Python install will now use `setuptools==69.5.1` for compatibility with `torchsde`. Individual Packages can upgrade as required.
- Improved formatting of "Copy Details" action on the Unexpected Error dialog
- (Debug) Logging verbosity for classes can now be configured with environment variables (`Logging__LogLevel__<TypeFullName>`).
### Fixed
- Fixed ComfyUI slower generation speed with new torch versions not including flash attention for windows, pinned `torch==2.1.2` for ComfyUI on Windows CUDA
- Fixed [#719](https://github.com/LykosAI/StabilityMatrix/issues/719) - Fix comments in Inference prompt not being ignored
- Fixed TaskCanceledException when Inference prompts finish before the delayed progress handler (250ms)
### Supporters
#### Visionaries
- Huge thanks to our Visionary-tier supporters on Patreon, **Scopp Mcdee** and **Waterclouds**! Your support helps us continue to improve Stability Matrix!
#### Pioneers
- Thank you to our Pioneer-tier supporters on Patreon, **tankfox** and **tanangular**! Your support is greatly appreciated!

## v2.11.3
### Changed
- Base Python install will now use `pip>=23.3.2,<24.1` for compatibility with `torchsde`.Individual Packages can upgrade as required.
Expand Down
24 changes: 16 additions & 8 deletions StabilityMatrix.Avalonia/App.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,7 @@ internal static IServiceCollection ConfigureServices()
Config = new ConfigurationBuilder()
.SetBasePath(Directory.GetCurrentDirectory())
.AddJsonFile("appsettings.json", optional: true, reloadOnChange: true)
.AddEnvironmentVariables()
.Build();

services.Configure<DebugOptions>(Config.GetSection(nameof(DebugOptions)));
Expand Down Expand Up @@ -927,15 +928,22 @@ private static LoggingConfiguration ConfigureLogging()
builder.ForLogger("Microsoft.*").WriteToNil(NLog.LogLevel.Warn);
builder.ForLogger("Microsoft.Extensions.Http.*").WriteToNil(NLog.LogLevel.Warn);

// Disable console trace logging by default
builder
.ForLogger("StabilityMatrix.Avalonia.ViewModels.ConsoleViewModel")
.WriteToNil(NLog.LogLevel.Debug);
// Disable some trace logging by default, unless overriden by app settings
var typesToDisableTrace = new[] { typeof(ConsoleViewModel), typeof(LoadableViewModelBase) };

// Disable LoadableViewModelBase trace logging by default
builder
.ForLogger("StabilityMatrix.Avalonia.ViewModels.Base.LoadableViewModelBase")
.WriteToNil(NLog.LogLevel.Debug);
foreach (var type in typesToDisableTrace)
{
// Skip if app settings already set a level for this type
if (
Config[$"Logging:LogLevel:{type.FullName}"] is { } levelStr
&& Enum.TryParse<LogLevel>(levelStr, true, out _)
)
{
continue;
}

builder.ForLogger(type.FullName).FilterMinLevel(NLog.LogLevel.Debug);
}

// Debug console logging
/*if (Debugger.IsAttached)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@
"name": "meta.embedded.model"
},
"text": {
"match": "[^,:\\[\\]\\(\\)\\<\\> \\\\]+",
"match": "[^#,:\\[\\]\\(\\)\\<\\> \\\\]+",
"name": "meta.embedded"
},
"invalid_reserved" : {
Expand Down
26 changes: 12 additions & 14 deletions StabilityMatrix.Avalonia/Controls/Painting/PaintCanvas.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,10 @@ protected override void OnApplyTemplate(TemplateAppliedEventArgs e)

if (MainCanvas is not null)
{
// If we already have a BackgroundBitmap, scale MainCanvas to match
if (DataContext is PaintCanvasViewModel { BackgroundImage: { } backgroundBitmap })
if (DataContext is PaintCanvasViewModel { CanvasSize: var canvasSize })
{
MainCanvas.Width = backgroundBitmap.Width;
MainCanvas.Height = backgroundBitmap.Height;
MainCanvas.Width = canvasSize.Width;
MainCanvas.Height = canvasSize.Height;
}

MainCanvas.RenderSkia += OnRenderSkia;
Expand Down Expand Up @@ -108,10 +107,10 @@ protected override void OnDataContextChanged(EventArgs e)

viewModelSubscription?.Dispose();
viewModelSubscription = viewModel
.WhenPropertyChanged(vm => vm.BackgroundImage)
.WhenPropertyChanged(vm => vm.CanvasSize)
.Subscribe(change =>
{
if (MainCanvas is not null && change.Value is not null)
if (MainCanvas is not null && !change.Value.IsEmpty)
{
MainCanvas.Width = change.Value.Width;
MainCanvas.Height = change.Value.Height;
Expand Down Expand Up @@ -317,22 +316,21 @@ protected override void OnKeyDown(KeyEventArgs e)
/// </summary>
private void UpdateMainCanvasBounds()
{
if (
MainCanvas is null
|| DataContext is not PaintCanvasViewModel { BackgroundImage: { } backgroundBitmap }
)
if (MainCanvas is null || DataContext is not PaintCanvasViewModel vm)
{
return;
}

var canvasSize = vm.CanvasSize;

// Set size if mismatch
if (
Math.Abs(MainCanvas.Width - backgroundBitmap.Width) > 0.1
|| Math.Abs(MainCanvas.Height - backgroundBitmap.Height) > 0.1
((int)Math.Round(MainCanvas.Width) != canvasSize.Width)
|| ((int)Math.Round(MainCanvas.Height) != canvasSize.Height)
)
{
MainCanvas.Width = backgroundBitmap.Width;
MainCanvas.Height = backgroundBitmap.Height;
MainCanvas.Width = vm.CanvasSize.Width;
MainCanvas.Height = vm.CanvasSize.Height;
MainCanvas.InvalidateVisual();
}
}
Expand Down
9 changes: 9 additions & 0 deletions StabilityMatrix.Avalonia/Languages/Resources.Designer.cs

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

3 changes: 3 additions & 0 deletions StabilityMatrix.Avalonia/Languages/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -1116,4 +1116,7 @@
<data name="Label_AppData" xml:space="preserve">
<value>App Data</value>
</data>
<data name="Warning_PleaseExtractFirst" xml:space="preserve">
<value>PLEASE EXTRACT THE APP FROM THE ZIP FILE BEFORE RUNNING STABILITY MATRIX</value>
</data>
</root>
1 change: 1 addition & 0 deletions StabilityMatrix.Avalonia/StabilityMatrix.Avalonia.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
<PackageReference Include="MessagePipe.Interprocess" Version="1.7.4" />
<PackageReference Include="MetadataExtractor" Version="2.8.1" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
Expand Down
Loading

0 comments on commit da5b06d

Please sign in to comment.