Create Trajectory Based On KJNodes
Turn KJNodes coordinates into the trajectory video EasyAnimate actually wants
- masks
- image
This is the node that makes EasyAnimate's "trajectory control" work in ComfyUI - the thing where you drag a path across a frame and the model moves something along it. It's a bridge: it takes the coordinate data that KJNodes produces and renders it into the trajectory control video that the EasyAnimate -Control model expects.
The name isn't marketing. The node source is literally a modified copy of KJNodes' own curve/trajectory node (curve_nodes.py), reworked to match EasyAnimate's trajectory control format. So this node only exists because the pack's authors knew you'd already have KJNodes installed, and decided to adapt its output rather than reinvent the coordinate workflow.
What it does mechanically
Inputs are two things, both forced inputs (they have to be wired, not typed):
coordinates- a STRING. In practice this comes from a KJNodes node that outputs per-frame point coordinates as JSON-ish text.masks- a MASK, also from KJNodes. This node reads the mask's height and width to learn the frame dimensions.
From there it's straightforward computer graphics: for every frame, it takes the listed center coordinate and paints a Gaussian heatmap blob at that position (circle size scales with frame area). Stack the frames and you get an IMAGE batch - a little glowing dot wandering through space, which is exactly the "trajectory" the control model reads. The output is an IMAGE, and it's meant to be fed straight into the control video input of the V5/V5.1 video-to-video sampler.
The workflow it belongs to
KJNodes (coordinates) ──► CreateTrajectoryBasedOnKJNodes ──► EasyAnimateV5_V2VSampler (control_video)
KJNodes (masks) ──► └──► LoadEasyAnimateModel (model_type: Control)
Load a -Control checkpoint (EasyAnimateV5.1-12b-zh-Control is the natural pick) with model_type set to Control, wire the trajectory image into control_video, and the sampler runs the control pipeline. The same V5.1 workflow JSON ships in the pack's comfyui/v5.1/ folder if you want a ready-made graph.
Install notes and gotchas
Because it depends on KJNodes for its inputs, you need that pack too. The manual install in the pack README clones it explicitly alongside VideoHelperSuite, and ComfyUI Manager will nag you about it if a workflow uses this node without it. EasyAnimate's own README lists KJNodes as a reference project, which is the polite way of saying "you need it."
Realistic expectations: trajectory control gives you object motion control, but it's a V5.1-era feature and quality varies - it's a control signal, not a physics engine. If the dot doesn't produce the movement you wanted, the usual culprit is a mismatch between the coordinate frame and the mask size you fed in. Keep both consistent and you'll get a repeatable (if not always stunning) motion path.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| coordinates | STRING | — | |
| masks | MASK | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |