VACE: motion from another video
Lesson "wrapper-vace", in the group WanVideoWrapper of the lesson list. Steps: 10.
What you will be able to do
A clip on WanVideoWrapper repeats the motion, the depth or the outlines of another video.
What you need
- It goes on from Video on WanVideoWrapper. The card says so; it is a hint, not a lock.
- Model files the lesson checks:
- the VACE module for the high_noise model:
models/diffusion_models, for exampleWan2_2_Fun_VACE_module_A14B_HIGH_fp8_e4m3fn_scaled_KJ.safetensors; - the VACE module for the low_noise model:
models/diffusion_models, for exampleWan2_2_Fun_VACE_module_A14B_LOW_fp8_e4m3fn_scaled_KJ.safetensors.
- the VACE module for the high_noise model:
- Nodes: WanVideo Model Loader, WanVideo VAE Loader, WanVideo Sampler, WanVideo VACE Module Select, Load Video, Get Video Components, WanVideo VACE Encode.
- 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 VACE is (reading)
VACE is a module that teaches Wan to take a hint from a ready video. The hint can be the video itself, a depth map, a person's pose or outlines made from its frames. The prompt says what to draw, and the hint says how it moves and where it stands.
This is how a dancer's motion is moved onto another character, how a clip changes style while keeping its motion, or how a camera move is set by example.
The lesson goes on from the graph of "Video on WanVideoWrapper".
A WanVideoWrapper graph is needed
The canvas must have two WanVideo Model Loader loaders, a WanVideo VAE Loader node and two WanVideo Sampler samplers, the second taking the result of the first. This is the graph of "Video on WanVideoWrapper".
If it is not there, do that lesson first.
Add the VACE module to both models
Add two WanVideo VACE Module Select nodes. In the
vace_modelfield of one choose the VACE module for thehigh_noisemodel, in the other the one forlow_noise. Connect theextra_modeloutput of each to theextra_modelinput of its model loader.A module is made for its own model: Wan 2.2 has two of them, Wan 2.1 one. It lies in the same folder as the models.
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 VACE example graph from the pack's
example_workflowsfolder: 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.Load the hint video
Add Load Video and Get Video Components. In the
filefield choose the video whose motion is to be repeated. Connect the output of Load Video to thevideoinput of Get Video Components: it takes the video apart into frames.The list shows the videos of the
inputfolder of your ComfyUI.Frames, depth, a pose or outlines (reading)
The frames can go to VACE as they are: then the model holds on to everything at once, shape, colour and motion. More often one hint is made from the frames first:
- a depth map holds the layout and the motion and leaves the looks to the prompt;
- a pose holds a person's motion and not their clothes or face;
- outlines hold the shape of things.
Such nodes are in the comfyui_controlnet_aux pack: Depth Anything, OpenPose, DWPose, Canny, Lineart. They stand between Get Video Components and VACE: the frames into their input, their output on. The lesson counts a direct link and a link through them alike.
Prepare the hint for the model
Add a WanVideo VACE Encode node. Connect the output of WanVideo VAE Loader to its
vaeinput, and toinput_framesthe frames from Get Video Components or from the node that made a hint of them.Set
num_framesto 81, andwidthandheightas in the clip. Thestrengthfield is the strength of the hint: start at 1.Give the hint to both samplers
Connect the
vace_embedsoutput of WanVideo VACE Encode to theimage_embedsinput of both samplers.The old links from the empty blank come off by themselves. The empty blank node can be deleted after that: the VACE node now sets the size and the length.
A sample picture (reading)
The WanVideo VACE Encode node has a
ref_imagesinput: a picture of who or what must be in the clip. Connect a node with a picture to it, and the model keeps that look the whole time.A picture on a plain background, with nothing else in it, works best.
How closely to follow the hint (reading)
Three fields of WanVideo VACE Encode decide how strongly the hint holds the clip:
strength: below 1 gives the model more freedom, above 1 holds it more strictly;vace_start_percentandvace_end_percent: for which share of the steps the hint acts. Setvace_end_percentto 0.5 and the hint sets the start, while the model finishes the detail itself.
If the clip repeats the hint too literally, flaws and all, lower
strengthorvace_end_percent.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.
The clip is no longer than the hint video. If the video is shorter, lower num_frames.
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, A WanVideoWrapper graph is needed:
- a WanVideo Model Loader node.
- a WanVideo Model Loader node.
- a WanVideo VAE Loader node.
- a WanVideo Sampler node.
- a WanVideo Sampler node.
modelof WanVideo Model Loader (first pass) intomodelof WanVideo Sampler (first pass).modelof WanVideo Model Loader (second pass) intomodelof WanVideo Sampler (second pass).samplesof WanVideo Sampler (first pass) intosamplesof WanVideo Sampler (second pass).
- Step 3, Add the VACE module to both models:
- a WanVideo VACE Module Select node.
- a WanVideo VACE Module Select node.
extra_modelof WanVideo VACE Module Select (VACE for the first pass) intoextra_modelof WanVideo Model Loader (first pass).extra_modelof WanVideo VACE Module Select (VACE for the second pass) intoextra_modelof WanVideo Model Loader (second pass).vace_modelof WanVideo VACE Module Select (VACE for the first pass) holds the VACE module for the high_noise model; such a file lies inmodels/diffusion_models, for exampleWan2_2_Fun_VACE_module_A14B_HIGH_fp8_e4m3fn_scaled_KJ.safetensors.vace_modelof WanVideo VACE Module Select (VACE for the second pass) is not the same file asvace_modelof WanVideo VACE Module Select (VACE for the first pass).vace_modelof WanVideo VACE Module Select (VACE for the second pass) holds the VACE module for the low_noise model; such a file lies inmodels/diffusion_models, for exampleWan2_2_Fun_VACE_module_A14B_LOW_fp8_e4m3fn_scaled_KJ.safetensors.
- Step 4, Load the hint video:
- a Load Video node.
- a Get Video Components node.
VIDEOof Load Video intovideoof Get Video Components.fileof Load Video: a value is chosen.
- Step 6, Prepare the hint for the model:
- a WanVideo VACE Encode node.
vaeof WanVideo VAE Loader intovaeof WanVideo VACE Encode.imagesof Get Video Components intoinput_framesof WanVideo VACE Encode (a Depth Anything V2 - Relative or DepthAnythingPreprocessor or MiDaS-DepthMapPreprocessor or OpenPose Pose or DWPreprocessor or Canny Edge or LineArtPreprocessor or AnyLineArtPreprocessor_aux or Upscale Image or Resize Image in between is accepted).num_framesof WanVideo VACE Encode is from 49 to 121, a frame count of the form 4n + 1; Do this for me sets 81. Why: wan takes a number of frames of the form 4n + 1: 49, 81, 121. 81 frames at 16 per second make five seconds.strengthof WanVideo VACE Encode is from 0.5 to 1.5; Do this for me sets 1. Why: the strength of the guide: at 1 the model follows it the usual way, a good place to start tuning.
- Step 7, Give the hint to both samplers:
WANVIDIMAGE_EMBEDSof WanVideo VACE Encode intoimage_embedsof WanVideo Sampler (first pass).WANVIDIMAGE_EMBEDSof WanVideo VACE Encode intoimage_embedsof WanVideo Sampler (second pass).
Mistakes people make
- The same module for both models.
- A hint video shorter than
num_frames. - A hint too literal (flaws copied): lower
strengthorvace_end_percent.