Nodes/VLM_nodes/VLA Action Chunk Replan
ComfyUI Node Runs on cloud

VLA Action Chunk Replan

Smooth the seam between two action chunks

By gokayfem·Created 3 years ago·Updated 9 days ago· 583
VLA Action Chunk Replan
  • previous_actions
  • new_actions
  • replanned_actions
  • replan_report
executed_steps1
transition_steps2
max_horizon16

Robot policies don't plan forever - they output an action chunk (a fixed horizon of steps, say 16), execute some of them, then re-plan from the new state. The flaw in that loop is the seam: the tail of the old chunk and the head of the new chunk rarely line up, so the robot can jerk at every boundary. VLA Action Chunk Replan is the fix - it blends the unexecuted edge of the previous chunk into the new plan so the transition is continuous instead of a jump.

The inputs are the two chunks plus three tuning knobs. previous_actions is the chunk you already planned (the one whose tail you're carrying over), new_actions is the freshly planned chunk, and executed_steps (default 1) tells the node how many steps of the old chunk actually ran. transition_steps (default 2) is how many steps the blend spans - the overlap region where old and new get merged. max_horizon (default 16) caps how long the combined output can be.

Mechanically it's a weighted blend over the transition window: near the start of the new chunk, the old plan's unexecuted tail still dominates (because it was already trusted); across transition_steps, the new plan takes over. The result is a single replanned_actions chunk that starts where the old one was heading and curves into where the new one wants to go, instead of snapping. That's the difference between a robot that moves like it's on rails and one that shudders at every re-plan.

Two outputs: replanned_actions (the merged VLA_ACTIONS handle) and replan_report - a string describing what the blend did, which steps came from where, and how many got replaced. The node's own description is honest about the workflow: validate the result afterward. Replanning changes numbers, so it belongs upstream of the safety gate, not downstream of it.

Installing it

Part of the main pack - ComfyUI Manager (search "ComfyUI VLM nodes") or:

cd ComfyUI/custom_nodes
git clone https://github.com/gokayfem/ComfyUI_VLM_nodes
python -m pip install -r ComfyUI/custom_nodes/ComfyUI_VLM_nodes/requirements.txt

Pure data node - no policy or robot SDKs needed.

Common issues

  • Replanned chunk still jumpstransition_steps is probably too small to bridge the difference between the two plans. Raise it, but remember a bigger window also drags more stale old-plan behavior into the new chunk.
  • executed_steps wrong → if you tell it you executed 5 steps when only 2 ran, the blend starts from the wrong place in the old chunk and the seam reappears. Keep this in sync with what actually executed.
  • Horizon changed unexpectedlymax_horizon is a cap, and the merge can shrink or grow the chunk within it. Check replan_report - it tells you the final length.
  • Skipping the safety gate after replanning → don't. Replanning is exactly the kind of transformation that can push a value out of bounds; run the result through the gate before anything downstream.

The boring-but-correct workflow is: Policy → Chunk Replan → Safety Gate → controller. Replan makes the motion smooth; the gate makes sure smoothing didn't break the rules.

CategoryVLM Nodes/Robotics/Actions

Inputs (5)

NameTypeDefaultDescription
previous_actionsVLA_ACTIONS
new_actionsVLA_ACTIONS
executed_stepsINT10–4096
transition_stepsINT20–128
max_horizonINT161–4096

Outputs (2)

NameTypeDescription
replanned_actionsVLA_ACTIONS
replan_reportSTRING