A talking video: InfiniteTalk
Lesson "wrapper-talk", in the group WanVideoWrapper of the lesson list. Steps: 15.
Consent first
Only someone who agrees may be voiced this way, with their own voice or a voice you have permission for. Obtain permission for the source material and follow local law. See Content rules.
What you will be able to do
A portrait says the words of a sound file, the lips in time with them.
What you need
- Model files the lesson checks:
- Wan 2.1 image to video (i2v) 14B:
models/diffusion_models, for examplewan2.1_i2v_480p_14B_fp8_scaled.safetensors; - the umt5-xxl text encoder of Wan:
models/text_encoders, for exampleumt5_xxl_fp8_e4m3fn_scaled.safetensors; - the Wan 2.1 VAE (wan_2.1_vae):
models/vae, for examplewan_2.1_vae.safetensors; - clip_vision_h:
models/clip_vision, for exampleclip_vision_h.safetensors; - an InfiniteTalk or MultiTalk module:
models/diffusion_models, for exampleWan2_1-InfiniteTalk_Single_fp8_e4m3fn_scaled_KJ.safetensors; - a wav2vec speech model:
models/wav2vec2, for examplechinese-wav2vec2-base-fp16.safetensors.
- Wan 2.1 image to video (i2v) 14B:
- Nodes: WanVideo Model Loader, WanVideo T5 Text Encoder Loader, WanVideo VAE Loader, WanVideo TextEncode, Load Image, Load CLIP Vision, WanVideo ClipVision Encode, Multi/InfiniteTalk Model Loader, Load Audio, Wav2vec2 Model Loader, Multi/InfiniteTalk Wav2vec2 Embeds, WanVideo Long I2V Multi/InfiniteTalk, WanVideo Sampler, WanVideo Decode, Create Video, Save Video.
- The app downloads and installs nothing. The step texts below say which files and folders, and which ComfyUI template names them.
The steps
The words of each step, as the lesson shows them. Node names are in bold.
What InfiniteTalk does (reading)
InfiniteTalk gives the Wan 2.1 "image to video" model the ability to listen to sound. You give a portrait and a voice recording, and the model draws the person of the portrait saying those words. The sound goes into the clip as its track.
Only someone who agrees may be voiced this way, with their own voice or a voice you have permission for. Obtain permission for the source material and follow local law.
This graph runs on one Wan 2.1 model, not on the Wan 2.2 pair. The lesson builds it from an empty canvas: "File ▸ New project".
Load the model
Add a WanVideo Model Loader node and choose the Wan 2.1
i2v14B model in itsmodelfield, preferably the 480p one.If the file you need is not in the list, your ComfyUI does not have it. The app downloads nothing. The easiest way is to open, in ComfyUI itself, the InfiniteTalk example graph from the
example_workflowsfolder of the WanVideoWrapper pack: it shows which files are missing and where to put them. Then choose "Sync ▸ Sync now" in this app's menu, and the files appear in the lists.The text reader and the VAE
Add WanVideo T5 Text Encoder Loader and WanVideo VAE Loader. In the
model_namefield of the first choose theumt5-xxl-encfile, in the second thewan_2.1_vaefile.Describe the frame briefly
Add a WanVideo TextEncode node and connect the output of WanVideo T5 Text Encoder Loader to its
t5input. Inpositive_promptdescribe who speaks and how: calmly, smiling, gesturing.What exactly is said the model takes from the sound, not from the text.
Load the portrait
Add a Load Image node and choose the portrait in its
imagefield. A face in close-up, from the front, with the mouth closed or slightly open, works best.Show the portrait to the model
Add Load CLIP Vision and WanVideo ClipVision Encode. In the
clip_namefield of the first choose theclip_vision_hfile. Connect its output to theclip_visioninput of the second, and the portrait toimage_1.The Wan 2.1 "image to video" models cannot do without it.
Add the InfiniteTalk module
Add a Multi/InfiniteTalk Model Loader node and choose the InfiniteTalk module file in its
modelfield. Connect its output to themultitalk_modelinput of the model loader.For one speaker the single module is taken, for two the multi one.
Load the voice
Add three nodes: Load Audio, Wav2vec2 Model Loader and Multi/InfiniteTalk Wav2vec2 Embeds.
- In Load Audio choose the sound file from the
inputfolder in theaudiofield. - In Wav2vec2 Model Loader choose the wav2vec speech model in the
modelfield, usually chinese-wav2vec2-base. It lies in thewav2vec2folder. - The
wav2vec_modeloutput to thewav2vec_modelinput of Multi/InfiniteTalk Wav2vec2 Embeds, the sound toaudio_1.
Leave
fpsat 25 in Multi/InfiniteTalk Wav2vec2 Embeds: InfiniteTalk draws 25 frames a second.- In Load Audio choose the sound file from the
Prepare the start
Add a WanVideo Long I2V Multi/InfiniteTalk node. Connect the output of WanVideo VAE Loader to its
vaeinput, the portrait tostart_image, and the output of WanVideo ClipVision Encode toclip_embeds.This node makes a long clip in pieces and stitches them, so it can speak for longer than five seconds.
Add the sampler
Add a WanVideo Sampler node and connect to it:
- to
model, the model; - to
text_embeds, the prompt; - to
image_embeds, the output of WanVideo Long I2V Multi/InfiniteTalk; - to
multitalk_embeds, themultitalk_embedsoutput of Multi/InfiniteTalk Wav2vec2 Embeds.
- Turn the result into frames
Add a WanVideo Decode node. Connect the sampler's output to its samples input and the output of WanVideo VAE Loader to its vae input.
- Make the clip
Add Create Video and Save Video, the frames into images, the clip into video. Set fps to 25, as for the sound.
- Put the sound into the clip
Connect the audio output of Multi/InfiniteTalk Wav2vec2 Embeds to the audio input of Create Video.
Without it the clip is saved silent, though the lips move.
- When the lips miss the words (reading)
What to change in Multi/InfiniteTalk Wav2vec2 Embeds:
- the lips move too little: raise
audio_scaleto 1.2; - the face is frozen and only the lips move: set
audio_cfg_scaleto 2, the clip takes longer to make; - the length of the clip: the node counts the frames from the length of the sound itself.
A clean recording of a voice, with no music or noise, works much better.
- The graph is ready (reading)
Save the graph with "File ▸ Save workflow for ComfyUI…", open the file in ComfyUI and run it there. This app runs nothing in ComfyUI itself.
A minute of speech takes long to make. While you look for the settings, take a piece of five to ten seconds.
What the lesson checks
A reading step is done when you press Got it, next. A doing step ticks itself off when the canvas holds:
- Step 2, Load the model:
- a WanVideo Model Loader node.
modelof WanVideo Model Loader holds Wan 2.1 image to video (i2v) 14B; such a file lies inmodels/diffusion_models, for examplewan2.1_i2v_480p_14B_fp8_scaled.safetensors.
- Step 3, The text reader and the VAE:
- a WanVideo T5 Text Encoder Loader node.
- a WanVideo VAE Loader node.
model_nameof WanVideo T5 Text Encoder Loader holds the umt5-xxl text encoder of Wan; such a file lies inmodels/text_encoders, for exampleumt5_xxl_fp8_e4m3fn_scaled.safetensors.model_nameof WanVideo VAE Loader holds the Wan 2.1 VAE (wan_2.1_vae); such a file lies inmodels/vae, for examplewan_2.1_vae.safetensors.
- Step 4, Describe the frame briefly:
- a WanVideo TextEncode node.
wan_t5_modelof WanVideo T5 Text Encoder Loader intot5of WanVideo TextEncode.positive_promptof WanVideo TextEncode holds at least 3 characters and 2 real words.
- Step 5, Load the portrait:
- a Load Image node.
imageof Load Image: a value is chosen.
- Step 6, Show the portrait to the model:
- a Load CLIP Vision node.
- a WanVideo ClipVision Encode node.
CLIP_VISIONof Load CLIP Vision intoclip_visionof WanVideo ClipVision Encode.IMAGEof Load Image intoimage_1of WanVideo ClipVision Encode.clip_nameof Load CLIP Vision holds clip_vision_h; such a file lies inmodels/clip_vision, for exampleclip_vision_h.safetensors.
- Step 7, Add the InfiniteTalk module:
- a Multi/InfiniteTalk Model Loader node.
modelof Multi/InfiniteTalk Model Loader intomultitalk_modelof WanVideo Model Loader.modelof Multi/InfiniteTalk Model Loader holds an InfiniteTalk or MultiTalk module; such a file lies inmodels/diffusion_models, for exampleWan2_1-InfiniteTalk_Single_fp8_e4m3fn_scaled_KJ.safetensors.
- Step 8, Load the voice:
- a Load Audio node.
- a Wav2vec2 Model Loader node.
- a Multi/InfiniteTalk Wav2vec2 Embeds node.
wav2vec_modelof Wav2vec2 Model Loader intowav2vec_modelof Multi/InfiniteTalk Wav2vec2 Embeds.AUDIOof Load Audio intoaudio_1of Multi/InfiniteTalk Wav2vec2 Embeds.audioof Load Audio: a value is chosen.modelof Wav2vec2 Model Loader holds a wav2vec speech model; such a file lies inmodels/wav2vec2, for examplechinese-wav2vec2-base-fp16.safetensors.fpsof Multi/InfiniteTalk Wav2vec2 Embeds is25. Why: infiniteTalk draws 25 frames per second, and the sound is laid out on the same 25.
- Step 9, Prepare the start:
- a WanVideo Long I2V Multi/InfiniteTalk node.
vaeof WanVideo VAE Loader intovaeof WanVideo Long I2V Multi/InfiniteTalk.IMAGEof Load Image intostart_imageof WanVideo Long I2V Multi/InfiniteTalk.WANVIDIMAGE_CLIPEMBEDSof WanVideo ClipVision Encode intoclip_embedsof WanVideo Long I2V Multi/InfiniteTalk.
- Step 10, Add the sampler:
- a WanVideo Sampler node.
modelof WanVideo Model Loader intomodelof WanVideo Sampler.text_embedsof WanVideo TextEncode intotext_embedsof WanVideo Sampler.WANVIDIMAGE_EMBEDSof WanVideo Long I2V Multi/InfiniteTalk intoimage_embedsof WanVideo Sampler.multitalk_embedsof Multi/InfiniteTalk Wav2vec2 Embeds intomultitalk_embedsof WanVideo Sampler.
- Step 11, Turn the result into frames:
- a WanVideo Decode node.
samplesof WanVideo Sampler intosamplesof WanVideo Decode.vaeof WanVideo VAE Loader intovaeof WanVideo Decode.
- Step 12, Make the clip:
- a Create Video node.
- a Save Video node.
IMAGEof WanVideo Decode intoimagesof Create Video.VIDEOof Create Video intovideoof Save Video.fpsof Create Video is25. Why: infiniteTalk draws 25 frames per second, and the sound is laid out on the same 25.
- Step 13, Put the sound into the clip:
audioof Multi/InfiniteTalk Wav2vec2 Embeds intoaudioof Create Video.
Mistakes people make
- Music or noise under the voice: poor lip sync.
fps16 (the Wan default) instead of 25: the lips drift.- Forgetting the sound link: a silent clip with moving lips.
What next
These lessons go on from this one: Two people talking: InfiniteTalk.