Nodes/comfyui-minimax-h3-audio-T8/MiniMax H3 Trajectory Control Plan / 轨迹控制规划 (Advanced)
ComfyUI Node

MiniMax H3 Trajectory Control Plan / 轨迹控制规划 (Advanced)

Plot an object's path across the clip — without touching attention

By T8mars·Created 2 months ago·Updated about 8 hours ago· 1,158
MiniMax H3 Trajectory Control Plan / 轨迹控制规划 (Advanced)
    • trajectory_plan
    • path_preview
    • report_json
    • object_count
    ◄keyframes_json[{"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}]►
    ◄width1152►
    ◄height640►
    ◄length124►
    ◄fps24.00►
    ◄easingsmoothstep►
    ◄clip_policyclip_to_canvas►

    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 subject box 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_canvas trims out-of-bounds boxes, reject_outside refuses 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.
    • length must satisfy 17n+5; width/height must be multiples of 32. These are hard validation errors, not warnings.
    • frame must be an integer inside 0..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.
    CategoryT8/MiniMax H3/Control/Experimental/Trajectory

    Inputs (7)

    NameTypeDefaultDescription
    keyframes_jsonSTRING[{"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}]—
    widthINT115232–16384—
    heightINT64032–16384—
    lengthINT124—
    fpsFLOAT24.001–240—
    easingCOMBOsmoothstep3 options: linear, smoothstep, hold
    clip_policyCOMBOclip_to_canvas2 options: clip_to_canvas, reject_outside

    Outputs (4)

    NameTypeDescription
    trajectory_planH3_T8_TRAJECTORY_CONTROL_PLAN—
    path_previewIMAGE—
    report_jsonSTRING—
    object_countINT—