Loop Align Silence
Stop your singer from changing faces mid-sentence
- audio
- loop_positions
- silence_report
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, insecondsorloops), and it snaps each one to the quietest loop boundary withinsearch_windowloops forward or back. Default on, and the right place to start.auto_detect_pauses- no targets needed. It picks theimage_count - 1quietest 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.modeandmanual_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.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| fps | FLOAT | 16.001–240 | Target frame rate (frames per second) of the video. |
| context_length | INT | 811–4096 | Loop context length (frame budget per loop iteration). |
| overlap_frames | INT | 90–4096 | Number of overlapping frames between loops (e.g. motion_frame_count in InfiniteTalkToVideo). |
| mode | COMBO | align_manual_targets | Method to determine transition loops. Manual aligns user targets; Auto finds the best pauses. |
| manual_targets | STRING | 5.0, 10.0, 15.0 | Comma-separated list of target times (in seconds or loop indices) to align with silences. |
| target_unit | COMBO | seconds | The unit of the manual_targets input. |
| align_to_silence | BOOLEAN | true | If 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_count | INT | 22–64 | Number of images/singers in rotation. Used in auto_detect_pauses to select (image_count - 1) transition points. |
| search_window | INT | 11–10 | Maximum loops forward/backward to search for a silence around each manual target. |
| window_duration | FLOAT | 0.400.05–2 | Duration (in seconds) of the audio window analyzed around each loop boundary. |
| audioopt | AUDIO | Optional AUDIO input. If not connected, manual_targets are parsed directly without alignment. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| loop_positions | STRING | Comma-separated list of loop indices aligned to audio silence. |
| silence_report | STRING | Detailed text report of the alignment analysis. |