Flexible Motion In-betweening with Diffusion Models

Setareh Cohan, Guy Tevet, Daniele Reda, Xue Bin Peng, Michiel van de Panne

TL;DR

CondMDI introduces a simple, unified diffusion-based framework for human motion in-betweening that seamlessly handles highly flexible spatial and temporal constraints, including sparse keyframes and partial body poses, alongside text prompts. By explicitly training on randomly masked motion sequences with a global root representation, it generates diverse, high-quality animations with minimal keyframe error. Crucially, it achieves these results with significantly faster inference times than existing inference-time guidance methods.

What Problem Does This Paper Address?

Keyframe in-betweening—the process of filling in the motion frames between user-specified poses—is a foundational but notoriously labor-intensive task in character animation. While deep learning approaches like RNNs and Transformers have automated parts of this workflow, they often struggle with long-term dependencies or are restricted to rigid, fixed keyframe configurations.

Recent denoising diffusion models excel at generating realistic, text-conditioned human motion, but incorporating precise spatial constraints (like a specific hand position at a specific frame) remains an open challenge. Existing diffusion methods either suffer from severe artifacts like foot sliding, require slow and complex inference-time optimization loops, or cannot support partial pose constraints (such as animating a full body using only sparse tracking data from a VR headset).

Methods

The authors propose Conditional Motion Diffusion In-betweening (CondMDI), an explicit conditional diffusion model built on a UNet architecture with 1D convolutions.

Unlike methods that attempt to force constraints onto a pre-trained model at inference time, CondMDI is trained from scratch to handle missing data. During training, a Random Mask Generator randomly selects a subset of frames ($K$) and a subset of joints ($j$) to act as the "observed" keyframes.

The model receives a combination of inputs:

  1. The noisy motion sequence ($x_t$).
  2. The diffusion timestep ($t$).
  3. A text prompt ($p$), encoded via a pre-trained CLIP text embedder.
  4. The keyframe control signal ($c$).
  5. A binary observation mask ($m$) indicating exactly which joints and frames are constrained.

A key technical modification is the shift from a relative root joint representation to a global root representation. Standard motion datasets represent root positions relative to the previous frame, which causes errors to compound over time and makes sparse temporal keyframing highly unstable. Converting these to absolute global coordinates allows CondMDI to anchor motions precisely to sparse keyframes.

CondMDI Overview Pipeline

Datasets

The model was trained and evaluated on HumanML3D, a large-scale benchmark containing 14,646 text-annotated human motion sequences sourced from the AMASS and HumanAct12 datasets. The sequences feature variable lengths (averaging 7.1 seconds) and are padded to a fixed length of 196 frames at 20 frames per second. The authors adapted the standard 263-dimensional feature vector of this dataset to incorporate their global root coordinate system.

Key Insights and Ideas

  • Training for the Unexpected: By exposing the network to completely randomized masking patterns during training (varying both the timing and the specific joints observed), the model naturally learns a unified prior for any in-betweening scenario—whether it's dense keyframes, sparse keyframes, or partial joint trajectories.
  • The Failure of Pure Imputation: The authors demonstrate that simply replacing noisy latents with ground-truth keyframes at inference time (pure imputation) fails dramatically. The diffusion model treats the sudden injection of clean data as noise, resulting in jarring physical jumps before and after keyframes.
  • Global Coordinates Unlock Sparsity: Transitioning the data representation to global root coordinates is what fundamentally enables the model to resolve sparse temporal constraints without drifting.

Key Results

CondMDI demonstrates excellent performance across both quantitative metrics and qualitative diversity:

  • Keyframe Accuracy vs. Quality: On the HumanML3D test set with 5 randomly placed full keyframes ($K=5$), CondMDI achieves a highly competitive Fréchet Inception Distance (FID) of 0.1731 and a low keyframe error of 0.1789. When keyframes are increased to $K=20$, the keyframe error drops to a mere 0.0754.
  • Trajectory Control: For root-joint trajectory control, CondMDI achieves an FID of 0.2474, outperforming the state-of-the-art OmniControl model (FID 0.322) while maintaining a much simpler architecture.
  • Inference Speedup: Because CondMDI avoids repeated, computationally heavy guidance iterations at inference time, it is significantly faster than its competitors. It clocks an inference time of 54.39 seconds, compared to OmniControl's 183.79 seconds and GMD's 166.42 seconds.
  • Qualitative Versatility: The model successfully synthesizes highly dynamic and complex motions, such as karate kicks and yoga sequences, from sparse inputs. It also excels at generating diverse motion possibilities from the exact same keyframe constraints.
Ablation comparisons showing the smoothness of CondMDI vs traditional imputation

Limitations and Future Work

Despite its strong performance, the authors note a few limitations:

  • Physical Artifacts: The generated animations still occasionally exhibit minor foot sliding (footskate) and high-frequency motion jitter during highly explosive or dynamic movements. Incorporating a dedicated physics-based simulation or smoothness loss could mitigate this.
  • Unbalanced Feature Representation: The underlying HumanML3D dataset structure introduces redundancies that can cause the model to occasionally treat very sparse spatial constraints as noise.
  • Real-world Grounding: The training mask generator is entirely randomized. The authors suggest that grounding the mask selection in actual animator workflows (e.g., typical keyframe combinations used in industry) would make the model even more practical.

Summary updated

BibTeX
@inproceedings{cohan2024flexible,
  author = {Setareh Cohan and Guy Tevet and Daniele Reda and Xue Bin Peng and Michiel van de Panne},
  title = {{Flexible Motion In-betweening with Diffusion Models}},
  booktitle = {SIGGRAPH (Conference Paper Track)},
  year = {2024},
  doi = {10.1145/3641519.3657414},
}
Figure