Step1XEditModel<T>

Models & Types · AiDotNet.Diffusion.ImageEditing

Step1X-Edit model for one-step image editing using consistency distillation.

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

For Beginners

Step1X-Edit is the fastest editing model — it makes changes in a single step instead of the usual 20-50. This makes editing feel instant, perfect for interactive tools where you want immediate feedback.

How It Works

Step1X-Edit achieves single-step image editing through consistency distillation, mapping directly from the source image and edit instruction to the edited result in one forward pass. Built on a DiT backbone distilled from a multi-step teacher.

Technical specifications:

  • Architecture: DiT backbone with consistency distillation
  • Inference: Single-step (1 NFE) — no iterative denoising
  • Latent space: 16 channels
  • Distilled from multi-step rectified flow teacher
  • Guidance: 1.0 (distilled models don’t need CFG)

Reference: StepFun, “Step1X-Edit”, 2025

Example

var options = new DiffusionModelOptions<float> { LatentChannels = 16, DefaultInferenceSteps = 28 };
var input = 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 Step1XEditModel<float>(options: options))
    .Build(trainX, trainY);
var edited = result.Predict(input);

Constructors

Constructor Summary
Step1XEditModel(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()