Image Diffusion Models
40+State-of-the-art image generation, editing, and style transfer in pure C#
Every major image diffusion architecture implemented in C#. From Stable Diffusion 1.5 to SD3.5, from DALL-E to Flux, from ControlNet to IP-Adapter. Generate images from text, edit with inpainting, apply style transfer, and upscale results - all without Python.
Stable Diffusion Family
The complete Stable Diffusion evolution from v1.5 through SD3.5, including all variants and extensions.
Stable Diffusion 1.5
The foundational latent diffusion model. 512x512 generation with CLIP text encoder.
Stable Diffusion 2.0/2.1
OpenCLIP-based text encoder with 768x768 support and depth-to-image.
SDXL
Dual text encoder (CLIP + OpenCLIP), 1024x1024 native resolution, refiner model.
SDXL Turbo
Adversarial diffusion distillation for 1-4 step generation.
SD3 / SD3.5
MMDiT architecture with three text encoders (CLIP, OpenCLIP, T5) for superior text understanding.
Stable Cascade
Three-stage architecture with Wurstchen compression for efficient high-res generation.
StableDiffusion SAG
Self-Attention Guidance for improved coherence without classifier-free guidance.
StableDiffusion GLIGEN
Grounded Language-to-Image Generation with bounding box layout control.
StableDiffusion DiffEdit
Automatic mask generation for text-guided image editing.
StableDiffusion Attend-and-Excite
Attention-based guidance for better prompt adherence.
ControlNet & Spatial Control
Fine-grained spatial control over image generation using poses, edges, depth maps, and more.
ControlNet
Add spatial conditioning (Canny edges, depth, pose) to Stable Diffusion.
ControlNet XS
Lightweight ControlNet variant with fewer parameters.
ControlNet Union
Single model supporting multiple control types simultaneously.
T2I-Adapter
Lightweight adapter for spatial control with minimal overhead.
IP-Adapter
Image prompt adapter for style and content transfer from reference images.
IP-Adapter FaceID
Face-preserving generation using facial embeddings.
InstantID
Zero-shot identity-preserving generation from a single face image.
PhotoMaker
Customized photo generation preserving identity across styles.
InstantStyle
Style transfer from reference images while preserving content.
Flux & Latest Architectures
Cutting-edge diffusion architectures from Black Forest Labs and beyond.
Flux
Flow-matching transformer architecture with state-of-the-art quality.
Flux ControlNet
Spatial conditioning for Flux generation pipeline.
Flux Img2Img
Image-to-image translation using Flux architecture.
Flux Inpaint
Region-based editing and inpainting with Flux.
Flux Fill
Outpainting and fill operations using Flux models.
Other Major Architectures
Alternative diffusion architectures from Google, Meta, and the research community.
DALL-E 2/3
OpenAI's CLIP-guided diffusion for highly creative image generation.
Imagen
Google's text-to-image with cascaded diffusion and T5 text encoder.
Kandinsky 2.2/3.0
Multilingual diffusion model with CLIP image prior.
PixArt-Alpha/Sigma
Efficient transformer-based diffusion with DiT architecture.
Playground v2/2.5
Aesthetic-focused generation with human preference alignment.
DeepFloyd IF
Pixel-space cascaded diffusion with T5-XXL text encoder.
Consistency Models
Direct generation without iterative denoising (single-step capable).
LCM (Latent Consistency)
Consistency distillation for 2-4 step generation from any SD model.
SDXL Lightning
Progressive adversarial distillation for 1-4 step SDXL generation.
Hyper-SD
Reward-guided progressive distillation for ultra-fast generation.
Inpainting & Editing
Precise image editing, object removal, and region-based generation.
SD Inpainting
Mask-guided image editing for SD 1.5 and 2.x models.
SDXL Inpainting
High-resolution inpainting with SDXL quality.
InstructPix2Pix
Edit images using natural language instructions.
Paint-by-Example
Replace image regions using example images as reference.
BrushNet
Plug-and-play dual-branch inpainting for any SD model.
PowerPaint
Versatile inpainting with object removal, replacement, and outpainting.
Blended Diffusion
Seamless compositing of generated and original image regions.
Image diffusion with AiModelBuilder
using AiDotNet;
// Train an image diffusion model with AiModelBuilder
var result = await new AiModelBuilder<float, float[], float>()
.ConfigureModel(new StableDiffusionXL<float>(
width: 1024, height: 1024,
numInferenceSteps: 30))
.ConfigureOptimizer(new AdamOptimizer<float>())
.ConfigurePreprocessing()
.BuildAsync(imageData, labels);
// Generate images
var generated = result.Predict(promptEmbedding); Start building with Image Diffusion Models
All 40+ implementations are included free under Apache 2.0.