mirror of
https://github.com/DarthAffe/StableDiffusion.NET.git
synced 2026-11-11 19:36:31 +00:00
Changed backend-priority to be changeable
This commit is contained in:
1 parent
7fbbb70f90
commit
bb71986ce7
5 files changed
+5
-5
No files matched your search
@@ -13,7 +13,7 @@ public class CpuBackend : IBackend
|
|||||||
|
|
||||||
public bool IsEnabled { get; set; } = true;
|
public bool IsEnabled { get; set; } = true;
|
||||||
|
|
||||||
public int Priority => 0;
|
public int Priority { get; set; } = 0;
|
||||||
|
|
||||||
public bool IsAvailable => (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)
|
public bool IsAvailable => (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)
|
||||||
|| RuntimeInformation.IsOSPlatform(OSPlatform.Linux)
|
|| RuntimeInformation.IsOSPlatform(OSPlatform.Linux)
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ public partial class CudaBackend : IBackend
|
|||||||
|
|
||||||
public bool IsEnabled { get; set; } = true;
|
public bool IsEnabled { get; set; } = true;
|
||||||
|
|
||||||
public int Priority => 10;
|
public int Priority { get; set; } = 10;
|
||||||
|
|
||||||
public bool IsAvailable => (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)
|
public bool IsAvailable => (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)
|
||||||
|| RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
|
|| RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ namespace StableDiffusion.NET;
|
|||||||
public interface IBackend
|
public interface IBackend
|
||||||
{
|
{
|
||||||
bool IsEnabled { get; set; }
|
bool IsEnabled { get; set; }
|
||||||
public int Priority { get; }
|
public int Priority { get; set; }
|
||||||
bool IsAvailable { get; }
|
bool IsAvailable { get; }
|
||||||
string PathPart { get; }
|
string PathPart { get; }
|
||||||
}
|
}
|
||||||
@@ -12,7 +12,7 @@ public partial class RocmBackend : IBackend
|
|||||||
|
|
||||||
public bool IsEnabled { get; set; } = true;
|
public bool IsEnabled { get; set; } = true;
|
||||||
|
|
||||||
public int Priority => 10;
|
public int Priority { get; set; } = 10;
|
||||||
|
|
||||||
public bool IsAvailable => ((RuntimeInformation.IsOSPlatform(OSPlatform.Windows)
|
public bool IsAvailable => ((RuntimeInformation.IsOSPlatform(OSPlatform.Windows)
|
||||||
&& RocmVersion is 5)
|
&& RocmVersion is 5)
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ public class SyclBackend : IBackend
|
|||||||
//TODO DarthAffe 10.08.2024: tbh I'm not really sure how to detect a sycl-compatible system so for now it's disabled by default
|
//TODO DarthAffe 10.08.2024: tbh I'm not really sure how to detect a sycl-compatible system so for now it's disabled by default
|
||||||
public bool IsEnabled { get; set; } = false;
|
public bool IsEnabled { get; set; } = false;
|
||||||
|
|
||||||
public int Priority => 5;
|
public int Priority { get; set; } = 5;
|
||||||
|
|
||||||
public bool IsAvailable => (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)
|
public bool IsAvailable => (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)
|
||||||
|| RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
|
|| RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
|
||||||
|
|||||||
Reference in new issue
Block a user