-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26 from DarthAffe/vulkan_backend
Vulkan backend
- Loading branch information
Showing
11 changed files
with
81 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<package> | ||
<metadata> | ||
<id>StableDiffusion.NET.Backend.Vulkan</id> | ||
<version>$version$</version> | ||
<title>StableDiffusion.NET.Backend.Vulkan</title> | ||
<authors>Darth Affe & stable-diffusion.cpp Authors</authors> | ||
<requireLicenseAcceptance>false</requireLicenseAcceptance> | ||
<license type="expression">MIT</license> | ||
<icon>sd_net_vulkan.png</icon> | ||
<projectUrl>https://github.com/DarthAffe/StableDiffusion.NET</projectUrl> | ||
<description>Vulkan-Backend for StableDiffusion.NET.</description> | ||
<releaseNotes></releaseNotes> | ||
<copyright>Copyright © Darth Affe 2024</copyright> | ||
<readme>readme.md</readme> | ||
</metadata> | ||
|
||
<files> | ||
<file src="StableDiffusion.NET.Backend.props" target="build/net8.0/StableDiffusion.NET.Backend.Vulkan.props" /> | ||
|
||
<file src="windows-vulkan/stable-diffusion.dll" target="runtimes\win-x64\native\vulkan\stable-diffusion.dll" /> | ||
|
||
<file src="sd_net_vulkan.png" target="sd_net_vulkan.png" /> | ||
<file src="readme.md" target="readme.md" /> | ||
<file src="ggml.txt" target="ggml.txt" /> | ||
<file src="stable-diffusion.cpp.txt" target="stable-diffusion.cpp.txt" /> | ||
</files> | ||
</package> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
using System.Runtime.InteropServices; | ||
using JetBrains.Annotations; | ||
|
||
namespace StableDiffusion.NET; | ||
|
||
[PublicAPI] | ||
public class VulkanBackend : IBackend | ||
{ | ||
#region Properties & Fields | ||
|
||
//TODO DarthAffe 28.08.2024: Find a way to detect vulkan compatibility | ||
public bool IsEnabled { get; set; } = false; | ||
|
||
public int Priority { get; set; } = 5; | ||
|
||
public bool IsAvailable => RuntimeInformation.IsOSPlatform(OSPlatform.Windows) | ||
&& (RuntimeInformation.OSArchitecture == Architecture.X64); | ||
|
||
public string PathPart => "vulkan"; | ||
|
||
#endregion | ||
|
||
#region Constructors | ||
|
||
internal VulkanBackend() | ||
{ } | ||
|
||
#endregion | ||
} |