Nodes/NKD Preview Tools/😺NKD Timeline
ComfyUI Node

😺NKD Timeline

Lay several videos and audio tracks on a multi-track timeline and get fps, frame count and resolution back as connectable sockets, so the material can be coordinated before it enters the graph. Gaps in the timeline are regions to generate: the `coverage` output is WHITE there, ready to use as a temporal inpainting mask.

By Nekodificador·Created 5 months ago·Updated 3 days ago· 33
😺NKD Timeline
  • media
  • images
  • mask
  • coverage
  • generate
  • audio
  • width
  • height
  • fps
  • frame_count
  • duration
  • current_frame
  • current_image
  • markers
timeline
import_modestack
aspect_ratioCustom
width0
height0
megapixels1.00
size_multiple16
fitcontain
fps24.00
modelfree
quantize_n8
start_frame0
frame_count0
clip_audiotrue
clip_markersfalse
Category😺NKD Nodes/Preview

Inputs (16)

NameTypeDefaultDescription
mediaCOMFY_AUTOGROW_V3Connect a video, an image sequence, a mask or audio - the same socket takes any of them and the timeline puts it on the right lane. More slots appear as you connect.
timelineSTRING
import_modeCOMBOstackWhere a newly connected source is placed. 'stack' gives each one its own track from frame 0, so they layer like any other timeline - the higher track is the one you see. 'append' puts it after the previous one on the same track, to assemble a sequence.
aspect_ratioCOMBOCustom'Custom' uses width/height below, which is what this node always did. Any other ratio computes them from the megapixel budget, and the monitor follows immediately - no run needed.
widthINT00–163840 = take the width of the first clip.
heightINT00–163840 = take the height of the first clip.
megapixelsFLOAT1.000.05–16Pixel budget for the chosen ratio. Ignored when aspect_ratio is 'Custom'.
size_multipleINT161–64Round the computed size to a multiple of this. Match the model's canvas grid (MiniMax H3 uses 32) or it resizes every frame again on its way in.
fitCOMBOcontainHow a clip is fitted when its aspect ratio does not match the output. The preview shows this live.
fpsFLOAT24.001–240Timeline frame rate. Sources at a different rate are resampled.
modelCOMBOfreeThe model this timeline feeds. Its frame count is snapped to the grid that model requires: Wan, Hunyuan Video, Kandinsky, Cosmos Predict and SCAIL use 4n+1; LTX and Cosmos 1 use 8n+1; Mochi uses 6n+1; MiniMax H3 uses 17n+5.
quantize_nINT81–256Only used by 'custom (multiple of N)'.
start_frameINT00–1000000
frame_countINT00–10000000 = up to the end of the last clip.
clip_audioBOOLEANtrueInclude the videos' own audio in the mix.
clip_markersBOOLEANfalseAlso emit the first and last frame of every picture clip on the 'markers' output, AHEAD of the hand-placed markers: clip 1 in, clip 1 out, clip 2 in… NKD Freeze Frames then freezes each cut's boundary frames without marking them by hand.

Outputs (13)

NameTypeDescription
imagesIMAGE
maskMASKThe mask lane, and nothing else.
coverageMASKWhite where there is NO material, i.e. the stretches the editor labels 'generate'. Feed it straight to a temporal inpainting mask. For the gaps PLUS the mask lane, use 'generate'.
generateMASKEverything the model should generate: the mask lane UNION the gaps. A gap is a region to generate, so it belongs in the conditioning mask - 'mask' alone leaves it black and nothing is generated there. This is the socket for temporal inpainting.
audioAUDIO
widthINT
heightINT
fpsFLOAT
frame_countINT
durationFLOATLength of the output range in seconds.
current_frameINT
current_imageIMAGE
markersSTRINGComma-separated indices of the freeze-frame markers (press M on a clip), counted INTO the 'images' batch. Feed it to NKD Freeze Frames.