Nodes/ComfyUI-CineTimeline/CineTimeline|精确时长与续接边界
ComfyUI Node

CineTimeline|精确时长与续接边界

End the Segment on the Exact Frame and Hand the Next One a Usable Boundary

By bo341805sg·Created about a month ago·Updated 4 days ago· 0
CineTimeline|精确时长与续接边界
  • images
  • audio
  • native_images
  • native_audio
  • video_vae
  • audio_vae
  • images
  • audio
  • boundary_latent_path
  • summary
extension_plan
firstpass_latent_path
fps24.00

The interesting part of a shot is its last 39 frames

Any video model that generates in fixed-length chunks has a seam problem, and H3 is no exception. MiniMax H3 snaps its internal lengths to 17k+5, your timeline thinks in clean 5–15 second segments at 24 fps, and the model's own multi-reference conditioning means the next segment usually wants to see the tail of the last one. That tail is where all the trouble lives: a frame or two of alignment remainder, a duplicated anchor frame, and a half-second of audio that used to get spliced by hand.

The old way - grab the last visible frame, feed it forward, hard-cut the audio at the segment boundary - produced the classic results. Motion restarts slightly. The room tone drops a level right at the cut. CineExactSegment is the node that exists to make that boundary exact and audible-clean, and it's the piece you'd reach for as soon as your stitches stop being invisible.

What it actually does

It takes two parallel decodes of the same segment: images and audio (the processed route - whatever your upscaler or enhancer produced), and native_images / native_audio (the raw first-pass decode, untouched). Plus two strings it does not want you to hand-type: extension_plan (JSON from the pack's continuation planner) and firstpass_latent_path.

From the plan it reads requested_frame_count and, when continuation is enabled, context_length - 22 frames by default. That's the overlap the renderer glued onto the front of the clip so the model had motion context. The node crops it off, crops both routes on the same frame clock, and crops the audio at that same offset using the waveform's real sample rate, so picture and sound never drift apart. fps defaults to 24 and everything here assumes 24.

Then the part that matters. If the delivered window happens to land exactly at the end of the native clip, it just returns firstpass_latent_path and reuses the aligned first-pass latent - no re-encoding, no drift. Otherwise it encodes the native tail into a fresh motion-context boundary: 39 frames if the segment is long enough (that's 12 H3 latent steps, and it covers the 24-frame audio window too), else 22, else 5. It encodes native_frames, never the upscaled video, which is the whole point - the next segment should continue from the sampler's pixels, not from your upscaler's impression of them. It also asserts the VAE produced exactly 12, 7 or 2 latent frames for those windows, so a wrong VAE fails loudly instead of quietly conditioning the next shot on garbage.

Two outputs go somewhere, two are for you. images and audio are the trimmed deliverable. boundary_latent_path is the string the next segment's motion-context load consumes. summary is a one-line description of what it did, and it's printed to console as well - the fastest way to confirm the trim actually happened.

Installing it

CineExactSegment ships in ComfyUI-CineTimeline. Manager search is CineTimeline; manually:

cd ComfyUI/custom_nodes
git clone https://github.com/bo341805sg/ComfyUI-CineTimeline
# restart ComfyUI, then hard-refresh the browser (Ctrl+Shift+R)

The pack itself declares no pip dependencies, but this node reaches into MiniMaxH3MotionContextSaveLatent, which means ComfyUI-H3-Motion-Context has to be installed too - it's a separate GPL-3.0 plugin, deliberately kept outside this Apache-2.0 pack. No weights to download for this node.

Where people get burned

Missing Motion Context plugin. The node does a late lookup of that class mapping. No plugin, no class, execution error - and it bites at run time, after the sampling you just paid for.

Insufficient video frames: need 36+124, got 157. Your processed route and native route aren't the same length, or the plan asked for more frames than the render produced. It's telling you the two inputs disagree with each other.

Segment too short for an H3 continuation boundary. Fewer than 5 delivered frames. H3's minimum context window is 5 frames, and below that there is nothing honest to hand over.

Silent padding at the tail. If the audio waveform is shorter than the requested frame count, the crop pads it with silence rather than erroring. If your last third of a second is dead air, check whether you asked for more time than the model returned.

H3 boundary VAE frame grid changed. You're not using the H3 video VAE. This is a good error - the alternative is a boundary latent that looks fine and conditions the next shot badly.

One honest caveat: the author's only verified environment is Windows, ComfyUI 0.30.0, on a two-GPU box. That's not a reason to avoid the node, it's a reason to expect the failure messages above to be your documentation.

CategoryCineTimeline/Production

Inputs (9)

NameTypeDefaultDescription
imagesIMAGE
audioAUDIO
native_imagesIMAGE
native_audioAUDIO
video_vaeVAE
audio_vaeVAE
extension_planSTRING
firstpass_latent_pathSTRING
fpsFLOAT24.00

Outputs (4)

NameTypeDescription
imagesIMAGE
audioAUDIO
boundary_latent_pathSTRING
summarySTRING