AllegroModel<T>

Models & Types · AiDotNet.Diffusion.Video

Allegro efficient DiT-based video generation model.

Inheritance: DiffusionModelBase<T> → LatentDiffusionModelBase<T> → VideoDiffusionModelBase<T> → AllegroModel<T>

For Beginners

Allegro is an open-source AI video generator that achieves commercial-level quality with only 3 billion parameters. It creates videos from text prompts with good visual quality and prompt adherence, making advanced video generation accessible to researchers.

How It Works

References:

  • Paper: “Allegro: Open the Black Box of Commercial-Level Video Generation Model” (Community, 2024)

Allegro is a ~3B parameter DiT-based video generation model focused on efficiency and quality. It achieves commercial-level quality through careful architecture design, data curation, and training strategies while remaining accessible for research. Supports text-to-video generation with good prompt adherence.

Technical specifications:

  • Architecture: Efficient DiT + 3D VAE
  • Latent channels: 4
  • Default: 88 frames at 15 FPS
  • Supports I2V: Yes | T2V: Yes | V2V: No

Example

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

Constructors

Constructor Summary
AllegroModel(NeuralNetworkArchitecture<T> architecture, DiffusionModelOptions<T> options, INoiseScheduler<T> scheduler, DiTNoisePredictor<T> predictor, TemporalVAE<T> temporalVAE, IConditioningModule<T> conditioner, int defaultNumFrames, int defaultFPS) Initializes a new instance of AllegroModel with full customization support.

Properties

Property Summary
IConditioningModule<T> Conditioner { get; }
INoisePredictor<T> NoisePredictor { get; }
IVAEModel<T> TemporalVAE { get; }
IVAEModel<T> VAE { get; }
bool SupportsImageToVideo { get; }
bool SupportsTextToVideo { get; }
bool SupportsVideoToVideo { get; }
int LatentChannels { get; }

Methods

Method Summary
ModelMetadata<T> GetModelMetadata()