Pianosequenza-True_long · Extend
Keeping H3's clock from drifting at every seam
- clip
- vae
- previous_latent
- last_frame
- reference_image
- positive
- latent
- actual_head_context_frames
- ignored_tail_frames
- handover_info
Every long-video workflow in this ecosystem is a stitching problem wearing a trench coat. Wan users hit identity drift at chunk boundaries; LTX users hit prompt drift and soft seams. H3's version of the problem is more specific: 4-15 seconds native, 24 fps, and a frame count that has to land on a particular grid or the continuation doesn't line up.
Pianosequenza-True_long · Extend is the node that builds the next interval's conditioning and latent from the previous one - and its job is, bluntly, making the seam invisible. Which means you need to understand what it's aligning, because the defaults are opinionated and one of them is doing more work than the rest.
What's actually happening
You feed it the previous accepted PSkf. It pulls the native AV latent and the freeze-analysis handover out of that state and hands them to the pack's continuation engine, which builds the next interval: conditioning for the prompt you typed, and a latent seeded from the previous state's tail.
The interesting part is the grid. H3's frame counts snap to a 17k+5 lattice at 24 fps, so a 10-second request becomes 243 frames ≈ 10.125 seconds - the tooltip says so explicitly, and it's not an approximation to plan around loosely. Request 10 seconds across six segments and you accumulate nearly a second of drift versus what you thought you were making. phase_aligned_extended exists to absorb exactly that: it may reach backward to the nearest phase-0 start instead of taking the naive 22 frames of history, so the head of the new interval sits on H3's canonical timeline rather than 11 frames off it.
That reaching back is why the node reports actual_head_context_frames as an output. It's telling you what it actually used, not what you asked for.
The inputs you'll touch
Briefly, the ones that matter:
previous_latent- the PSkf. FromLoad PSkfor straight fromPack PSkf.prompt- the direction for this interval. Multiline. Write it as the next beat, not a restatement of the last one.width/height- defaults 1344×768, step 32. Match your first interval; changing aspect mid-sequence is asking for a jump cut.duration- seconds at H3's native 24 fps, snapped upward to that 17k+5 grid.context_frames- 5, 22, or 39. This is how much direct-latent motion/audio history you want to carry. 22 is the default; the pack's R45 notes describe 39-frame context preservation as the corrected value for continuous keyframe work, with 22 kept as the default. If your seams show a visible flutter, 39 is the first thing to try.alignment_mode-phase_aligned_extended(default, recommended), plusphase_aware (Legacy)andlegacy_17 (Legacy)which the tooltip itself says exist only for reproducing older workflows and A/B diagnostics. Don't start there.handover_mode-autouses the freeze analysis saved with the previous latent;manualusesmanual_landing_tail_frames. If your previous PSkf came from a workflow that didn't produce analysis, auto has nothing to read and you're on the manual path.
ref_image_size toggles between match and max. Optional last_frame is the recommended way to steer the endpoint - feed it the next pre-generated keyframe and you turn continuation into interpolation, which is the single biggest quality lever in this whole chain. Optional reference_image is a Qwen-only identity/style reference, and you address it in the prompt as <Picture 1>.
Outputs: positive (CONDITIONING, into your guider), latent (LATENT, into the sampler), plus actual_head_context_frames, ignored_tail_frames and handover_info. That last trio is your seam debugger. If ignored_tail_frames keeps coming back non-zero, you're asking for tails the alignment can't honour, and the video will tell you before the numbers do.
Install
Part of the IAMCCS-nodes pack:
cd ComfyUI/custom_nodes
git clone https://github.com/IAMCCS/IAMCCS-nodes.git
Restart ComfyUI and hard-refresh. Or ComfyUI Manager → IAMCCS Nodes. One copy only - duplicates give you stale node definitions.
No pip step (no requirements.txt), but this node needs clip and vae wired from your own H3 install, plus the model itself. ComfyUI 3.0.0+. The pack ships zero weights.
Common issues
Drifting audio. H3's audio is generated jointly with picture, so a picture-aligned seam with an audio miss sounds wrong in a way you can't unhear. This is why the context options include 39 and why the alignment mode reaches back to a phase-0 boundary. If sound and picture desync at seams, you're probably on legacy_17.
A one-frame jump at every join. Usually duration expectations. You asked for 10.0s, you got 10.125s, and your edit assumed the former. Compute your timeline from the actual frame counts the node and the sampler report, not from the durations you typed.
"Shared AV boundary mismatch: unexpected regenerated seam frames." That's a guard in the True Long path firing when a boundary revision 2 state is combined with authored visible frames and the engine would have re-sampled frames that were supposed to be identical. It means your latent and your authored interval disagree - reload the checkpoint and rebuild rather than pushing through.
It won't accept your previous latent. The input is typed IAMCCS_H3_PSKF, not LATENT. A raw sampler latent has no handover and no padding bookkeeping; pack it first.
Where it fits
Load (or Pack) → Extend → sampler → Pack → Save, repeat. Compared with Wan's 81-frame window stitching, this is the more engineered version of the same idea: instead of decoding and blending pixels at the seam, it carries the latent across. Different tradeoffs - you need the latents on disk and the engine's bookkeeping to be consistent - but no lossy round trip through the decoder, and no crossfade to hide it.
Inputs (14)
| Name | Type | Default | Description |
|---|---|---|---|
| clip | CLIP | — | |
| vae | VAE | — | |
| previous_latent | IAMCCS_H3_PSKF | Previous accepted Pianosequenza State Keyframe. | |
| prompt | STRING | — | |
| width | INT | 134432–16384 | — |
| height | INT | 76832–16384 | — |
| duration | FLOAT | 10.00.25–150 | Requested duration in seconds at H3's native 24 fps. The actual clip snaps upward to H3's 17k+5 frame grid (10.0 s -> 243 frames ~= 10.125 s). |
| context_frames | COMBO | 22 | Minimum requested direct-latent motion/audio history. phase_aligned_extended may extend backward to the nearest phase-0 start so the head stays on H3's canonical timeline. |
| handover_mode | COMBO | auto | AUTO uses freeze-analysis metadata saved with the previous latent. MANUAL uses manual_landing_tail_frames. |
| alignment_mode | COMBO | phase_aligned_extended | phase_aligned_extended is the v1.0 recommended direct-latent handover. phase_aware and legacy_17 remain only for reproducing older workflows / A-B diagnostics. |
| manual_landing_tail_frames | INT | 340–3400 | Manual/fallback desired pixel tail. phase_aligned_extended/phase_aware snap the END only to an actual latent boundary; legacy_17 requires a multiple of 17. Never trims rendered video. |
| ref_image_size | COMBO | match | 2 options: match, max |
| last_frameopt | IMAGE | Recommended: next pre-generated keyframe / target endpoint. | |
| reference_imageopt | IMAGE | Optional Qwen-only identity/style reference. Address it as <Picture 1>. |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| positive | CONDITIONING | — |
| latent | LATENT | — |
| actual_head_context_frames | INT | — |
| ignored_tail_frames | INT | — |
| handover_info | STRING | — |