diff --git a/Avalonia.Gif/Avalonia.Gif.csproj b/Avalonia.Gif/Avalonia.Gif.csproj
index dbf0defd..48a8f949 100644
--- a/Avalonia.Gif/Avalonia.Gif.csproj
+++ b/Avalonia.Gif/Avalonia.Gif.csproj
@@ -10,7 +10,7 @@
true
-
+
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 1d49d7d5..455efd4a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -9,6 +9,10 @@ and this project adheres to [Semantic Versioning 2.0](https://semver.org/spec/v2
### Fixed
- Fixed more crashes when loading invalid connected model info files
- Fixed pip installs not parsing comments properly
+- Fixed crash when sending input to a process that isn't running
+- Fixed [#576](https://github.com/LykosAI/StabilityMatrix/issues/576) - drag & drop crashes on macOS & Linux
+- Fixed [#594](https://github.com/LykosAI/StabilityMatrix/issues/594) - missing thumbnails in Inference model selector
+- Downgraded Avalonia back to 11.0.9 to fix [#589](https://github.com/LykosAI/StabilityMatrix/issues/589) and possibly other rendering issues
## v2.10.1
### Added
diff --git a/Directory.Build.props b/Directory.Build.props
new file mode 100644
index 00000000..e059bd8f
--- /dev/null
+++ b/Directory.Build.props
@@ -0,0 +1,5 @@
+
+
+ 11.0.9
+
+
diff --git a/StabilityMatrix.Avalonia.Diagnostics/StabilityMatrix.Avalonia.Diagnostics.csproj b/StabilityMatrix.Avalonia.Diagnostics/StabilityMatrix.Avalonia.Diagnostics.csproj
index 2fbf2fd4..7d0762ac 100644
--- a/StabilityMatrix.Avalonia.Diagnostics/StabilityMatrix.Avalonia.Diagnostics.csproj
+++ b/StabilityMatrix.Avalonia.Diagnostics/StabilityMatrix.Avalonia.Diagnostics.csproj
@@ -19,8 +19,8 @@
-
-
+
+
diff --git a/StabilityMatrix.Avalonia/Extensions/DataObjectExtensions.cs b/StabilityMatrix.Avalonia/Extensions/DataObjectExtensions.cs
index ef6a47f0..25993dd6 100644
--- a/StabilityMatrix.Avalonia/Extensions/DataObjectExtensions.cs
+++ b/StabilityMatrix.Avalonia/Extensions/DataObjectExtensions.cs
@@ -1,4 +1,5 @@
-using Avalonia.Input;
+using System.Runtime.InteropServices;
+using Avalonia.Input;
namespace StabilityMatrix.Avalonia.Extensions;
@@ -9,9 +10,16 @@ public static class DataObjectExtensions
///
public static T? GetContext(this IDataObject dataObject)
{
- if (dataObject.Get("Context") is T context)
+ try
{
- return context;
+ if (dataObject.Get("Context") is T context)
+ {
+ return context;
+ }
+ }
+ catch (COMException)
+ {
+ return default;
}
return default;
diff --git a/StabilityMatrix.Avalonia/StabilityMatrix.Avalonia.csproj b/StabilityMatrix.Avalonia/StabilityMatrix.Avalonia.csproj
index b3fba009..096e08c9 100644
--- a/StabilityMatrix.Avalonia/StabilityMatrix.Avalonia.csproj
+++ b/StabilityMatrix.Avalonia/StabilityMatrix.Avalonia.csproj
@@ -39,17 +39,17 @@
-
-
-
-
-
-
+
+
+
+
+
+
-
+
-
-
+
+
@@ -58,10 +58,10 @@
-
-
-
-
+
+
+
+
@@ -78,25 +78,25 @@
-
+
-
+
-
+
-
-
+
+
-
+
diff --git a/StabilityMatrix.Avalonia/Styles/ControlThemes/BetterComboBoxStyles.axaml b/StabilityMatrix.Avalonia/Styles/ControlThemes/BetterComboBoxStyles.axaml
index c1274ef4..c5105328 100644
--- a/StabilityMatrix.Avalonia/Styles/ControlThemes/BetterComboBoxStyles.axaml
+++ b/StabilityMatrix.Avalonia/Styles/ControlThemes/BetterComboBoxStyles.axaml
@@ -8,7 +8,8 @@
xmlns:sg="clr-namespace:SpacedGridControl.Avalonia;assembly=SpacedGridControl.Avalonia"
xmlns:ui="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia"
xmlns:labs="clr-namespace:Avalonia.Labs.Controls;assembly=Avalonia.Labs.Controls"
- xmlns:vendorLabs="clr-namespace:StabilityMatrix.Avalonia.Controls.VendorLabs">
+ xmlns:vendorLabs="clr-namespace:StabilityMatrix.Avalonia.Controls.VendorLabs"
+ xmlns:converters="clr-namespace:StabilityMatrix.Avalonia.Converters">
@@ -29,7 +30,9 @@
-
+
+
+
@@ -220,7 +223,7 @@
Height="36"
CornerRadius="60"
RenderOptions.BitmapInterpolationMode="HighQuality"
- Source="{Binding Local.PreviewImageFullPathGlobal}"
+ Source="{Binding Local.PreviewImageFullPathGlobal, Converter={StaticResource FileUriConverter}}"
Stretch="UniformToFill">
diff --git a/StabilityMatrix.Avalonia/ViewModels/Base/InferenceTabViewModelBase.cs b/StabilityMatrix.Avalonia/ViewModels/Base/InferenceTabViewModelBase.cs
index 57e6bf47..30fd84ff 100644
--- a/StabilityMatrix.Avalonia/ViewModels/Base/InferenceTabViewModelBase.cs
+++ b/StabilityMatrix.Avalonia/ViewModels/Base/InferenceTabViewModelBase.cs
@@ -18,6 +18,7 @@ using FluentAvalonia.UI.Media.Animation;
using Microsoft.Extensions.DependencyInjection;
using NLog;
using StabilityMatrix.Avalonia.Animations;
+using StabilityMatrix.Avalonia.Extensions;
using StabilityMatrix.Avalonia.Models;
using StabilityMatrix.Avalonia.Models.Inference;
using StabilityMatrix.Avalonia.Services;
@@ -249,7 +250,7 @@ public abstract partial class InferenceTabViewModelBase
// 1. Context drop for LocalImageFile
if (e.Data.GetDataFormats().Contains("Context"))
{
- if (e.Data.Get("Context") is LocalImageFile imageFile)
+ if (e.Data.GetContext() is { } imageFile)
{
e.Handled = true;
return;
@@ -274,7 +275,7 @@ public abstract partial class InferenceTabViewModelBase
// 1. Context drop for LocalImageFile
if (e.Data.GetDataFormats().Contains("Context"))
{
- if (e.Data.Get("Context") is LocalImageFile imageFile)
+ if (e.Data.GetContext() is { } imageFile)
{
e.Handled = true;
diff --git a/StabilityMatrix.Avalonia/ViewModels/CheckpointManager/CheckpointFolder.cs b/StabilityMatrix.Avalonia/ViewModels/CheckpointManager/CheckpointFolder.cs
index 5f23e3fc..51ad4025 100644
--- a/StabilityMatrix.Avalonia/ViewModels/CheckpointManager/CheckpointFolder.cs
+++ b/StabilityMatrix.Avalonia/ViewModels/CheckpointManager/CheckpointFolder.cs
@@ -15,6 +15,7 @@ using CommunityToolkit.Mvvm.Input;
using DynamicData;
using DynamicData.Binding;
using FluentAvalonia.UI.Controls;
+using StabilityMatrix.Avalonia.Extensions;
using StabilityMatrix.Avalonia.Services;
using StabilityMatrix.Avalonia.ViewModels.Base;
using StabilityMatrix.Core.Attributes;
@@ -279,7 +280,7 @@ public partial class CheckpointFolder : ViewModelBase
var paths = files.Select(f => f.Path.LocalPath).ToArray();
await ImportFilesAsync(paths, settingsManager.Settings.IsImportAsConnected);
}
- else if (e.Data.Get("Context") is CheckpointFile file)
+ else if (e.Data.GetContext() is { } file)
{
await MoveBetweenFolders(file);
}
diff --git a/StabilityMatrix.Avalonia/Views/CheckpointsPage.axaml.cs b/StabilityMatrix.Avalonia/Views/CheckpointsPage.axaml.cs
index e95b45f4..dda5cd9c 100644
--- a/StabilityMatrix.Avalonia/Views/CheckpointsPage.axaml.cs
+++ b/StabilityMatrix.Avalonia/Views/CheckpointsPage.axaml.cs
@@ -6,6 +6,7 @@ using Avalonia.Markup.Xaml;
using Avalonia.VisualTree;
using DynamicData.Binding;
using StabilityMatrix.Avalonia.Controls;
+using StabilityMatrix.Avalonia.Extensions;
using StabilityMatrix.Avalonia.ViewModels;
using StabilityMatrix.Avalonia.ViewModels.CheckpointManager;
using StabilityMatrix.Core.Attributes;
@@ -68,7 +69,7 @@ public partial class CheckpointsPage : UserControlBase
{
case CheckpointFolder folder:
{
- if (e.Data.Get("Context") is not CheckpointFile file)
+ if (e.Data.GetContext() is not { } file)
{
await folder.OnDrop(e);
break;
@@ -83,7 +84,7 @@ public partial class CheckpointsPage : UserControlBase
}
case CheckpointFile file:
{
- if (e.Data.Get("Context") is not CheckpointFile dragFile)
+ if (e.Data.GetContext() is not { } dragFile)
{
await file.ParentFolder.OnDrop(e);
break;
@@ -132,7 +133,7 @@ public partial class CheckpointsPage : UserControlBase
case CheckpointFolder folder:
{
folder.IsExpanded = true;
- if (e.Data.Get("Context") is not CheckpointFile file)
+ if (e.Data.GetContext() is not { } file)
{
folder.IsCurrentDragTarget = true;
break;
@@ -144,7 +145,7 @@ public partial class CheckpointsPage : UserControlBase
}
case CheckpointFile file:
{
- if (e.Data.Get("Context") is not CheckpointFile dragFile)
+ if (e.Data.GetContext() is not { } dragFile)
{
file.ParentFolder.IsCurrentDragTarget = true;
break;
diff --git a/StabilityMatrix.Avalonia/Views/ConsoleOutputPage.axaml b/StabilityMatrix.Avalonia/Views/ConsoleOutputPage.axaml
index d44b44e6..7fa19f89 100644
--- a/StabilityMatrix.Avalonia/Views/ConsoleOutputPage.axaml
+++ b/StabilityMatrix.Avalonia/Views/ConsoleOutputPage.axaml
@@ -89,6 +89,7 @@
Classes="accent"
IsDefault="True"
Content="{x:Static lang:Resources.Action_Send}"
+ IsEnabled="{Binding IsRunning}"
Command="{Binding SendToConsoleCommand}"/>
diff --git a/StabilityMatrix.Core/StabilityMatrix.Core.csproj b/StabilityMatrix.Core/StabilityMatrix.Core.csproj
index 5005b1bd..76fa5624 100644
--- a/StabilityMatrix.Core/StabilityMatrix.Core.csproj
+++ b/StabilityMatrix.Core/StabilityMatrix.Core.csproj
@@ -27,7 +27,7 @@
-
+
@@ -45,7 +45,7 @@
-
+
@@ -53,7 +53,7 @@
-
+
diff --git a/StabilityMatrix.UITests/StabilityMatrix.UITests.csproj b/StabilityMatrix.UITests/StabilityMatrix.UITests.csproj
index eb592e08..2ebeb2e8 100644
--- a/StabilityMatrix.UITests/StabilityMatrix.UITests.csproj
+++ b/StabilityMatrix.UITests/StabilityMatrix.UITests.csproj
@@ -15,7 +15,7 @@
-
+