A video with sound: Ovi
Lesson "wrapper-ovi", in the group WanVideoWrapper of the lesson list. Steps: 16.
Consent first
The rule stays: do not put words into the mouths of real people without their consent. See Content rules.
What you will be able to do
One run draws the clip and its sound at once: the character's speech, steps, street noise.
What you need
- Model files the lesson checks:
- the Ovi video model:
models/diffusion_models, for exampleWan2_2-Ovi-960x960-10s_fp8_e4m3fn_scaled_KJ.safetensors; - the Ovi audio model:
models/diffusion_models, for exampleWan2_2-Ovi-audio_model_bf16.safetensors; - the umt5-xxl text encoder of Wan:
models/text_encoders, for exampleumt5_xxl_fp8_e4m3fn_scaled.safetensors; - the Wan 2.2 VAE (Wan2_2_VAE):
models/vae, for exampleWan2_2_VAE_bf16.safetensors; - the MMAudio VAE:
models/mmaudio, for examplemmaudio_vae_16k_fp32.safetensors; - the MMAudio vocoder:
models/mmaudio, for examplemmaudio_vocoder_bigvgan_best_netG_fp32.safetensors.
- the Ovi video model:
- Nodes: WanVideo Model Loader, WanVideo Extra Model Select, WanVideo T5 Text Encoder Loader, WanVideo VAE Loader, WanVideo TextEncode, WanVideo Ovi CFG, WanVideo Empty Embeds, WanVideo Empty MMAudio Latents, WanVideo Sampler, WanVideo Decode, Ovi MMAudio VAE Loader, WanVideo Decode Ovi Audio, 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 Ovi does (reading)
Ovi is two models working together: one draws the clip, the other makes its sound at the same time. You write the character's speech right in the prompt, and the lips match the words.
The clip always has one length: 121 frames, which is five seconds at 24 frames a second.
The model makes the voice up itself. The rule stays: do not put words into the mouths of real people without their consent.
The lesson builds the graph from an empty canvas: "File ▸ New project".
Load the two models
Add the nodes WanVideo Model Loader and WanVideo Extra Model Select.
- In WanVideo Model Loader choose in the field
modelthe Ovi video model. - In WanVideo Extra Model Select choose in the field
extra_modelthe Ovi audio model. It is another file. - Connect the output of WanVideo Extra Model Select to the input
extra_modelof WanVideo Model Loader. - In WanVideo Model Loader leave the field
base_precisionatbf16. Withfp16this model may give a black screen.
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 Ovi 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.- In WanVideo Model Loader choose in the field
The text reader and the VAE
Add the nodes WanVideo T5 Text Encoder Loader and WanVideo VAE Loader. In the field
model_nameof the first choose the fileumt5-xxl-enc. The second needs the VAE of Wan 2.2, the fileWan2_2_VAE: the VAE of Wan 2.1 does not fit here.Describe the frame
Add the node WanVideo TextEncode and connect the output of WanVideo T5 Text Encoder Loader to its input
t5. In the fieldpositive_promptsay in English who is in the frame, where, and what they do.Write the speech in
The words the character says go into the field
positive_promptbetween the marks<S>and<E>. For example: A man in a kitchen says<S>Good morning, the coffee is ready.<E>Without these marks Ovi does not work.
What else is heard in the clip may be described between
<AUDCAP>and<ENDAUDCAP>: a voice, noise, music. This is optional.Connect the sound setting
Add the node WanVideo Ovi CFG and connect the output of WanVideo TextEncode to its input
original_text_embeds.Leave the field
ovi_audio_cfgat 3. It says how strictly the sound follows the prompt.Say what the sound must not be
Add a second node WanVideo TextEncode and connect the output of WanVideo T5 Text Encoder Loader to its input
t5. In its fieldpositive_promptwrite what the sound must not have: robotic, muffled, echo, distorted.Connect the output of this node to the input
ovi_negative_text_embedsof WanVideo Ovi CFG.This is no mistake: the words go into the upper field, and WanVideo Ovi CFG takes exactly that one. If this node is not connected, the prompt itself stands in for it, and the setting
ovi_audio_cfgnearly stops acting.Set the size and the length
Add the node WanVideo Empty Embeds. Set the field
num_framesto 121: Ovi is not made for another length.Set the fields
widthandheightto 992 and 512 for a horizontal clip.Add the blank sound
Add the node WanVideo Empty MMAudio Latents and leave its field
lengthat 157. It is the length of sound for a clip of 121 frames.Out of this blank the model makes the sound, the way it makes the clip out of noise.
Add the sampler
Add the node WanVideo Sampler and connect to it:
- the model to the input
model; - the output of WanVideo Ovi CFG, not of WanVideo TextEncode, to the input
text_embeds; - the output of WanVideo Empty Embeds to the input
image_embeds; - the output of WanVideo Empty MMAudio Latents to the input
samples.
Set steps to 50 and cfg to 4.
- Turn the result into frames
Add the node WanVideo Decode. Connect the output of the sampler to its input samples, and the output of WanVideo VAE Loader to the input vae.
- Turn the result into sound
Add the nodes Ovi MMAudio VAE Loader and WanVideo Decode Ovi Audio.
- In Ovi MMAudio VAE Loader choose in the field
vaethe filemmaudio_vae, and in the fieldvocoderthe filemmaudio_vocoder. They are two different files. - Connect its output to the input
mmaudio_vaeof WanVideo Decode Ovi Audio. - Connect the output of the sampler to the input
samplesof WanVideo Decode Ovi Audio, the same output that goes into WanVideo Decode.
- Assemble the clip with its sound
Add the nodes Create Video and Save Video. Connect the frames to the input images, the output of WanVideo Decode Ovi Audio to the input audio, and the clip to the input video. Set the field fps to 24.
- If the clip should start from a picture (reading)
Ovi can start a clip from your picture. It is loaded, brought to the size of the clip and turned into the compressed form by the node WanVideo Encode. The output of that node goes to the input extra_latents of WanVideo Empty Embeds.
The lesson does not check this step: the graph works without a picture too.
- If the sound or the speech did not come out (reading)
What to check:
- the character is not heard: the words must stand between
<S>and<E>, preferably in English; - the speech is cut off: five seconds hold one or two short phrases;
- the sound is dull or echoes: add what you hear to WanVideo TextEncode: muffled, echo, noise;
- a black screen: check
base_precision, it must bebf16.
- 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.
Ovi takes long: 50 steps for two models at once. For a trial set 30.
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 two models:
- a WanVideo Model Loader node.
- a WanVideo Extra Model Select node.
extra_modelof WanVideo Extra Model Select intoextra_modelof WanVideo Model Loader.modelof WanVideo Model Loader holds the Ovi video model; such a file lies inmodels/diffusion_models, for exampleWan2_2-Ovi-960x960-10s_fp8_e4m3fn_scaled_KJ.safetensors.extra_modelof WanVideo Extra Model Select is not the same file asmodelof WanVideo Model Loader.extra_modelof WanVideo Extra Model Select holds the Ovi audio model; such a file lies inmodels/diffusion_models, for exampleWan2_2-Ovi-audio_model_bf16.safetensors.base_precisionof WanVideo Model Loader isbf16. Why: withfp16this model can give a black screen.
- 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.2 VAE (Wan2_2_VAE); such a file lies inmodels/vae, for exampleWan2_2_VAE_bf16.safetensors.
- Step 4, Describe the frame:
- a WanVideo TextEncode node.
wan_t5_modelof WanVideo T5 Text Encoder Loader intot5of WanVideo TextEncode (prompt).positive_promptof WanVideo TextEncode (prompt) holds at least 3 characters and 2 real words.
- Step 5, Write the speech in:
positive_promptof WanVideo TextEncode (prompt) holds at least 3 characters, with<S>and<E>.
- Step 6, Connect the sound setting:
- a WanVideo Ovi CFG node.
text_embedsof WanVideo TextEncode (prompt) intooriginal_text_embedsof WanVideo Ovi CFG.ovi_audio_cfgof WanVideo Ovi CFG is from 2 to 4; Do this for me sets 3. Why: this is how strictly the sound follows the prompt. 3 gives sound without distortion.
- Step 7, Say what the sound must not be:
- a WanVideo TextEncode node.
wan_t5_modelof WanVideo T5 Text Encoder Loader intot5of WanVideo TextEncode (what the sound must not be).text_embedsof WanVideo TextEncode (what the sound must not be) intoovi_negative_text_embedsof WanVideo Ovi CFG.positive_promptof WanVideo TextEncode (what the sound must not be) holds at least 3 characters.
- Step 8, Set the size and the length:
- a WanVideo Empty Embeds node.
num_framesof WanVideo Empty Embeds is121. Why: ovi is made for exactly 121 frames, five seconds.
- Step 9, Add the blank sound:
- a WanVideo Empty MMAudio Latents node.
lengthof WanVideo Empty MMAudio Latents is157. Why: this is the length of the sound for a clip of 121 frames.
- Step 10, Add the sampler:
- a WanVideo Sampler node.
modelof WanVideo Model Loader intomodelof WanVideo Sampler.text_embedsof WanVideo Ovi CFG intotext_embedsof WanVideo Sampler.WANVIDIMAGE_EMBEDSof WanVideo Empty Embeds intoimage_embedsof WanVideo Sampler.samplesof WanVideo Empty MMAudio Latents intosamplesof WanVideo Sampler.stepsof WanVideo Sampler is from 30 to 50; Do this for me sets 50. Why: ovi works out the sound and the picture together and needs 50 steps for it.cfgof WanVideo Sampler is from 3 to 5; Do this for me sets 4. Why: the Ovi example uses cfg 4: higher burns the clip, lower follows the prompt worse.
- 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, Turn the result into sound:
- a Ovi MMAudio VAE Loader node.
- a WanVideo Decode Ovi Audio node.
mmaudio_vaeof Ovi MMAudio VAE Loader intommaudio_vaeof WanVideo Decode Ovi Audio.samplesof WanVideo Sampler intosamplesof WanVideo Decode Ovi Audio.vaeof Ovi MMAudio VAE Loader holds the MMAudio VAE; such a file lies inmodels/mmaudio, for examplemmaudio_vae_16k_fp32.safetensors.vocoderof Ovi MMAudio VAE Loader holds the MMAudio vocoder; such a file lies inmodels/mmaudio, for examplemmaudio_vocoder_bigvgan_best_netG_fp32.safetensors.
- Step 13, Assemble the clip with its sound:
- a Create Video node.
- a Save Video node.
IMAGEof WanVideo Decode intoimagesof Create Video.audioof WanVideo Decode Ovi Audio intoaudioof Create Video.VIDEOof Create Video intovideoof Save Video.fpsof Create Video is24. Why: ovi makes a clip at 24 frames per second, and its sound is made for them.
Mistakes people make
- Writing the unwanted sound into
negative_promptof the second node: the Ovi node reads its positive field. - Too much speech for five seconds: one or two short phrases fit.
fp16precision: a black screen.