From ceef655ed53ea3afd106dcb9c62af6c3ecdd54af Mon Sep 17 00:00:00 2001 From: Darth Affe Date: Fri, 22 Mar 2024 23:43:17 +0100 Subject: [PATCH] Changed library-loading to use new backend-method for path generation --- StableDiffusion.NET/Native/Native.Load.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/StableDiffusion.NET/Native/Native.Load.cs b/StableDiffusion.NET/Native/Native.Load.cs index 837df66..309d842 100644 --- a/StableDiffusion.NET/Native/Native.Load.cs +++ b/StableDiffusion.NET/Native/Native.Load.cs @@ -42,7 +42,8 @@ internal static partial class Native foreach (IBackend backend in Backends.ActiveBackends.OrderByDescending(x => x.Priority)) { - string path = Path.Combine("runtimes", os, "native", backend.PathPart, $"{libPrefix}{LIB_NAME}{fileExtension}"); + string path = Backends.GetFullPath(os, backend.PathPart, $"{libPrefix}{LIB_NAME}{fileExtension}"); + if (string.IsNullOrWhiteSpace(path)) continue; string fullPath = TryFindPath(path); nint result = TryLoad(fullPath);