2024-08-01 21:40:16 +02:00
2024-07-22 21:17:34 +02:00
2024-03-25 00:34:27 +01:00
2023-12-14 21:48:12 +01:00
2024-03-12 20:45:59 +01:00
2024-07-28 10:35:02 +02:00
2024-03-25 00:34:07 +01:00
2024-07-22 19:38:53 +02:00

StableDiffusion.NET

GitHub release (latest by date) Nuget GitHub GitHub Repo stars

Based on https://github.com/leejet/stable-diffusion.cpp

Usage

Setup

Install the StableDiffusion.NET-Nuget and at least one of the Backend-Packages.
If GPU-support is available it will prefer this over CPU.
If you want to add your own native-libraries or need more control over which backend to load, check the static Backends class.

Example

using StableDiffusionModel sd = new(@"<path_to_model>", new ModelParameter());
IImage<ColorRGB> image = sd.TextToImage("<prompt>", new StableDiffusionParameter());

To process the resulting image further you can write your own extensions or install one of the HPPH-extension sets:
HPPH.System.Drawing
HPPH.SkiaSharp

Description
C# Wrapper for StableDiffusion.cpp
Readme MIT 5.4 MiB
Languages
C# 91.7%
C 7.3%
Batchfile 1%