StableAvatar_Sampler
The sampler where StableAvatar's 'infinite length' trick actually happens
- model
- emb
- latent
- frame_rate
This is the payoff node. StableAvatar_Sampler takes the loaded model from StableAvatar_LoadModel and the embeddings from StableAvatar_Predata and actually denoises the video - the long one, driven by your audio. Its outputs are a latent and a frame_rate, and you wire those into the standard Wan VAE decode to get a video you can actually watch. Three nodes, then the normal ComfyUI VAE/upscale/output chain.
How the "infinite length" works
Wan only generates a fixed window of frames natively - the community has spent a year building chunk-and-stitch pipelines around exactly this. StableAvatar's contribution is doing that stitching inside the sampler. It slides a window along your audio, generates each segment, and blends the overlaps so identity and lighting don't visibly snap between chunks. Two settings control that stitching:
- overlap_window_length (5–15, default 5) - how many frames of each segment are re-drawn and blended. Higher is smoother and better quality, but linearly slower. This is the single biggest quality lever in the pack, and the README says so outright.
- overlapping_weight_scheme -
uniformorlog. The log option mirrors the official model's log-sliding-window mechanism and is the author's sync-with-upstream choice; uniform is the cheaper, simpler blend. Try log for a long clip where you're chasing seams.
The settings that matter
- cfg - default 6, which sits in Wan's recommended 5–7 range. The one hard rule: don't set it to 1. In the pack's LCM mode (see below) CFG 1 produces artifacts, and the README explicitly warns against it.
- sample_text_guide_scale / sample_audio_guide_scale (defaults 3 and 5) - how hard the denoiser listens to the prompt versus the audio. If lips stop matching, raise the audio scale. If the scene drifts away from your prompt, raise the text scale. Typical two-knob tuning.
- steps - 25–50 without a LoRA. This is where the speed LoRA pays off: with Kijai's
lightx2vLoRA loaded in the load node, drop to 10 steps for a roughly 2.5× speedup. The pack also auto-switches to LCM mode at 4 steps (that's the CFG-warning case above) - and while the LCM artifacts were patched, the README concedes you'll still see a little flicker between batch transitions. - seed - standard. Lock it while tuning anything else.
What you'll run into
- TeaCache: off. The README tells you not to enable it in the load node yet - it's an unstable speed shortcut for Wan, and here it breaks things.
- Overlap cost. Crank
overlap_window_lengthto 15 for a 60-second clip and you'll feel every frame. Start at 5, and only raise it if you see seams. - Speed expectation. This is a 1.3B Wan, so it's fast relative to 14B Wan - but the official StableAvatar paper quotes roughly 3 minutes per 5-second clip at 480×832 on a 4090 with everything loaded. Offloading (the memory modes in the load node) buys VRAM at a serious speed tax.
- Resolution drift. Same lesson as the rest of the pack: generate in the trained resolutions (480×832, 832×480, 512×512). The sampler will happily run at whatever you asked Predata for, and the result will quietly get worse the further you stretch.
Realistic bottom line: you're not getting cinema lip-sync out of this. You're getting a single consistent person who keeps their identity across a very long clip, driven by real audio. That's a genuinely rare combination, and now you know exactly which knobs control it.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL_PIPE_SA | — | |
| emb | MODEL_EMB_E | — | |
| seed | INT | 00–2147483647 | — |
| cfg | FLOAT | 6.00–10 | — |
| sample_text_guide_scale | FLOAT | 3.00–10 | — |
| sample_audio_guide_scale | FLOAT | 5.00–10 | — |
| steps | INT | 251–100 | — |
| overlap_window_length | INT | 55–15 | — |
| overlapping_weight_scheme | COMBO | 2 options: uniform, log |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| latent | LATENT | — |
| frame_rate | FLOAT | — |