MiniMax H3 Trajectory Control Plan / 轨迹控制规划 (Advanced)
Plot an object's path across the clip — without touching attention
- trajectory_plan
- path_preview
- report_json
- object_count
Trajectory control is the "make the thing move from here to there" feature that everyone who's seen TrailBlazer wants. This node is the planning half of T8's take on it - and it's worth being precise about what that means, because the author is: it's TrailBlazer-inspired creator interaction, not a reproduction of TrailBlazer's U-Net cross-attention surgery. No attention is edited here, no U-Net is patched. What you get is a clean, normalized, per-frame description of where each object's box is across your clip - a plan that the sibling Render node turns into something H3 Fun Control can condition on.
So: this is a keyframe → trajectory converter. You write JSON keyframes, it fills in every frame between them with an easing curve, and hands you a plan object plus a visual preview. The plan node and the render node are a pair - Plan builds, Render draws - and the example workflow 07-motion-detail/2026-08-28_H3_Trajectory_Fun_Control_Advanced_EXP.json wires them together.
How it works
The one input you'll actually write is keyframes_json - a JSON list where each entry is {"frame": N, "object_id": "name", "x", "y", "width", "height", "strength"}. Note the coordinates are normalized 0..1, not pixels: x/y is the top-left corner of the box, width/height its size as a fraction of the canvas, strength how strongly that keyframe applies. The node groups entries by object_id into tracks and interpolates between keyframes per frame, using easing (linear, smoothstep, or hold), producing a full per-frame bbox for each object. Then it hashes the whole plan (SHA-256) so the Render node can detect a tampered or stale plan before drawing it.
The inputs that matter:
- keyframes_json - the whole feature. At least two keyframes for smooth motion (the default JSON is a valid starting point: one
subjectbox moving from left to right across 124 frames). - width / height - your canvas, both multiples of 32 (H3's grid rule).
- length - frame count, and it's strict: 17n+5, so 22, 39, 56, 73… (124 is default). This matches H3's frame grid. Get this wrong and the node refuses to build.
- fps - just metadata in the plan, used for timing sanity.
- clip_policy -
clip_to_canvastrims out-of-bounds boxes,reject_outsiderefuses keyframes that leave the canvas.
Outputs: trajectory_plan (the custom H3_T8_TRAJECTORY_CONTROL_PLAN object - wire this into the Render node), path_preview (an animated IMAGE of box outlines so you can eyeball the motion before rendering), report_json (status, keyframe/object counts, plan hash, and the recommended connection), and object_count (INT).
Install
Part of the T8 MiniMax H3 pack. ComfyUI Manager → search "MiniMax H3 Audio T8" → install → restart, or:
cd ComfyUI/custom_nodes
git clone https://github.com/T8mars/comfyui-minimax-h3-audio-T8.git minimax-h3-audio-T8
No pip deps (the pack's requirements.txt is intentionally empty; ComfyUI supplies the torch/audio stack). You do need a current ComfyUI - this pack uses native H3 support and newer internals (comfy_api.latest, comfy.weight_adapter, comfy.ldm.minimax). Update ComfyUI, the frontend and Manager together, then restart fully; a stale ComfyUI turns every T8 node red at startup.
Gotchas
- Coordinates are normalized 0..1, not pixels. People paste pixel coords in and wonder why boxes fly off-screen.
lengthmust satisfy 17n+5;width/heightmust be multiples of 32. These are hard validation errors, not warnings.framemust be an integer inside0..length-1. The default JSON uses frame 123 with length 124, so it fits - copy that shape.- The plan node is deliberately honest: it builds conditioning, not motion guarantees. You're steering H3 through Fun Control, not commanding a physics engine.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| keyframes_json | STRING | [{"frame":0,"object_id":"subject","x":0.10,"y":0.25,"width":0.22,"height":0.48,"strength":1.0},{"frame":123,"object_id":"subject","x":0.66,"y":0.20,"width":0.22,"height":0.48,"strength":1.0}] | — |
| width | INT | 115232–16384 | — |
| height | INT | 64032–16384 | — |
| length | INT | 1245–3600 | — |
| fps | FLOAT | 24.001–240 | — |
| easing | COMBO | smoothstep | 3 options: linear, smoothstep, hold |
| clip_policy | COMBO | clip_to_canvas | 2 options: clip_to_canvas, reject_outside |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| trajectory_plan | H3_T8_TRAJECTORY_CONTROL_PLAN | — |
| path_preview | IMAGE | — |
| report_json | STRING | — |
| object_count | INT | — |