CD · Reference Handoff
How the last frame of one shot becomes the first frame of the next
- reference_handoff
- reference_json
The hardest cut in AI video isn't the one with the cool transition - it's the plain cut between two shots of the same scene, because the model that made shot one had no idea shot two was coming. The standard fix is to hand the second shot a reference: the last frame of the first, a shared anchor image, something visual to hold onto. CDReferenceHandoff is the node that makes that handoff a deliberate, recorded decision instead of "I'm pretty sure I wired the right image in."
It's from Continuity Director, a 20-node pack for repeatable AI video production, and it's one of two "directing" nodes - it sits between shots and decides what continuity reference the next generation gets.
The three strategies
You give it two JSON blobs - previous_reference_json (what shot N ended on) and next_reference_json (what shot N+1 knows about) - and pick a strategy:
- last_to_first - grabs
last_frame(falling back toframeorasset) from the previous reference. The classic "end of last shot is the start of this one" move. This is the default and the one you'll use most. - shared_anchor - looks for an
anchorin either side. Use it when both shots are supposed to be anchored to the same establishing image, like a location master shot. - manual - takes
manualfrom the current shot's reference. You're explicitly saying "here's the frame I want, stop guessing."
What comes out
Two outputs: reference_handoff (a CD_REFERENCE wire for other Continuity Director nodes) and reference_json (the full record, including the strategy and the selected reference). The record is hash-linked like everything else in the pack, so the audit trail shows which reference was chosen and how, not just that one existed.
The record doesn't generate anything - it's the contract that says "this take was meant to continue from this specific frame." Wire the reference_json into your image-to-video node's reference input, and the handoff becomes reproducible instead of vibes.
Installing it
Continuity Director installs clean because it has nothing heavy to install: no model downloads, no API keys, and requirements.txt is one comment declaring no mandatory Python dependencies. Pure standard library. In ComfyUI Manager search "Continuity Director" and restart, or:
cd ComfyUI/custom_nodes
git clone https://github.com/xinjian0101/continuity-director.git ComfyUI-ContinuityDirector
Restart ComfyUI - nodes appear as CD · ..., with a Continuity Director sidebar offering an "Add starter chain" button that scaffolds the whole pipeline. Update with git pull.
Where people get burned
The strategy names are honest but the input shape is a little loose, which is exactly where the gotcha lives. last_to_first only finds a reference if the previous JSON actually has a last_frame (or frame/asset) key - if you dump in a structure with a different key name, the handoff silently comes back with an empty selection and the node still reports success. Check the reference_json output once before you trust it in a batch, and keep your reference JSON keys consistent across shots. That's the one real trap; everything else is just "did you actually provide the reference," which the record makes easy to audit.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| previous_reference_json | STRING | {} | — |
| next_reference_json | STRING | {} | — |
| strategy | COMBO | 3 options: last_to_first, shared_anchor, manual |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| reference_handoff | CD_REFERENCE | — |
| reference_json | STRING | — |