LayerAnimate: Layer-level Control for Animation


Gradio Demo for LayerAnimate: Layer-level Control for Animation.
Github Repo can be found at https://github.com/IamCreateAI/LayerAnimate
The template is inspired by Framer.

Usage:

  1. Select a pretrained model via the "Pretrained Model" dropdown of choices in the right column.
  2. Upload frames in the right column.
      1.1. Upload the first frame.
      1.2. (Optional) Upload the last frame.
  3. Input layer-level controls in the left column.
      2.1. Upload layer mask images for each layer, which can be obtained from many tools such as https://huggingface.co/spaces/yumyum2081/SAM2-Image-Predictor.
      2.2. Choose a control type from "motion score", "trajectory" and "sketch".
      2.3. For trajectory control, you can draw trajectories on layer regions.
        2.3.1. Click "Add New Trajectory" to add a new trajectory.
        2.3.2. Click "Reset" to reset all trajectories.
        2.3.3. Click "Delete Last Step" to delete the lastest clicked control point.
        2.3.4. Click "Delete Last Trajectory" to delete the whole lastest path.
        2.3.5. Or upload a trajectory file in json format, we provide examples below.
      2.4. For sketch control, you can upload a sketch video.
  4. We provide four layers for you to control, and it is not necessary to use all of them.
  5. Click "Run" button to generate videos.
  6. Note: Remember to click "Clear" button to clear all the controls before switching to another example.
Layer Masks

Note: Layer mask for the last frame is not required in I2V mode.

Layer Regions
Choose A Control Type

Is the layer valid?

Is the layer static?

Layer Masks

Note: Layer mask for the last frame is not required in I2V mode.

Layer Regions
Choose A Control Type

Is the layer valid?

Is the layer static?

Layer Masks

Note: Layer mask for the last frame is not required in I2V mode.

Layer Regions
Choose A Control Type

Is the layer valid?

Is the layer static?

Layer Masks

Note: Layer mask for the last frame is not required in I2V mode.

Layer Regions
Choose A Control Type

Is the layer valid?

Is the layer static?

Pretrained Model

Citation

@article{yang2025layeranimate,
author    = {Yang, Yuxue and Fan, Lue and Lin, Zuzeng and Wang, Feng and Zhang, Zhaoxiang},
title     = {LayerAnimate: Layer-level Control for Animation},
journal   = {arXiv preprint arXiv:2501.08295},
year      = {2025},
}
Examples
First Frame Last Frame Choose A Control Type Layer Mask for First Frame Layer Mask for Last Frame Motion Score Sketch Valid Static Choose A Control Type Layer Mask for First Frame Layer Mask for Last Frame Motion Score Trajectory File Valid Static Choose A Control Type Layer Mask for First Frame Layer Mask for Last Frame Motion Score Trajectory File Sketch Valid Static Choose A Control Type Layer Mask for First Frame Layer Mask for Last Frame Motion Score Sketch Valid Static Seed