Skip to content

Commit

Permalink
Updated stablediffusion.cpp to c6071fa
Browse files Browse the repository at this point in the history
  • Loading branch information
DarthAffe committed Jan 16, 2024
1 parent 5a217eb commit 97f44b8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
6 changes: 6 additions & 0 deletions StableDiffusion.NET/Native.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,12 @@ internal struct sd_image_t
sd_image_t input_image,
int upscale_factor);

[LibraryImport(LIB_NAME, EntryPoint = "convert")]
internal static partial void convert([MarshalAs(UnmanagedType.LPStr)] string input_path,
[MarshalAs(UnmanagedType.LPStr)] string vae_path,
[MarshalAs(UnmanagedType.LPStr)] string output_path,
sd_type_t output_type);

[LibraryImport(LIB_NAME, EntryPoint = "sd_set_log_callback")]
internal static partial void sd_set_log_callback(sd_log_cb_t sd_log_cb, void* data);

Expand Down
3 changes: 3 additions & 0 deletions StableDiffusion.NET/StableDiffusionModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,9 @@ public void Dispose()
_disposed = true;
}

public static void Convert(string modelPath, string vaePath, Quantization quantization, string outputPath)
=> Native.convert(modelPath, vaePath, outputPath, quantization);

public static string GetSystemInfo()
{
void* s = Native.sd_get_system_info();
Expand Down
2 changes: 1 addition & 1 deletion build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ if not exist stable-diffusion.cpp (

cd stable-diffusion.cpp
git fetch
git checkout 2b6ec97fe244d03c40aa8d70131d40bb086099b0
git checkout c6071fa82fb1d0e688f75c9a3d870fe71d3a7a1d
git submodule init
git submodule update

Expand Down

0 comments on commit 97f44b8

Please sign in to comment.