Nodes/ComfyUI_Eclipse/Loop Align Silence
ComfyUI Node

Loop Align Silence

Stop your singer from changing faces mid-sentence

By r-vage·Created 10 months ago·Updated a day ago· 31
Loop Align Silence
  • audio
  • loop_positions
  • silence_report
fps16.00
context_length81
overlap_frames9
modealign_manual_targets
manual_targets5.0, 10.0, 15.0
target_unitseconds
align_to_silencetrue
image_count2
search_window1
window_duration0.40

You've built the talking-head loop workflow - a video loop with several reference images rotating as the "singer" - and it looks great except for one recurring offense: the face swaps to the next singer in the middle of a word. The pause you needed was somewhere else, and now the scene change lands on a syllable. This node exists to fix exactly that.

Loop Align Silence takes an audio track, finds the natural pauses and silent gaps in it, and returns a list of loop indices where your image/singer transitions should happen so they line up with the quiet parts. It's a targeting node for the family of extend-sampling loop workflows (the author's own tooltips keep pointing at InfiniteTalkToVideo-style setups, where overlap_frames maps to the sampler's motion_frame_count). The thing you care about - "don't change faces mid-sentence" - is literally the node's description.

How it works

Feed it your audio (a Load Audio output from the same pack's Eclipse > Loader works) plus three numbers it shares with the rest of the loop ecosystem: fps, context_length (frames per loop iteration), and overlap_frames. It walks the timeline, and at every loop boundary it measures the RMS loudness of a short window of the waveform (window_duration seconds, default 0.4s, centered on the boundary). Quiet boundary, good place to switch singers.

It has two working modes:

  • align_manual_targets - you list the times you want transitions (manual_targets, in seconds or loops), and it snaps each one to the quietest loop boundary within search_window loops forward or back. Default on, and the right place to start.
  • auto_detect_pauses - no targets needed. It picks the image_count - 1 quietest boundaries in the whole track (one less than your number of singers, since you only need transitions between them).

With no audio connected - or with align_to_silence off - it just parses your targets directly into loop indices, so the node still works as a plain "seconds to loop index" converter in a pinch.

Outputs are two strings: loop_positions (the comma-separated loop indices) and silence_report, a plain-text walkthrough of the alignment that's genuinely handy for debugging why a transition landed where it did. loop_positions wires straight into Loop Image Selector [Eclipse]'s loop_positions input.

The inputs that matter

  • fps, context_length, overlap_frames - must match your video workflow, or the indices will be wrong even though the math is right.
  • mode and manual_targets - the ones you'll actually flip between while tuning.
  • image_count - only used in auto mode, but it's the knob that decides how many transitions get chosen.

Install

This node ships in ComfyUI_Eclipse, the big utility pack by r-vage (the successor to the old RvTools_v2). The easy route is ComfyUI Manager - search ComfyUI_Eclipse - or:

cd ComfyUI/custom_nodes
git clone https://github.com/r-vage/ComfyUI_Eclipse

Restart ComfyUI after. The pack's requirements (torch, numpy, Pillow, opencv-python, aiohttp…) are mostly already satisfied by ComfyUI; if a node throws an import error, pip install the missing package into the same Python that runs ComfyUI. One gotcha: this pack renamed and rewrote RvTools_v2, and v4.0 deleted the legacy nodes outright - old workflows that fail to load usually need the built-in Workflow Migration Tool, not a fresh install.

Common issues

The classic failure is indices that look right but feel off: that's a mismatch between the fps/context_length here and the loop settings downstream, not a bug. Also remember loop_positions uses 1-based-ish loop numbering that assumes the loop index feeding the sampler starts at 0 - keep Loop Image Selector on the same overlap_frames value. If auto mode keeps picking odd boundaries, bump window_duration up a touch; a 0.4s window can miss a very short breath pause.

Category🌒 Eclipse/ Audio

Inputs (11)

NameTypeDefaultDescription
fpsFLOAT16.001–240Target frame rate (frames per second) of the video.
context_lengthINT811–4096Loop context length (frame budget per loop iteration).
overlap_framesINT90–4096Number of overlapping frames between loops (e.g. motion_frame_count in InfiniteTalkToVideo).
modeCOMBOalign_manual_targetsMethod to determine transition loops. Manual aligns user targets; Auto finds the best pauses.
manual_targetsSTRING5.0, 10.0, 15.0Comma-separated list of target times (in seconds or loop indices) to align with silences.
target_unitCOMBOsecondsThe unit of the manual_targets input.
align_to_silenceBOOLEANtrueIf True, aligns transitions to quietest loop boundaries in search window. If False (only applies to 'align_manual_targets' mode), transitions occur exactly at target times/loops.
image_countINT22–64Number of images/singers in rotation. Used in auto_detect_pauses to select (image_count - 1) transition points.
search_windowINT11–10Maximum loops forward/backward to search for a silence around each manual target.
window_durationFLOAT0.400.05–2Duration (in seconds) of the audio window analyzed around each loop boundary.
audiooptAUDIOOptional AUDIO input. If not connected, manual_targets are parsed directly without alignment.

Outputs (2)

NameTypeDescription
loop_positionsSTRINGComma-separated list of loop indices aligned to audio silence.
silence_reportSTRINGDetailed text report of the alignment analysis.