SD3FlashModel<T>

Models & Types · AiDotNet.Diffusion.FastGeneration

SD3 Flash for ultra-fast 1-4 step generation from SD3 architecture.

Inheritance: DiffusionModelBase<T> → LatentDiffusionModelBase<T> → SD3FlashModel<T>

For Beginners

SD3 Flash is to SD3 what FLUX Schnell is to FLUX — the same great model but distilled to run in just 1-4 steps instead of 28. Perfect for applications where speed matters more than squeezing out every bit of quality.

How It Works

SD3 Flash is the consistency-distilled variant of Stable Diffusion 3 optimized for 1-4 step inference. Preserves SD3’s strong text understanding and image quality while dramatically reducing the number of required inference steps.

Example

var options = new DiffusionModelOptions<float> { LatentChannels = 16, DefaultInferenceSteps = 4 };
var noise = Tensor<float>.CreateRandom(new[] { 1, 16, 128, 128 });
var trainX = Tensor<float>.CreateRandom(4, 8);
var trainY = Tensor<float>.CreateRandom(4, 2);
var result = new AiModelBuilder<float, Tensor<float>, Tensor<float>>()
    .ConfigureModel(new SD3FlashModel<float>(options: options))
    .Build(trainX, trainY);
var generated = result.Predict(noise);

Constructors

Constructor Summary
SD3FlashModel(NeuralNetworkArchitecture<T> architecture, DiffusionModelOptions<T> options, INoiseScheduler<T> scheduler, MMDiTXNoisePredictor<T> predictor, StandardVAE<T> vae, IConditioningModule<T> conditioner, int? seed)

Properties

Property Summary
IConditioningModule<T> Conditioner { get; }
INoisePredictor<T> NoisePredictor { get; }
IVAEModel<T> VAE { get; }
int LatentChannels { get; }

Methods

Method Summary
ModelMetadata<T> GetModelMetadata()