Nodes/ComfyUI_StableAvatar/StableAvatar_Predata
ComfyUI Node

StableAvatar_Predata

Photo in, audio in, lipsync embedding out — the middle of StableAvatar

By smthemex·Created about a year ago·Updated about a year ago· 44
StableAvatar_Predata
  • info
  • clip
  • clip_vision
  • image
  • audio
  • emb
promptA middle-aged woman with short light brown hair, wearing pearl earrings and a blue blazer, is speaking passionately in front of a blurred background resembling a government building. Her mouth is open mid-phrase, her expression is engaged and energetic, and the lighting is bright and even, suggesting a television interview or live broadcast. The scene gives the impression she is singing with conviction and purpose.
negative_prompt色调艳丽,过曝,静态,细节模糊不清,字幕,风格,作品,画作,画面,静止,整体发灰,最差质量,低质量,JPEG压缩残留,丑陋的,残缺的,多余的手指,画得不好的手部,画得不好的脸部,畸形的,毁容的,形态畸形的肢体,手指融合,静止不动的画面,杂乱的背景,三条腿,背景人很多,倒着走
width480
height720
fps25.00
duration5
audio_separatortrue

If StableAvatar_LoadModel is the entry point of this pipeline, StableAvatar_Predata is the part where your actual job happens. It takes the loaded-model info wire from the load node, combines it with a text encoder, a CLIP vision model, your first-frame image, your audio file and your prompt, and produces the single emb (MODEL_EMB_E) output that the sampler denoises from. You do the creative work here; the sampler just executes it.

What's happening under the hood

StableAvatar's whole trick is audio-driven lip sync. So this node is doing three encode jobs at once: the image goes through CLIP vision to capture who the person is, the prompt goes through the text encoder (the umt5_xxl model from the pack install notes) to capture scene and intent, and the audio gets encoded for speech. It bundles all of that into one embedding vector that the sampler uses to animate the face in sync with the voice. If the audio is a song rather than speech, the audio_separator toggle (default on) runs a vocal-extraction pass first - that's what needs the optional Kim_Vocal_2.onnx model and the audio-separator pip package. For plain speech, you can turn it off and skip that dependency entirely.

Inputs a beginner actually sets

  • image - your first frame, the person you want talking. This is what the video starts from and keeps returning to, so pick a clean, well-lit headshot.
  • audio - the driver. Whatever length it is, that's how long the video runs: this is the "infinite length" pitch. A 3-minute song gives you a 3-minute video.
  • prompt - describe the scene and the person in the first frame in detail. The README says Chinese works fine, so use whatever you're fluent in. The default negative prompt is Chinese too (a stock "worst quality, deformed fingers…" list) - swap it if you want, but it's not a trap.
  • width / height - defaults are 480×720, which is roughly the model's sweet spot. The README recommends 480×832, 832×480 or 512×512; it was trained at those, and Wan behaves badly stretched past its native resolution.
  • duration - crops the audio to this many seconds. 0 means "use the whole file", which is exactly the long-form mode StableAvatar is selling.

Everything else - info, clip, clip_vision, fps (25 default) - you can leave alone on a first pass.

Where people get burned

The most common failure is a mismatch between your image resolution and the training resolutions - that's the Wan native-resolution lesson applied to a 1.3B model, and it produces warped faces and weird anatomy. Stay in the 480-ish landscape/portrait ratios the README lists and upscale after if you need more pixels.

Second: audio_separator on when you don't have Kim_Vocal_2.onnx in ComfyUI/models/StableAvatar/ will just error out. Either drop the model in or flip the toggle off for clean speech.

And the honest take: this model's mouth sync was considered mediocre next to its 2025 rivals (MultiTalk ran away with that comparison in the community threads), and StableAvatar's actual selling point is consistency - it preserves the image and identity over a long clip where other talking-head models slowly degrade, drift or darken. If you need a 30-second-plus take of the same person staying the same person, that's why you're here. For a sharp 5-second lipsync, other tools do it better and faster.

CategoryStableAvatar

Inputs (12)

NameTypeDefaultDescription
infoMODEL_INFO_SA
clipCLIP
clip_visionCLIP_VISION
imageIMAGE
audioAUDIO
promptSTRINGA middle-aged woman with short light brown hair, wearing pearl earrings and a blue blazer, is speaking passionately in front of a blurred background resembling a government building. Her mouth is open mid-phrase, her expression is engaged and energetic, and the lighting is bright and even, suggesting a television interview or live broadcast. The scene gives the impression she is singing with conviction and purpose.
negative_promptSTRING色调艳丽,过曝,静态,细节模糊不清,字幕,风格,作品,画作,画面,静止,整体发灰,最差质量,低质量,JPEG压缩残留,丑陋的,残缺的,多余的手指,画得不好的手部,画得不好的脸部,畸形的,毁容的,形态畸形的肢体,手指融合,静止不动的画面,杂乱的背景,三条腿,背景人很多,倒着走
widthINT480128–2048
heightINT720128–2048
fpsFLOAT25.005–120
durationINT50–3600
audio_separatorBOOLEANtrue

Outputs (1)

NameTypeDescription
embMODEL_EMB_E