DIAMONDModel<T>

Models & Types · AiDotNet.Diffusion.Video.WorldModels

DIAMOND diffusion-based game engine from video with action conditioning.

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

For Beginners

DIAMOND is a game engine built from video - it learns to simulate game environments from recorded gameplay. Given an action (e.g., press right), it predicts what the next frame should look like.

How It Works

References:

  • Paper: “DIAMOND: Diffusion for World Modeling” (2024)

DIAMOND (DIffusion As a Model Of eNvironment Dreams) creates a game engine from video using action-conditioned diffusion. The model learns environment dynamics from gameplay video and can generate consistent game frames conditioned on player actions, effectively creating a playable world model.

Technical specifications:

  • Architecture: Action-Conditioned Diffusion + World Dynamics Learning
  • Latent channels: 16
  • Default: 1 frames at 30 FPS
  • Supports I2V: Yes | T2V: Yes | V2V: No

Example

var options = new DiffusionModelOptions<float> { LatentChannels = 16, DefaultInferenceSteps = 10 };
var actionInput = Tensor<float>.CreateRandom(new[] { 1, 16, 1, 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 DIAMONDModel<float>(options: options))
    .Build(trainX, trainY);
var nextFrame = result.Predict(actionInput);

Constructors

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