PyramidFlowModel<T>
Models & Types · AiDotNet.Diffusion.Video
Pyramid Flow multi-resolution video generation via pyramid flow matching.
Inheritance: DiffusionModelBase<T> → LatentDiffusionModelBase<T> → VideoDiffusionModelBase<T> → PyramidFlowModel<T>
For Beginners
Pyramid Flow generates videos by starting at low resolution and progressively adding detail, similar to building a pyramid. This multi-resolution approach produces more globally consistent results and is computationally efficient.
How It Works
References:
- Paper: “Pyramid Flow: Multi-Resolution Flow Matching for Video Generation” (Community, 2024)
Pyramid Flow generates videos at multiple resolutions using a pyramid flow matching approach. Starting from low resolution, each pyramid level adds spatial and temporal detail through cascaded flow matching. This enables efficient long-form video generation with progressive quality enhancement.
Technical specifications:
- Architecture: Pyramid DiT + Multi-Resolution Flow Matching
- Latent channels: 16
- Default: 65 frames at 24 FPS
- Supports I2V: Yes | T2V: Yes | V2V: No
Example
var options = new DiffusionModelOptions<float> { LatentChannels = 16, DefaultInferenceSteps = 20 };
var noise = Tensor<float>.CreateRandom(new[] { 1, 16, 65, 96, 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 PyramidFlowModel<float>(options: options))
.Build(trainX, trainY);
var video = result.Predict(noise);
Constructors
| Constructor | Summary |
|---|---|
PyramidFlowModel(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 PyramidFlowModel 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() |