Highlight: ATI motion transfer tools + demo is added. Scroll down to see the updates
This is the repo for Wan2.1 ATI (Any Trajectory Instruction for Controllable Video Generation), a trajectory-based motion control framework that unifies object, local and camera movements in video generation. This repo is based on Wan2.1 offical implementation.
Compared with the original Wan2.1. We add the following files:
where -p is the path to the config file, -c is the path to the checkpoint, -o is the path to the output directory, -g defines the number of gpus to use (if unspecificed, all avalible GPUs will be used; if 1 is given, will run on single process mode).
Once finished, you will expect to fine:
samples/outputs for the raw output videos.
samples/images_tracks shows the input image togather with the user specified trajectories.
samples/outputs_vis shows the output videos togather with the user specified trajectories.
Expected results:
Input Image & Trajectory
Generated Videos (Superimposed Trajectories)
Motion Transfer
ATI can mimic a video by extracting its motion dynamics along with its first-frame image. Moreover, by leveraging powerful image-editing tools, it also enables “video-editing” capabilities.
First, extract motions from videos using the following script:
We provide an interactive tool that allow users to draw and edit trajectories on their images.
Important note: app.py should only be run on localhost, as running it on a remote server may pose security risks.
Get the interface shown below, then click Choose File to open a local image.
Available trajectory functions:
a. Free Trajectory: Click and then drag with the mouse directly on the image. b. Circular (Camera Control):
Place a circle on the image, then drag to set its size for frame 0.
Place a few (3–4 recommended) track points on the circle.
Drag the radius control to achieve zoom-in/zoom-out effects.
c. Static Point: A point that remains stationary over time.
Note: Pay attention to the progress bar in the box to control motion speed.
Trajectory Editing: Select a trajectory here, then delete, edit, or copy it. In edit mode, drag the trajectory directly on the image. The selected trajectory is highlighted by color.
Camera Pan Control: Enter horizontal (X) or vertical (Y) speed (pixels per frame). Positive X moves right; negative X moves left. Positive Y moves down; negative Y moves up. Click Add to Selected to apply to the current trajectory, or Add to All to apply to all trajectories. The selected points will gain a constant pan motion on top of their existing movement.
Important: After editing, click Store Tracks to save. Each image (not each trajectory) must be saved separately after drawing all trajectories.
Once all edits are complete, locate the videos_example folder in the Trajectory Editor.
Citation
Please cite our paper if you find our work useful:
@article{wang2025ati,
title={{ATI}: Any Trajectory Instruction for Controllable Video Generation},
author={Wang, Angtian and Huang, Haibin and Fang, Zhiyuan and Yang, Yiding, and Ma, Chongyang}
journal={arXiv preprint},
volume={arXiv:2505.22944},
year={2025}
}
ATI: Any Trajectory Instruction for Controllable Video Generation
Highlight: ATI motion transfer tools + demo is added. Scroll down to see the updates
This is the repo for Wan2.1 ATI (Any Trajectory Instruction for Controllable Video Generation), a trajectory-based motion control framework that unifies object, local and camera movements in video generation. This repo is based on Wan2.1 offical implementation.
Compared with the original Wan2.1. We add the following files:
We modified the following files:
Community Works
ComfyUI
Thanks for Kijai develop the ComfyUI nodes for ATI: https://github.com/kijai/ComfyUI-WanVideoWrapper
FP8 quant Huggingface Model: https://huggingface.co/Kijai/WanVideo_comfy/blob/main/Wan2_1-I2V-ATI-14B_fp8_e4m3fn.safetensors
Guideline
Guideline by Benji: https://www.youtube.com/watch?v=UM35z2L1XbI
Install
ATI requires a same environment as offical Wan 2.1. Follow the instruction of INSTALL.md (Wan2.1).
Install packages
First you need to download the 14B original model of Wan2.1.
Then download ATI-Wan model from our huggingface repo.
Finally, copy VAE, T5 and other misc checkpoint from origin Wan2.1 folder to ATI checkpoint location
Run
We provide a demo sript to run ATI.
where
-pis the path to the config file,-cis the path to the checkpoint,-ois the path to the output directory,-gdefines the number of gpus to use (if unspecificed, all avalible GPUs will be used; if1is given, will run on single process mode).Once finished, you will expect to fine:
samples/outputsfor the raw output videos.samples/images_tracksshows the input image togather with the user specified trajectories.samples/outputs_visshows the output videos togather with the user specified trajectories.Expected results:
Motion Transfer
First, extract motions from videos using the following script:
Then run ATI inference
Expected result
Create You Own Trajectory
We provide an interactive tool that allow users to draw and edit trajectories on their images. Important note: app.py should only be run on localhost, as running it on a remote server may pose security risks.
First run:
then open this url localhost:5000 in the browser.
Get the interface shown below, then click Choose File to open a local image.

Available trajectory functions:

a. Free Trajectory: Click and then drag with the mouse directly on the image.
b. Circular (Camera Control):
c. Static Point: A point that remains stationary over time.
Note: Pay attention to the progress bar in the box to control motion speed.

Trajectory Editing: Select a trajectory here, then delete, edit, or copy it. In edit mode, drag the trajectory directly on the image. The selected trajectory is highlighted by color.

Camera Pan Control: Enter horizontal (X) or vertical (Y) speed (pixels per frame). Positive X moves right; negative X moves left. Positive Y moves down; negative Y moves up. Click Add to Selected to apply to the current trajectory, or Add to All to apply to all trajectories. The selected points will gain a constant pan motion on top of their existing movement.

Important: After editing, click Store Tracks to save. Each image (not each trajectory) must be saved separately after drawing all trajectories.

Once all edits are complete, locate the
videos_examplefolder in the Trajectory Editor.Citation
Please cite our paper if you find our work useful: