MotionDiffuseModel<T>
Models & Types · AiDotNet.Diffusion.MotionGeneration
MotionDiffuse model for fine-grained text-driven motion generation with body part control.
Inheritance: DiffusionModelBase<T> → LatentDiffusionModelBase<T> → MotionDiffuseModel<T>
For Beginners
MotionDiffuse gives you more control over body animation than MDM. You can describe what each body part should do separately — like “wave the right hand while walking forward” — and each part follows its own instruction precisely.
How It Works
MotionDiffuse provides fine-grained control over body part motions through separate text conditioning for different body segments (arms, legs, torso). It uses a part-aware cross-attention mechanism to bind text descriptions to specific body parts.
Reference: Zhang et al., “MotionDiffuse: Text-Driven Human Motion Generation with Diffusion Model”, 2024
Example
var options = new DiffusionModelOptions<float> { LatentChannels = 263, DefaultInferenceSteps = 50 };
var noise = Tensor<float>.CreateRandom(new[] { 1, 263, 196 });
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 MotionDiffuseModel<float>(options: options))
.Build(trainX, trainY);
var motion = result.Predict(noise);
Constructors
| Constructor | Summary |
|---|---|
MotionDiffuseModel(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() |