Nodes/ComfyUI-LongCat-Avatar/LongCat Avatar Audio Window
ComfyUI Node

LongCat Avatar Audio Window

Slicing long audio into generation windows so your avatar can talk for minutes

By rookiestar28·Created 3 months ago·Updated 23 days ago· 34
LongCat Avatar Audio Window
  • au_cond
  • au_cond_window
frames_processed0
num_frames93
overlap13
if_not_enough_audio
ref_img_index10
mask_frame_range3

LongCat_Video_SM_AudioWindow is the continuation node. LongCat doesn't generate an entire multi-minute clip in one shot - it renders in windows of about 93 frames, carrying 13 overlap frames of context forward so the person doesn't reboot between windows. This node takes the full-clip au_cond from LongCat Avatar Audio Encode, slices out the window you're currently working on, and hands the sampler a au_cond_window plus the reference-anchor info for that segment. In a naive workflow you can skip it and let the sampler do everything; in any workflow that extends past a few seconds, you'll see this node sitting between the audio encode and the sampler, tracking progress.

The inputs that matter

  • au_cond - the full-clip conditioning from LongCat Avatar Audio Encode.
  • frames_processed - how many frames you've already generated. This is the loop variable: first pass 0, then feed the running total back in. The window start is derived from it (minus the overlap, for continuity).
  • num_frames (default 93) - frames in this window. 93 is the official first-window size; continuations add 80 because 13 frames overlap.
  • overlap (default 13) - how many frames of the previous window are carried into conditioning. More overlap, more continuity, more cost.
  • if_not_enough_audio - what to do when the remaining audio is shorter than the window: clamp (stop at the audio end) or mirror_from_end (pad by mirroring the tail so the final segment isn't truncated weirdly).
  • ref_img_index (default 10) and mask_frame_range (default 3) - mirror the sampler's controls: where the reference image anchors attention, and how wide the mask around it is. Values in the 0–24 range are the common consistency zone.

Output is au_cond_window (CONDITIONING) → the sampler's au_cond socket.

How it fits the loop

Because Avatar 1.5 is an 8-step distilled model, each window is fast relative to the wall-clock pain of big DiT sampling - but a long clip is still dozens of windows, and this node is how a workflow keeps them coherent instead of stitching a string of unrelated headshots. If you only ever render clips under a few seconds, ignore this node entirely; the sampler's defaults already cover you. If you're building a "make the avatar read this whole paragraph" workflow, this is the piece that makes it work.

Install

Part of the shared ComfyUI-LongCat-Avatar pack:

cd ComfyUI/custom_nodes
git clone https://github.com/rookiestar28/ComfyUI-LongCat-Avatar
cd ComfyUI-LongCat-Avatar
pip install -r requirements.txt

or ComfyUI Manager → search ComfyUI-LongCat-Avatar → restart. NVIDIA + CUDA only.

Where people get burned

The classic mistake is forgetting to update frames_processed and re-rendering window 1 over and over - nothing wrong with the node, the loop variable just didn't move. The "generation stops to a crawl at the first extend" reports floating around the community usually trace back to the window bookkeeping going sideways (or block_num/VRAM pressure), not to this node itself. And if you hand it an au_cond that was built at a different save_fps than the sampler is running at, the frame math desyncs - keep save_fps at 25 everywhere, on this node's upstream and on the sampler.

CategoryLongCat Avatar

Inputs (7)

NameTypeDefaultDescription
au_condCONDITIONING
frames_processedINT00–100000
num_framesINT931–256
overlapINT130–32
if_not_enough_audioCOMBO2 options: clamp, mirror_from_end
ref_img_indexINT100–1024
mask_frame_rangeINT30–1024

Outputs (1)

NameTypeDescription
au_cond_windowCONDITIONING