Nodes/radiance/Audio Cut
ComfyUI Node

Audio Cut

Put your cuts on the beat without opening a DAW

By FXTD-Studios·Created 8 months ago·Updated about 18 hours ago· 246
Audio Cut
    • cut_frames_json
    • cut_times_json
    • cut_count
    • analysis_report
    ◄audio_filepath/path/to/audio.wav►
    ◄fps24.000►
    ◄methodbeats►
    ◄sensitivity0.50►
    ◄min_interval_frames12►
    ◄backendAuto►
    ◄frame_offset0►
    ◄max_cuts0►

    What it is

    Point it at an audio file, tell it your frame rate, and it returns frame indices where the cuts should land - beats, onsets or transient events, depending on the method. Four string and integer outputs, no audio, no pixels. Then you wire those frame numbers into whatever assembles your video.

    This is one of those nodes that looks like a curiosity until you've cut a 30-second music video by hand and discovered that hitting the beat to the frame is genuinely tedious work. Even in a generative pipeline where the "video" is a batch of frames you're assembling, having the cut points computed for you is worth the three minutes of setup.

    The backends, and the honest caveat

    backend defaults to Auto, and Auto means: librosa if it's installed, else scipy, else ffmpeg. These are not equivalent, and the node is refreshingly upfront about it rather than pretending they are.

    • librosa is the only one that honours method - beats, onsets or transients. It's also not in Radiance's requirements.txt, which is the practical gotcha: a stock install will never pick it. Install it yourself if you want real beat tracking.
    • scipy (which is in the requirements) always finds energy onsets, whatever you asked for. The report says so in plain text when you pick another method.
    • ffmpeg always finds silence ends via silencedetect, its threshold running from −30 dB at sensitivity 1 to −10 dB at sensitivity 0. Also method-independent.

    So the method dropdown is only fully honoured on one of three backends, and the node appends a NOTE line to analysis_report telling you when it wasn't. That's a much better design than silently returning onsets for a beat request. If you want beats and you're getting onsets, install librosa:

    python -m pip install librosa
    

    Inputs

    audio_filepath is an absolute path (WAV, MP3, FLAC, AAC and friends). fps is the target sequence's frame rate, and it's how seconds become frame numbers - get it wrong and every cut point is wrong by the same factor, which is the kind of thing you notice only after assembly. sensitivity (0–1) trades strong peaks against micro-variations. min_interval_frames (default 12) is the minimum spacing between cuts, which is what stops a busy drum pattern from producing a cut every four frames.

    frame_offset shifts every returned index, for when your audio starts partway into a sequence. max_cuts keeps N points spaced evenly through the detected list - useful when you want a fixed number of cuts and the backends don't return per-cut strength to rank by.

    Outputs

    cut_frames_json is the array of int frame indices; cut_times_json is the same points in seconds; cut_count is the number of them; analysis_report is the human-readable summary, including which backend actually ran and any NOTE about method substitution. Strings again - they're for a downstream node or a note, not for image wiring.

    Failure behaviour

    It raises. The source is explicit about why: an empty cut list is a legitimate answer for a quiet track, so returning [] for a missing or unreadable file made a failure indistinguishable from a result. Now a bad path raises, and a backend exception is re-raised as a runtime error naming the backend and the file. Paths are validated and resolved before any file operation happens.

    That's the right call and it will surprise you exactly once.

    Install

    ComfyUI Manager → search Radiance → install → restart → refresh. Manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/fxtd-studios/radiance.git
    cd radiance
    python -m pip install -r requirements.txt
    

    Windows portable users should use ComfyUI's bundled python_embeded\python.exe for that pip step. The pack installs scipy, numpy and imageio-ffmpeg, so the scipy and ffmpeg paths work out of the box; librosa and soundfile are detected if present but never installed for you.

    Gotchas

    • No librosa, no beats. Auto silently lands on scipy, and scipy finds onsets. Check analysis_report - it tells you which backend ran, every time.
    • ffmpeg finding silence, not music. It's silencedetect. On a track with no gaps you'll get very few cuts, and they'll be at the quiet bits, not the beats.
    • The fps field. Wrong frame rate, wrong indices. It's a float, so 23.976 works; it just has to be the frame rate of the sequence you're actually cutting.
    • Dependency conflicts are the norm in this corner of ComfyUI. Audio tooling pulls heavy libraries into a single shared environment; the KB's account of audio in ComfyUI is that "dependency conflict is the default failure mode". If a pack you installed last week stops loading after you add an audio library, look here.
    • It reads paths, not ComfyUI's input folder. Absolute paths only.
    CategoryFXTD STUDIOS/Radiance/Pipeline

    Inputs (8)

    NameTypeDefaultDescription
    audio_filepathSTRING/path/to/audio.wavAbsolute path to audio file (WAV, MP3, FLAC, AAC, etc.)
    fpsFLOAT24.0001–240Frame rate of the target video sequence
    methodCOMBObeatsHonoured by the librosa backend. scipy always finds energy onsets and ffmpeg always finds silence ends; the report says so.
    sensitivityFLOAT0.500–10 = only strong peaks, 1 = detect all micro-variations
    min_interval_framesINT12Minimum frames between consecutive cut points
    backendCOMBOAutoAuto: librosa if installed, else scipy, else ffmpeg. scipy finds energy onsets; ffmpeg finds silence ends, its threshold running from -30 dB (sensitivity 1) to -10 dB (sensitivity 0).
    frame_offsetoptINT0Add this value to every returned frame index (useful when audio starts mid-sequence)
    max_cutsoptINT0If > 0, keep N cut points evenly spaced through the detected list (the backends do not return per-cut strength).

    Outputs (4)

    NameTypeDescription
    cut_frames_jsonSTRING—
    cut_times_jsonSTRING—
    cut_countINT—
    analysis_reportSTRING—