A reference for the whole clip: Wan VACE
Lesson "anchor-reference", in the group Video: the anchor picture of the lesson list. Steps: 16.
Consent first
Only someone who agrees may be brought to life this way: yourself, a made-up character, or a person who gave permission. Obtain permission for the source material and follow local law. For adult (18+) use, obtain consent and follow local law. See Content rules.
What you will be able to do
A person or an object from your picture stays itself in every frame, not only in the first.
What you need
- It goes on from Two anchors: first and last frame. The card says so; it is a hint, not a lock.
- Model files the lesson checks:
- for
unet_nameof Load Diffusion Model: a file whose name hasvace; - for
lora_nameof LoraLoaderModelOnly or Load LoRA: a file whose name hascausvid; - for
clip_nameof Load CLIP: a file whose name hasumt5; - for
vae_nameof Load VAE: a file whose name haswan_2.1_vae.
- for
- Nodes: Load Diffusion Model, LoraLoaderModelOnly / Load LoRA, ModelSamplingSD3, Load CLIP, Load VAE, CLIP Text Encode (Prompt), Load Image, WanVaceToVideo, KSampler, TrimVideoLatent, VAE Decode / VAE Decode (Tiled), 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.
Before you start (reading)
Only someone who agrees may be brought to life this way: yourself, a made-up character, or a person who gave permission. Obtain permission for the source material and follow local law. For adult (18+) use, obtain consent and follow local law. Exclude anyone under 18 or who appears underage; label synthetic depictions so they do not mislead others. The lessons teach technique in factual, non-graphic terms.
A start image fixes the first frame. A reference input is read by the model at every frame: the subject of the picture appears in the clip and keeps its look, while the scene, the pose and the camera may be quite different. Wan VACE does this on ComfyUI's own nodes.
What it costs: the VACE 14B model, about 33 GB in
fp16(anfp8file is half), inmodels/diffusion_models, with the CausVid LoRA inmodels/loras,umt5_xxlandwan_2.1_vae. Plan on 24 GB of graphics memory or a slow run with parts in system memory. With the LoRA, 4 steps are enough, and an 81-frame clip takes minutes on a large card.If the canvas already holds another graph, start from an empty one: "File ▸ New project".
Load the VACE model
Add a Load Diffusion Model node and choose the
wan2.1_vace_14Bfile inunet_name.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 "Wan VACE Reference to Video" template: 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.
Add the CausVid LoRA
Add a LoraLoaderModelOnly node and connect the output of Load Diffusion Model to its
modelinput. Choose the CausVid file inlora_nameand setstrength_modelto 0.3.It lets the model finish in 4 steps; at full strength it flattens the motion.
Set the shift
Add a ModelSamplingSD3 node and connect the output of LoraLoaderModelOnly to its
modelinput. Setshiftto 8.Load the text encoder
Add a Load CLIP node. Choose the
umt5_xxlfile inclip_nameand settypetowan.The text encoder turns the prompt into what the model reads. The
fp8version of the file takes half the memory of the full one and is what the templates use.Load the VAE
Add a Load VAE node and choose
wan_2.1_vaeinvae_name. VACE is built on Wan 2.1.Write the prompt
Add two CLIP Text Encode (Prompt) nodes and connect the
CLIPoutput of Load CLIP to theclipinput of each. In thetextfield of one, describe the clip: who or what is in the frame, what happens, how the camera moves. The other is the negative prompt: what must not be there.For video the action matters most. "A cat jumps onto a windowsill, the camera follows" works better than "a cat on a windowsill".
Load the reference picture
Add a Load Image node and choose in
imagethe picture of the subject: a person, a character, an object.A plain background works best: the model takes everything in the picture as part of the subject.
Bring it together
Add a WanVaceToVideo node and connect to it the two prompts, the VAE, and the picture to
reference_image. Setwidthandheightto 768,lengthto 81 andstrengthto 1.strengthis how firmly the reference holds. The other inputs (control_video,control_masks) stay empty here; in other lessons they carry motion.Add the sampler
Add a KSampler node. Its model input takes the output of ModelSamplingSD3; positive, negative and latent_image take the outputs of WanVaceToVideo with the same names.
- Set up the sampler
Set steps to 4, cfg to 1 and sampler_name to uni_pc, as in the template. Without the LoRA the model needs about 20 steps and a cfg near 6.
- Cut the reference off
Add a TrimVideoLatent node and connect the output of KSampler to its samples input. Connect the trim_latent output of WanVaceToVideo to its trim_amount input.
VACE puts the reference at the start of the clip as extra frames; this node cuts them off, so the picture does not flash at the beginning.
- Turn the result into frames
Add a VAE Decode node. Connect the output of TrimVideoLatent to its samples input and the VAE to its vae input.
- Make the clip and save it
Add Create Video and Save Video. The frames from VAE Decode go into the images input of Create Video, and its output into the video input of Save Video. Set fps to 16.
Wan VACE draws 16 fps. With another number the clip runs faster or slower than it was meant to.
- What a reference keeps, and what else does the same (reading)
- It keeps the look of the subject: face, hair, clothes, colours. It does not keep the pose or the place of the picture, and it is not the first frame.
- A face seen small in the reference comes out vague; a close, sharp picture holds better.
- Other ways to hold a subject through all frames: Wan Animate takes a reference picture and the motion of a video (the lesson "Animation by pose: Wan Animate"); HuMo holds a person while they speak (the lesson "A portrait that speaks: HuMo").
- The cost: a reference makes the model read more at every step, and the VACE model is large. A clip takes longer than plain image to video.
- 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.
Next in the thread: "A longer video in parts".
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 VACE model:
- a Load Diffusion Model node.
unet_nameof Load Diffusion Model holds a file whose name hasvace(capitals, dots and dashes do not matter).
- Step 3, Add the CausVid LoRA:
- a LoraLoaderModelOnly or Load LoRA node.
MODELof Load Diffusion Model intomodelof LoraLoaderModelOnly or Load LoRA.lora_nameof LoraLoaderModelOnly or Load LoRA holds a file whose name hascausvid(capitals, dots and dashes do not matter).strength_modelof LoraLoaderModelOnly or Load LoRA is from 0.2 to 1; Do this for me sets 0.3.
- Step 4, Set the shift:
- a ModelSamplingSD3 node.
MODELof LoraLoaderModelOnly or Load LoRA intomodelof ModelSamplingSD3 (a LoraLoaderModelOnly or EasyCache in between is accepted).shiftof ModelSamplingSD3 is from 5 to 8; Do this for me sets 8.
- Step 5, Load the text encoder:
- a Load CLIP node.
clip_nameof Load CLIP holds a file whose name hasumt5(capitals, dots and dashes do not matter).typeof Load CLIP iswan.
- Step 6, Load the VAE:
- a Load VAE node.
vae_nameof Load VAE holds a file whose name haswan_2.1_vae(capitals, dots and dashes do not matter).
- Step 7, Write the prompt:
- a CLIP Text Encode (Prompt) node.
- a CLIP Text Encode (Prompt) node.
CLIPof Load CLIP intoclipof CLIP Text Encode (Prompt) (prompt).CLIPof Load CLIP intoclipof CLIP Text Encode (Prompt) (negative prompt).textof CLIP Text Encode (Prompt) (prompt) holds at least 3 characters.
- Step 8, Load the reference picture:
- a Load Image node.
imageof Load Image: a value is chosen.
- Step 9, Bring it together:
- a WanVaceToVideo node.
CONDITIONINGof CLIP Text Encode (Prompt) (prompt) intopositiveof WanVaceToVideo.CONDITIONINGof CLIP Text Encode (Prompt) (negative prompt) intonegativeof WanVaceToVideo.VAEof Load VAE intovaeof WanVaceToVideo.IMAGEof Load Image intoreference_imageof WanVaceToVideo (a Upscale Image or Upscale Image By or ImageFromBatch or ImageResizeKJv2 or Resize Image or GetImageRangeFromBatch or ResizeImageMaskNode in between is accepted).widthof WanVaceToVideo is from 480 to 1280; Do this for me sets 768.heightof WanVaceToVideo is from 480 to 1280; Do this for me sets 768.lengthof WanVaceToVideo is from 49 to 121; Do this for me sets 81.strengthof WanVaceToVideo is from 0.5 to 1.5; Do this for me sets 1.
- Step 10, Add the sampler:
- a KSampler node.
MODELof ModelSamplingSD3 intomodelof KSampler (a LoraLoaderModelOnly or EasyCache in between is accepted).positiveof WanVaceToVideo intopositiveof KSampler.negativeof WanVaceToVideo intonegativeof KSampler.latentof WanVaceToVideo intolatent_imageof KSampler.
- Step 11, Set up the sampler:
stepsof KSampler is from 4 to 30; Do this for me sets 4.cfgof KSampler is from 1 to 6; Do this for me sets 1.sampler_nameof KSampler isuni_pc.
- Step 12, Cut the reference off:
- a TrimVideoLatent node.
LATENTof KSampler intosamplesof TrimVideoLatent.trim_latentof WanVaceToVideo intotrim_amountof TrimVideoLatent.
- Step 13, Turn the result into frames:
- a VAE Decode or VAE Decode (Tiled) node.
LATENTof TrimVideoLatent intosamplesof VAE Decode or VAE Decode (Tiled).VAEof Load VAE intovaeof VAE Decode or VAE Decode (Tiled).
- Step 14, Make the clip and save it:
- a Create Video node.
- a Save Video node.
IMAGEof VAE Decode or VAE Decode (Tiled) intoimagesof Create Video.VIDEOof Create Video intovideoof Save Video.fpsof Create Video is16.