Nodes/ComfyUI_Fill-Nodes/FL Audio Beat Prompt Envelope
ComfyUI Node

FL Audio Beat Prompt Envelope

Make the video punch on every beat — without keyframing a thing

By filliptm·Created 3 years ago·Updated a day ago· 633
FL Audio Beat Prompt Envelope
    • prompt_envelope
    • envelope
    • preview
    beat_positions
    reactive_promptA violent outward deformation and rapid camera punch on every beat.
    beat_stride1
    beat_phase0
    attack_beats0.000
    hold_beats0.250
    release_beats0.500
    floor_strength0.00
    peak_strength3.00
    curvecosine
    fps24

    If you've ever wanted a music-video shot where the image visibly reacts to the kick drum - a punch on every beat, a flash on the downbeat - you usually end up hand-drawing an envelope in an animation tool. FL Audio Beat Prompt Envelope is the shortcut that makes it a text thing instead. It takes the exact beat positions detected from your audio and turns them into a pulsing prompt-mask: an action prompt that fades in, holds, and releases around every selected beat, riding alongside your base prompt.

    It's part of Fill-Nodes' audio-reactive pipeline for MiniMax H3, the 33B omni-modal video model that's native at audio. The idea is that the conditioning does the work: rather than animating pixels, you let a temporal mask tell the diffusion model when "explosion on the beat" is in charge and when it isn't. This node is the small, focused version of that. The big one is FL_Audio_Beat_Prompt_Schedule, a whole sequencer; this one is what you reach for when you already have beat data and just want a clean beat-driven prompt envelope.

    How it works

    Upstream, FL_Audio_BPM_Analyzer (same pack) detects beats and hands you a JSON string of beat positions. This node reads that string, then builds an attack/hold/release pulse around each beat you've selected. beat_stride picks every Nth beat (1 = every beat, 2 = alternating, 4 = downbeat-style accents) and beat_phase offsets which beat in each group gets triggered. Around each hit, attack_beats, hold_beats, and release_beats shape how long the prompt fades in, sits at full strength, and dies away - in beats, not seconds, so it stays musical if you change the tempo.

    The two knobs that actually matter for the look:

    • floor_strength - weight of the reactive prompt between hits. Leave it at 0 and the prompt only exists on the beat.
    • peak_strength - weight on the hits. Values above 1 make the reactive prompt dominate the other active prompts, and it does this by weighting the mask, not by scaling the embeddings, so you don't smear the conditioning.

    Also set fps to 24 for MiniMax H3, and pick a curve (cosine is the default and is fine).

    Outputs

    • prompt_envelope (FL_PROMPT_ENVELOPE) - the reactive prompt plus its frame-aligned weights. This is what you wire into a compatible FL diffusion node - for H3, that's the FL MiniMax H3 Beat Shot Planner, which lives in the separate ComfyUI-FL-MiniMaxH3 pack (node IDs are unchanged, so old workflows keep loading).
    • envelope (FL_AUDIO_ENVELOPE) - the same signal as a normalized audio envelope, so you can also drive FL's reactive preview and post-effect nodes with it.
    • preview - a readable summary of which beats fired and at what strength.

    Install

    It ships in ComfyUI_Fill-Nodes. ComfyUI Manager → search "ComfyUI_Fill-Nodes", or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/filliptm/ComfyUI_Fill-Nodes
    

    then restart ComfyUI. Fair warning: this is a big pack with heavy requirements (librosa, beat-this, opencv-python, and a lot more), so the first install pulls in a lot of Python even if you only use three nodes. That's normal for Fill-Nodes, not a bug.

    Gotchas

    The node validates its inputs and will throw rather than silently do something dumb: beat_phase must be smaller than beat_stride, peak_strength can't be below floor_strength, and attack+hold+release can't all be zero. And yes, it genuinely needs the BPM Analyzer's beat_positions - don't hand-type JSON into it and expect magic. One gotcha people hit: leave floor_strength at 0 if you want a purely reactive prompt; a nonzero floor means your "reactive" action is always faintly present, which reads as noise in a long shot.

    Category🏵️Fill Nodes/Audio

    Inputs (11)

    NameTypeDefaultDescription
    beat_positionsSTRINGConnect beat_positions from FL Audio BPM Analyzer.
    reactive_promptSTRINGA violent outward deformation and rapid camera punch on every beat.Action or visual change that becomes active around the selected beats.
    beat_strideINT11–64Trigger every Nth detected beat. Use 1 for every beat, 2 for alternating beats, or 4 for downbeat-like accents.
    beat_phaseINT00–63Zero-based beat offset within beat_stride. For stride 4, phases 0-3 select different beats in each group.
    attack_beatsFLOAT0.0000–8How many beats before each hit the reactive prompt begins fading in.
    hold_beatsFLOAT0.2500–8How long the prompt remains at peak strength after each hit.
    release_beatsFLOAT0.5000–8How many beats the reactive prompt takes to fade out after its hold.
    floor_strengthFLOAT0.000–8Prompt mask weight between hits. Leave at zero for a purely reactive prompt.
    peak_strengthFLOAT3.000–8Prompt mask weight on hits. Values above 1 make the reactive prompt dominate other active prompts without scaling embeddings.
    curveCOMBOcosineShape of the attack and release around each selected beat.
    fpsFLOAT241–120Envelope sampling rate. Use 24 fps for MiniMax H3.

    Outputs (3)

    NameTypeDescription
    prompt_envelopeFL_PROMPT_ENVELOPEReactive prompt and temporal mask weights for compatible FL diffusion nodes.
    envelopeFL_AUDIO_ENVELOPENormalized FL audio envelope compatible with reactive preview and post-effect nodes.
    previewSTRINGReadable summary of selected hits and generated strengths.