😺NKD Audio Timeline
Cut your sound without leaving the graph
- media
- audio
- audio_ranges
- duration
- frame_count
- fps
Sound is the part nobody edits
Video generation in ComfyUI is all about frames, and the audio is an afterthought - load a take, hope the sound survives, export it. NKD Audio Timeline is the "actually edit the sound" half of NKD Preview Tools, Nekodificador's pack (same author behind the NKD VFX and Klein tools that people genuinely use daily). It's the same multi-track editor as NKD Timeline with the picture taken away, which means you can cut a reference track without paying for a whole video timeline.
The node is a two-parter like its big sibling: the editor frontend serializes your cut into a hidden timeline widget, and the Python backend parses it and mixes real audio - per-clip gain, fades and mutes applied, one AUDIO tensor out the other side. You get a waveform you can actually work against: peak and body, both channels side by side, detail down to the individual sample as you zoom, and a dB scale for the quiet dialogue track that otherwise reads as a flat line.
The inputs that matter
media- the autogrow socket acceptsAUDIOorVIDEO. Drop a video in and it reads only the audio track, without decoding a single frame. Pulling the voice out of a long take is instant; no extractor node in the graph.fps- sound has no frames of its own, so this is what makes a cut land on the same frame as the picture it'll be married to. Set it to match the video timeline you're cutting against.import_mode-append(the default) assembles sources in sequence on one lane, the usual thing for sound.stackgives each source its own lane so two can overlap - that's your crossfade, or a music bed under dialogue.start_frame/frame_count- the in point and how much to render;frame_count0 runs to the end of the material.
The outputs are the numbers you'd want wired onward: audio is the mix, and frame_count, duration and fps are sockets, so if the sound is what should decide how long the picture is, you can drive the video side from it.
Editing
Everything from the video timeline's transport works the same: drag to move, drag edges to trim, Space plays, J/K/L shuttles, I/O set in and out, Ctrl+Z undoes, Ctrl+wheel zooms, F fits. The additions are the audio ones. W blades the clip at the playhead. Drag the volume line up or down to set level - Shift snaps to 3 dB steps, Ctrl is ten times finer, and the dotted line marks 0 dB. The round handles at the top corners are the fade in and fade out; park the playhead and pick Fade in to playhead from the clip's right-click menu to place one exactly. Blade a stretch and mute or fade just that piece, which is the whole trick for cutting around a mistake.
Install and run
Same pack as the rest of NKD Preview Tools - no models, no Python deps beyond core (PyAV handles the decoding). Install via Manager (search "NKD Preview Tools") or:
cd ComfyUI/custom_nodes
git clone https://github.com/Nekodificador/ComfyUI-NKD-Preview-Tools
Restart, add it under 😺NKD Nodes/Preview, connect a Load Audio or a Load Video, and hit the wave button in the bar when a track reads too quiet.
Gotchas
Connect nothing and you get silence of the requested length, not a crash - the fallback is a 44.1 kHz silent track, so an empty graph still runs. And if your two sources won't sit on top of each other, you're in append mode; flip to stack.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| media | COMFY_AUTOGROW_V3 | Connect audio, or a video to work on its sound - the picture is ignored and only the audio track is read, without decoding a single frame. More slots appear as you connect. | |
| timeline | STRING | — | |
| fps | FLOAT | 24.0000.1–240 | Frames the timeline is measured in. Sound has no frames of its own, so this is what makes a cut land on the same frame as the picture it will be married to. |
| start_frame | INT | 00–1000000 | First frame to render. The in point. |
| frame_count | INT | 00–1000000 | 0 = to the end of the material. |
| import_mode | COMBO | append | Where a newly connected source lands. 'append' puts it after the previous one on the same lane, to assemble a sequence - the usual thing for sound. 'stack' gives each source its own lane so they can overlap, which is what a crossfade or a music bed under dialogue needs. |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| audio | AUDIO | — |
| audio_ranges | STRING | The SILENT stretches — muted clips and gaps no clip covers — as in,out second pairs (e.g. 0.292,0.833), relative to the rendered range: the exact syntax MVEx Audio Mask To Latent's time_ranges input parses. Mute a clip to mark its sound for regeneration. |
| duration | FLOAT | — |
| frame_count | INT | — |
| fps | FLOAT | — |