Nodes/MediaForge/πŸŒ… Compose Audio Fade
ComfyUI Node

πŸŒ… Compose Audio Fade

Fade audio in and out without a separate audio editor

By leon80148Β·Created 4 months agoΒ·Updated 2 months agoΒ· 0
πŸŒ… Compose Audio Fade
  • audio_ops
  • audio_ops
β—„directioninβ–Ί
β—„start_sec0.0β–Ί
β—„duration_sec2.0β–Ί
β—„curvetriβ–Ί

MF_ComposeAudioFade is one op in MediaForge's Compose audio chain: it appends an afade to the audio filter graph and hands the chain on. If you've ever shipped a clip that starts and ends with an abrupt thunk of audio, this is the two-widget fix. Intro fade-in, outro fade-out, done - without opening a DAW.

It's part of the "one op = one node" design that keeps the Compose audio chain composable. The whole point is that audio ops stack in wiring order - Volume β†’ Fade and Fade β†’ Volume are genuinely different output - and a chain of small nodes expresses that cleanly. Want both a fade-in and a fade-out? Drop two of these in series. Each one appends its filter to whatever came before.

How it works

Under the hood it writes an afade filter op into the MF_COMPOSE_AUDIO_OPS chain. ComposeVideo later compiles that chain (alongside any video overlays) into a single filter_complex graph and encodes once. Nothing here touches pixels - the whole audio chain is a list of dicts that gets resolved at encode time.

The inputs that matter

  • direction - in (silent β†’ full, use at the start) or out (full β†’ silent, use at the end).
  • start_sec - when the fade begins. For out, that means video_duration - duration_sec; the readme's framing is the reliable mental model.
  • duration_sec - fade length. Two seconds is a good default; anything longer starts to feel sleepy.
  • curve - the shape. tri (linear) is default, but qsin (quarter-sine) is the perceptually smoothest and is what I'd pick for anything that's going on a podcast or a finished video. The rest (esin, hsin, log, par, qua, cub, squ, cbr) are there if you need a specific character.

The optional audio_ops input is the upstream chain - wire the previous audio node's output here, or leave it unwired to start a fresh chain. Output is audio_ops, which feeds the next audio node or MF_ComposeVideo directly.

Install

Part of the MediaForge pack, nothing extra to install:

cd ComfyUI/custom_nodes
git clone https://github.com/leon80148/comfyui_MediaForge.git
# restart ComfyUI

Or ComfyUI Manager β†’ search "MediaForge". The pack's requirements.txt handles its small Python deps (including ffmpeg fallback binaries) automatically.

Common issues

The classic mistake is treating start_sec as "fade out starting from here" for direction=out - it is the start, so you have to compute it against your video's duration. And if the fade seems to do nothing, check your chain order: if a MF_ComposeVolume with scale=0 is upstream, there's no signal left to fade. Since these are filter ops, one typo in an earlier node's parameters surfaces as a RuntimeError: ffmpeg ... failed at encode time - scroll up, the last 30 lines of stderr are printed.

CategoryMediaForge/Compose

Inputs (5)

NameTypeDefaultDescription
directionCOMBOin2 options: in, out
start_secFLOAT0.00–36000β€”
duration_secFLOAT2.00.1–60β€”
curveCOMBOtri10 options: tri, qsin, esin, hsin, log, par, +4
audio_opsoptMF_COMPOSE_AUDIO_OPSβ€”

Outputs (1)

NameTypeDescription
audio_opsMF_COMPOSE_AUDIO_OPSβ€”