Video from a picture
Lesson "video-image", in the group Video of the lesson list. Steps: 15.
What you will be able to do
You bring a finished picture to life: it becomes the first frame of the clip.
What you need
- It goes on from Video from text. The card says so; it is a hint, not a lock.
- Model files the lesson checks:
- the high_noise half of Wan 2.2 image to video (i2v):
models/diffusion_models, for examplewan2.2_i2v_high_noise_14B_fp8_scaled.safetensors; - the low_noise half of Wan 2.2 image to video (i2v):
models/diffusion_models, for examplewan2.2_i2v_low_noise_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.
- the high_noise half of Wan 2.2 image to video (i2v):
- Nodes: Load Diffusion Model, Load CLIP, Load VAE, CLIP Text Encode (Prompt), ModelSamplingSD3, Load Image, WanImageToVideo, KSampler (Advanced), VAE 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 is different (reading)
Here the clip starts from your picture. The prompt no longer says what is in the frame but what happens in it.
The graph is almost the one from "Video from text". If it is on your canvas, most steps are already done and the app goes straight to the new ones.
Three things change: the model files, a node with the picture and a node that prepares the start.
Choose the models for a picture
Two Load Diffusion Model nodes are needed. In the
unet_namefield of one choose thei2vfile withhigh_noisein its name, in the other thei2vfile withlow_noise.i2vmeans "image to video".The
t2vmodels of the last lesson do not take a picture.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 ready Wan 2.2 "image 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.
The text reader
A Load CLIP node is needed, with the
umt5_xxlfile inclip_nameandwanintype. It is the same as for video from text.The VAE
A Load VAE node is needed, with the
wan_2.1_vaefile invae_name.Here it works twice: it reads your picture at the start and puts the frames together at the end.
Describe the motion
Two CLIP Text Encode (Prompt) nodes are needed, with their
clipinput connected from Load CLIP. In thetextfield of one describe what happens: who moves and how, what the camera does.What the picture already shows need not be repeated.
The noise shift
Two ModelSamplingSD3 nodes are needed, one for each model, with
shiftfrom 5 to 8. TheMODELoutput of each loader goes into themodelinput of its node.Load the picture
Add a Load Image node and choose your picture in its
imagefield. The list shows the files of theinputfolder of your ComfyUI.This picture becomes the first frame. The model keeps it best when the clip has the proportions of the picture.
Prepare the start
Add a WanImageToVideo node and connect to it:
- to
positiveandnegative, the two texts; - to
vae, the output of Load VAE; - to
start_image, theIMAGEoutput of Load Image.
Set
widthto 832,heightto 480 andlengthto 81.This node puts your picture into the blank of the clip and into both texts. That is why the samplers take the texts from its outputs from here on, and not directly.
- to
The first pass
A KSampler (Advanced) node is needed. Its
modelinput takes thehigh_noisemodel through its ModelSamplingSD3 node. Itspositive,negativeandlatent_imageinputs take the three outputs of WanImageToVideo:positive,negativeandlatent.A sampler left connected to the texts directly does not learn of the picture and draws the clip from nothing.
The node with the blank from "Video from text" is connected to nothing after this. It can be deleted.
The second pass
A second KSampler (Advanced) node is needed. Its model input takes the low_noise model through ModelSamplingSD3. Its positive and negative inputs take the same outputs of WanImageToVideo, and latent_image takes the output of the first sampler.
- Set up the first sampler
In the first sampler set:
add_noise:enable;steps: 20;cfg: 3.5;start_at_step: 0 andend_at_step: 10;return_with_leftover_noise:enable.
It does the first half of twenty steps and hands the clip over with the noise that is left. Without the last setting the second sampler gets a clip that is already clean and has nothing to finish.
- Set up the second sampler
In the second sampler set:
add_noise:disable;stepsandcfg: as in the first;start_at_step: 10, the very step the first one stopped at;return_with_leftover_noise:disable.
The noise is already there and must not be added twice. If start_at_step differs from the first sampler's end_at_step, some steps are lost or done twice.
- Turn the result into frames
Add a VAE Decode node. Connect the second sampler's output to its samples input and the output of Load VAE to its vae input.
The sampler gives the clip in a compressed form. This node unfolds it into frames.
- 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 draws 16 frames a second. With another number the clip runs faster or slower than it was meant to.
- 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.
If the clip stands still, add action and camera motion to the prompt. If a figure or a face drifts towards the end, shorten length or describe a calmer motion.
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, Choose the models for a picture:
- a Load Diffusion Model node.
- a Load Diffusion Model node.
unet_nameof Load Diffusion Model (first pass) holds the high_noise half of Wan 2.2 image to video (i2v); such a file lies inmodels/diffusion_models, for examplewan2.2_i2v_high_noise_14B_fp8_scaled.safetensors.unet_nameof Load Diffusion Model (second pass) is not the same file asunet_nameof Load Diffusion Model (first pass).unet_nameof Load Diffusion Model (second pass) holds the low_noise half of Wan 2.2 image to video (i2v); such a file lies inmodels/diffusion_models, for examplewan2.2_i2v_low_noise_14B_fp8_scaled.safetensors.
- Step 3, The text reader:
- a Load CLIP node.
clip_nameof Load CLIP holds the umt5-xxl text encoder of Wan; such a file lies inmodels/text_encoders, for exampleumt5_xxl_fp8_e4m3fn_scaled.safetensors.typeof Load CLIP iswan. Why: thetypefield tells the node which model the text is for. With another value Wan gets nonsense.
- Step 4, The VAE:
- a Load VAE node.
vae_nameof Load VAE holds the Wan 2.1 VAE (wan_2.1_vae); such a file lies inmodels/vae, for examplewan_2.1_vae.safetensors.
- Step 5, Describe the motion:
- 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 and 2 real words.
- Step 6, The noise shift:
- a ModelSamplingSD3 node.
- a ModelSamplingSD3 node.
MODELof Load Diffusion Model (first pass) intomodelof ModelSamplingSD3 (shift of the first pass) (a LoraLoaderModelOnly in between is accepted).MODELof Load Diffusion Model (second pass) intomodelof ModelSamplingSD3 (shift of the second pass) (a LoraLoaderModelOnly in between is accepted).shiftof ModelSamplingSD3 (shift of the first pass) is from 5 to 8; Do this for me sets 8. Why: with a small shift Wan holds composition and motion worse, and the clip comes out sluggish.shiftof ModelSamplingSD3 (shift of the second pass) is from 5 to 8; Do this for me sets 8. Why: with a small shift Wan holds composition and motion worse, and the clip comes out sluggish.
- Step 7, Load the picture:
- a Load Image node.
imageof Load Image: a value is chosen.
- Step 8, Prepare the start:
- a WanImageToVideo node.
CONDITIONINGof CLIP Text Encode (Prompt) (prompt) intopositiveof WanImageToVideo.CONDITIONINGof CLIP Text Encode (Prompt) (negative prompt) intonegativeof WanImageToVideo.VAEof Load VAE intovaeof WanImageToVideo.IMAGEof Load Image intostart_imageof WanImageToVideo.lengthof WanImageToVideo 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.
- Step 9, The first pass:
- a KSampler (Advanced) node.
MODELof ModelSamplingSD3 (shift of the first pass) intomodelof KSampler (Advanced) (first pass) (a LoraLoaderModelOnly in between is accepted).positiveof WanImageToVideo intopositiveof KSampler (Advanced) (first pass).negativeof WanImageToVideo intonegativeof KSampler (Advanced) (first pass).latentof WanImageToVideo intolatent_imageof KSampler (Advanced) (first pass).
- Step 10, The second pass:
- a KSampler (Advanced) node.
MODELof ModelSamplingSD3 (shift of the second pass) intomodelof KSampler (Advanced) (second pass) (a LoraLoaderModelOnly in between is accepted).positiveof WanImageToVideo intopositiveof KSampler (Advanced) (second pass).negativeof WanImageToVideo intonegativeof KSampler (Advanced) (second pass).LATENTof KSampler (Advanced) (first pass) intolatent_imageof KSampler (Advanced) (second pass).
- Step 11, Set up the first sampler:
add_noiseof KSampler (Advanced) (first pass) isenable. Why: the first sampler starts from pure noise, so it is the one that adds the noise.stepsof KSampler (Advanced) (first pass) is from 4 to 60; Do this for me sets 20. Why: twenty steps are split between two passes; with another number the hand-over moves.cfgof KSampler (Advanced) (first pass) is from 1 to 4; Do this for me sets 3.5. Why: a high cfg burns a Wan 2.2 clip. The ComfyUI templates use 3.5.start_at_stepof KSampler (Advanced) (first pass) is0. Why: the first sampler starts at the very beginning, step 0.end_at_stepof KSampler (Advanced) (first pass) is from 1 to 15; Do this for me sets 10. Why: at this step the first model hands the clip to the second. The ComfyUI templates split twenty steps in half.end_at_stepof KSampler (Advanced) (first pass) is belowstepsof KSampler (Advanced) (first pass). Why: if the first sampler stops no earlier than its last step, it does everything itself and leaves the second nothing to finish.return_with_leftover_noiseof KSampler (Advanced) (first pass) isenable. Why: without the noise that is left, the second sampler gets a clip that is already clean and has nothing to finish.
- Step 12, Set up the second sampler:
add_noiseof KSampler (Advanced) (second pass) isdisable. Why: the clip already holds noise from the first sampler; adding it again breaks the clip.stepsof KSampler (Advanced) (second pass) equalsstepsof KSampler (Advanced) (first pass). Why: both samplers count the same steps, or the hand-over between them does not line up.cfgof KSampler (Advanced) (second pass) is from 1 to 4; Do this for me sets 3.5. Why: a high cfg burns a Wan 2.2 clip. The ComfyUI templates use 3.5.start_at_stepof KSampler (Advanced) (second pass) equalsend_at_stepof KSampler (Advanced) (first pass). Why: the second sampler goes on from the step the first one stopped at. Otherwise some steps are lost or done twice.return_with_leftover_noiseof KSampler (Advanced) (second pass) isdisable. Why: the second sampler finishes the clip; there is no one to hand leftover noise to.
- Step 13, Turn the result into frames:
- a VAE Decode node.
LATENTof KSampler (Advanced) (second pass) intosamplesof VAE Decode.VAEof Load VAE intovaeof VAE Decode.
- Step 14, Make the clip and save it:
- a Create Video node.
- a Save Video node.
IMAGEof VAE Decode intoimagesof Create Video.VIDEOof Create Video intovideoof Save Video.fpsof Create Video is16. Why: wan draws 16 frames per second. With another number the clip runs faster or slower than it was meant to.
Mistakes people make
t2vfiles: the picture is ignored.- Samplers still connected to the text nodes directly: the clip is drawn from nothing.
- A portrait picture into a landscape clip: cropped edges. Match proportions.
- Repeating the picture's description in the prompt: say what moves instead.
What next
These lessons go on from this one: Two models in one graph, A portrait that speaks: HuMo.