LoongModel<T>
Models & Types · AiDotNet.Diffusion.Video.LongVideo
Loong autoregressive LLM-based minute-long video generator.
Inheritance: DiffusionModelBase<T> → LatentDiffusionModelBase<T> → VideoDiffusionModelBase<T> → LoongModel<T>
For Beginners
Loong uses a large language model approach to generate minute-long videos by treating video frames as tokens in a sequence. This autoregressive approach naturally handles long-range temporal dependencies.
How It Works
References:
- Paper: “Loong: Generating Minute-level Long Videos with Autoregressive Language Models” (2024)
Loong generates minute-long videos using an autoregressive LLM-based approach with progressive short-to-long training. It addresses the loss imbalance problem for long video training through a novel loss re-weighting scheme. The model treats video generation as next-token prediction over visual tokens.
Technical specifications:
- Architecture: Autoregressive LLM + Progressive Short-to-Long Training
- Latent channels: 16
- Default: 480 frames at 8 FPS
- Supports I2V: Yes | T2V: Yes | V2V: No
Example
var options = new DiffusionModelOptions<float> { LatentChannels = 16, DefaultInferenceSteps = 50 };
var noise = Tensor<float>.CreateRandom(new[] { 1, 16, 480, 60, 106 });
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 LoongModel<float>(options: options))
.Build(trainX, trainY);
var longVideo = result.Predict(noise);
Constructors
| Constructor | Summary |
|---|---|
LoongModel(NeuralNetworkArchitecture<T> architecture, DiffusionModelOptions<T> options, INoiseScheduler<T> scheduler, DiTNoisePredictor<T> predictor, TemporalVAE<T> temporalVAE, IConditioningModule<T> conditioner, int defaultNumFrames, int defaultFPS, int? seed) |
Initializes a new instance of LoongModel 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() |