Nodes/ComfyTV/Audio Crossfade
ComfyUI Node

Audio Crossfade

Stitch audio together without a hard cut

By jtydhr88·Created 3 months ago·Updated about 15 hours ago· 725
Audio Crossfade
  • audio_a
  • audio_b
  • video_a
  • video_b
  • audio
force_run_token0
project_id
parent_output_id0
duration1.00
curve1tri
curve2tri
overlaptrue

The hard cut is the cheapest way to ruin an otherwise fine ComfyTV project. Two tracks butted together - a song ending, a voiceover starting - feel like an edit. A crossfade feels like a transition. Audio Crossfade blends two audio tracks (or the audio of two videos) over a duration you choose, with selectable fade curves, and hands you back one seamless track.

You'll reach for it when you're assembling anything longer than a single source: stitching two halves of a track, laying a voiceover over a music bed's quiet moment, or gluing together the trimmed segments from a few Audio Trim stages. It's the audio equivalent of the pack's video xfade transitions, and if you're building a Director-style timeline with per-clip transitions, this is the glue.

How it works

The three inputs that matter are duration (the fade length in seconds, 0.01–60), curve1 and curve2 (the fade shapes for track A and track B - defaults are tri, and the source shows the options come from FFmpeg's AFADE_CURVES family: tri, sin, exp, hann, quad, etc.), and overlap (whether the two clips actually overlap during the fade, or one fades in as the other ends). Under the hood it's FFmpeg's acrossfade filter via the pack's PyAV runner.

The inputs are two optional audio-or-video sockets each: audio_a/audio_b for direct audio, video_a/video_b if you're fading the soundtracks of two clips. The output is audio (COMFYTV_AUDIO). The three "Internal" inputs - force_run_token, project_id, parent_output_id - are ComfyTV frontend plumbing; leave them alone.

Installing ComfyTV

cd ComfyUI/custom_nodes
git clone https://github.com/jtydhr88/ComfyTV

Full backend restart, then ComfyTV → AudioFX; ComfyUI Manager finds it as "ComfyTV". Zero extra Python dependencies - the crossfade runs through FFmpeg filters via PyAV, already bundled with ComfyUI. No models, nothing to download.

The README's install trap applies here like everywhere in this pack: on macOS / ComfyUI Desktop / multi-install machines, the relative cd ComfyUI/custom_nodes can silently target the wrong instance - clone "succeeds," stages never appear. Read the running instance's path from its startup log, clone into that instance's custom_nodes by absolute path (quotes if it has spaces/parentheses), confirm ComfyTV/__init__.py is top-level, and restart the backend completely.

Common issues

  • The fade sounds clicky or lopsided. If overlap is off, the fade still works but the tail of A and the head of B don't share time - it can feel abrupt. Turn overlap on and keep the two tracks trimmed so there's actually overlapping audio to blend.
  • Wrong curve makes a dip in the middle. Linear (tri) crossfades can dip in perceived loudness. sin or quad curves sound more natural for music. Try those first.
  • The result is shorter than you expected. With overlap off, output length is roughly A + B − duration; with overlap on it's the full span. Set the pieces up accordingly.
  • Nothing comes out if one input is missing. Both sides need to be connected - an empty socket yields silence, not a half-crossfade.

It's a small stage with a big payoff: the difference between "two files stitched" and "one continuous mix" is a single node you'll use constantly.

CategoryComfyTV/AudioFX

Inputs (11)

NameTypeDefaultDescription
force_run_tokenINT00–2147483647Internal — bumped on Run to invalidate ComfyUI's input cache.
project_idSTRINGInternal — populated by the projectStore on the frontend.
parent_output_idINT00–2147483647Internal — lineage parent set by spawn handlers on the frontend.
durationFLOAT1.000.01–60
curve1COMBOtri20 options: tri, qsin, hsin, esin, log, ipar, +14
curve2COMBOtri20 options: tri, qsin, hsin, esin, log, ipar, +14
overlapBOOLEANtrue
audio_aoptCOMFYTV_AUDIO
audio_boptCOMFYTV_AUDIO
video_aoptCOMFYTV_VIDEO
video_boptCOMFYTV_VIDEO

Outputs (1)

NameTypeDescription
audioCOMFYTV_AUDIO