From cebdc288405e0cabff49d9fa11f5c3d547873b4e Mon Sep 17 00:00:00 2001 From: JT Date: Wed, 3 Jan 2024 23:23:27 -0800 Subject: [PATCH] fix directml showing when it shouldnt --- .../Models/Packages/StableDiffusionDirectMl.cs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/StabilityMatrix.Core/Models/Packages/StableDiffusionDirectMl.cs b/StabilityMatrix.Core/Models/Packages/StableDiffusionDirectMl.cs index d7dec894..7eeae2f2 100644 --- a/StabilityMatrix.Core/Models/Packages/StableDiffusionDirectMl.cs +++ b/StabilityMatrix.Core/Models/Packages/StableDiffusionDirectMl.cs @@ -1,7 +1,4 @@ -using System.Diagnostics.CodeAnalysis; -using System.Text.Json.Nodes; -using System.Text.RegularExpressions; -using NLog; +using NLog; using StabilityMatrix.Core.Attributes; using StabilityMatrix.Core.Helper; using StabilityMatrix.Core.Helper.Cache; @@ -37,7 +34,8 @@ public class StableDiffusionDirectMl( public override SharedFolderMethod RecommendedSharedFolderMethod => SharedFolderMethod.Symlink; - public override TorchVersion GetRecommendedTorchVersion() => TorchVersion.DirectMl; + public override TorchVersion GetRecommendedTorchVersion() => + HardwareHelper.PreferDirectML() ? TorchVersion.DirectMl : base.GetRecommendedTorchVersion(); public override PackageDifficulty InstallerSortOrder => PackageDifficulty.Recommended;