diff --git a/CHANGELOG.md b/CHANGELOG.md index bdae88aa..5008a001 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,16 @@ 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.11.7 +### Changed +- Forge will use the recommended pytorch version 2.3.1 the next time it is updated +- InvokeAI users with AMD GPUs on Linux will be upgraded to the rocm5.6 version of pytorch the next time it is updated +### Fixed +- Fixed Inference not connecting with "Could not connect to backend - JSON value could not be converted" error with API changes from newer ComfyUI versions +### Supporters +#### Pioneers +- Shoutout to our Pioneer-tier supporters on Patreon: **tankfox**, **tanangular**, **Mr. Unknown**, and **Szir777**! Thanks for all of your continued support! + ## v2.11.6 ### Fixed - Fixed incorrect IPAdapter download links in the HuggingFace model browser diff --git a/StabilityMatrix.Avalonia/ViewModels/InferenceViewModel.cs b/StabilityMatrix.Avalonia/ViewModels/InferenceViewModel.cs index e55449c5..d94e6e72 100644 --- a/StabilityMatrix.Avalonia/ViewModels/InferenceViewModel.cs +++ b/StabilityMatrix.Avalonia/ViewModels/InferenceViewModel.cs @@ -462,10 +462,15 @@ private async Task Connect(CancellationToken cancellationToken = default) if (RunningPackage is not null) { - await notificationService.TryAsync( + var result = await notificationService.TryAsync( ClientManager.ConnectAsync(RunningPackage, cancellationToken), "Could not connect to backend" ); + + if (result.Exception is { } exception) + { + Logger.Error(exception, "Failed to connect to Inference backend"); + } } } diff --git a/StabilityMatrix.Core/Models/Api/Comfy/ComfyInputInfo.cs b/StabilityMatrix.Core/Models/Api/Comfy/ComfyInputInfo.cs index 60072ac4..c69f14d2 100644 --- a/StabilityMatrix.Core/Models/Api/Comfy/ComfyInputInfo.cs +++ b/StabilityMatrix.Core/Models/Api/Comfy/ComfyInputInfo.cs @@ -16,17 +16,35 @@ public class ComfyInputInfo { var value = Required?[key]; - var nested = value?.Deserialize>>(); + // value usually is a [["a", "b"]] array + // but can also be [["a", "b"], {"x": "y"}] array - return nested?.SelectMany(x => x).ToList(); + var outerArray = value?.Deserialize(); + + if (outerArray?.FirstOrDefault() is not { } innerNode) + { + return null; + } + + var innerList = innerNode.Deserialize>(); + return innerList; } public List? GetOptionalValueAsNestedList(string key) { var value = Optional?[key]; - var nested = value?.Deserialize()?[0].Deserialize>(); + // value usually is a [["a", "b"]] array + // but can also be [["a", "b"], {"x": "y"}] array + + var outerArray = value?.Deserialize(); + + if (outerArray?.FirstOrDefault() is not { } innerNode) + { + return null; + } - return nested; + var innerList = innerNode.Deserialize>(); + return innerList; } } diff --git a/StabilityMatrix.Core/Models/Packages/InvokeAI.cs b/StabilityMatrix.Core/Models/Packages/InvokeAI.cs index 7e155c05..57abe797 100644 --- a/StabilityMatrix.Core/Models/Packages/InvokeAI.cs +++ b/StabilityMatrix.Core/Models/Packages/InvokeAI.cs @@ -216,15 +216,15 @@ await venvRunner await venvRunner .PipInstall( new PipInstallArgs() - .WithTorch("==2.0.1") - .WithTorchVision() - .WithExtraIndex("rocm5.4.2"), + .WithTorch("==2.2.2") + .WithTorchVision("==0.17.2") + .WithExtraIndex("rocm5.6"), onConsoleOutput ) .ConfigureAwait(false); Logger.Info("Starting InvokeAI install (ROCm)..."); pipCommandArgs = - "-e . --use-pep517 --extra-index-url https://download.pytorch.org/whl/rocm5.4.2"; + "-e . --use-pep517 --extra-index-url https://download.pytorch.org/whl/rocm5.6"; break; case TorchVersion.Mps: // For Apple silicon, use MPS diff --git a/StabilityMatrix.Core/Models/Packages/SDWebForge.cs b/StabilityMatrix.Core/Models/Packages/SDWebForge.cs index d72888b0..936c6c31 100644 --- a/StabilityMatrix.Core/Models/Packages/SDWebForge.cs +++ b/StabilityMatrix.Core/Models/Packages/SDWebForge.cs @@ -172,8 +172,8 @@ public override async Task InstallPackage( else { pipArgs = pipArgs - .WithTorch("==2.1.2") - .WithTorchVision("==0.16.2") + .WithTorch("==2.3.1") + .WithTorchVision("==0.18.1") .WithTorchExtraIndex( torchVersion switch {