PixArtDeltaLCMModel<T>

Models & Types · AiDotNet.Diffusion.FastGeneration

PixArt-Delta LCM for few-step generation from the efficient PixArt-Delta DiT architecture.

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

For Beginners

PixArt-Delta is an efficient alternative to SD3 — it produces great images with much less training data and compute. This LCM version makes it even faster at inference time, generating in just 2-8 steps. Good for when you want high quality but don’t need FLUX/SD3-level capability.

How It Works

Applies Latent Consistency Model distillation to PixArt-Delta, a training-efficient DiT model. PixArt-Delta uses a decomposed cross-attention mechanism that significantly reduces training cost. The LCM variant enables 2-8 step generation while maintaining PixArt-Delta’s strong text-image alignment.

Reference: Chen et al., “PixArt-delta: Fast and Controllable Image Generation with Latent Consistency Models”, 2024

Example

var options = new DiffusionModelOptions<float> { LatentChannels = 4, DefaultInferenceSteps = 4 };
var noise = Tensor<float>.CreateRandom(new[] { 1, 4, 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 PixArtDeltaLCMModel<float>(options: options))
    .Build(trainX, trainY);
var generated = result.Predict(noise);

Constructors

Constructor Summary
PixArtDeltaLCMModel(NeuralNetworkArchitecture<T> architecture, DiffusionModelOptions<T> options, INoiseScheduler<T> scheduler, SiTPredictor<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()