Skip to content

Commit e25d8ad

Browse files
committed
Removed unused method
1 parent 07a65ea commit e25d8ad

2 files changed

Lines changed: 1 addition & 10 deletions

File tree

StableDiffusion.NET/Helper/ImageHelper.cs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -82,14 +82,6 @@ public static unsafe Native.Types.sd_image_t ToSdImage(this IImage image, bool m
8282
}
8383
}
8484

85-
public static unsafe Native.Types.sd_image_t* ToSdImagePtr(this IImage image, bool monochrome = false)
86-
{
87-
Native.Types.sd_image_t* imagePtr = (Native.Types.sd_image_t*)NativeMemory.Alloc((nuint)Marshal.SizeOf<Native.Types.sd_image_t>());
88-
imagePtr[0] = image.ToSdImage(monochrome);
89-
90-
return imagePtr;
91-
}
92-
9385
public static unsafe void Free(this Native.Types.sd_image_t sdImage)
9486
{
9587
if (sdImage.data == null) return;
@@ -127,7 +119,7 @@ internal static unsafe IImage[] ToImageArrayIFace(Native.Types.sd_image_t* sdIma
127119
{
128120
int count = images.Length;
129121

130-
Native.Types.sd_image_t* imagePtr = (Native.Types.sd_image_t*)NativeMemory.Alloc((nuint)(count * Marshal.SizeOf<Native.Types.sd_image_t>()));
122+
Native.Types.sd_image_t* imagePtr = (Native.Types.sd_image_t*)NativeMemory.Alloc((nuint)count, (nuint)Marshal.SizeOf<Native.Types.sd_image_t>());
131123

132124
for (int i = 0; i < count; i++)
133125
imagePtr[i] = images[i].ToSdImage(monochrome);

StableDiffusion.NET/StableDiffusionCpp.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using System;
2-
using System.Runtime.InteropServices;
32
using HPPH;
43
using JetBrains.Annotations;
54

0 commit comments

Comments
 (0)