SANASprintModel<T>

Models & Types · AiDotNet.Diffusion.FastGeneration

SANA Sprint model for ultra-fast 1-step generation from the SANA architecture.

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

For Beginners

SANA is already fast due to its efficient architecture. SANA Sprint makes it even faster — single-step generation at 1024x1024 resolution. This makes it one of the fastest high-resolution generators available, suitable for real-time applications like interactive image editing.

How It Works

SANA Sprint is the distilled version of SANA that generates 1024x1024 images in a single step. Uses the efficient linear attention DiT backbone from SANA combined with hybrid distillation (consistency + adversarial) for real-time generation.

Reference: NVIDIA, “SANA Sprint: One-Step Diffusion with Continuous-Time Consistency Distillation”, 2025

Example

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

Constructors

Constructor Summary
SANASprintModel(NeuralNetworkArchitecture<T> architecture, DiffusionModelOptions<T> options, INoiseScheduler<T> scheduler, SiTPredictor<T> predictor, StandardVAE<T> vae, IConditioningModule<T> conditioner, int? seed) Initializes a new SANA Sprint model.

Properties

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

Methods

Method Summary
ModelMetadata<T> GetModelMetadata()