Nodes/comfyui-helto-wan22/WAN 2.2 Apply Image Guides
ComfyUI Node

WAN 2.2 Apply Image Guides

The WAN 2.2 node that actually turns your storyboard into conditioning

By helto4real·Created 4 months ago·Updated 4 months ago· 0
WAN 2.2 Apply Image Guides
  • positive
  • negative
  • vae
  • image_guides
  • start_images
  • ref_image
  • control_video
  • positive_high
  • positive_low
  • negative
  • latent
width1280
height704
length49
batch_size1

WAN 2.2's native image-to-video node takes exactly one start image, and then you pray. This node is the "multiple frames" answer: it takes a guide payload built by the pack's WAN22ImageGuideManager, plus your conditioning and VAE, and hands back guided conditioning and a latent that you feed to your samplers. It doesn't sample or decode - it prepares a sampler stage. That narrowness is the point.

It's the workhorse of comfyui-helto-wan22, a pack that brings LTX-style multi-image guides to WAN 2.2 while using WAN's own concat conditioning under the hood. If you've used LTX keyframe workflows, the mental model carries straight over; the plumbing is different and native.

How it works

The mechanism, from the source: it builds a full "neutral frame" timeline - length frames of flat 0.5 gray at your width/height - then splices each guide image in at its resolved frame and VAE-encodes the whole timeline once. That single encoded timeline becomes a concat_latent_image on your conditioning. Alongside it go two masks, concat_mask (a per-frame "how strongly does this frame get locked" signal, one for the high-noise pass and one for the low-noise pass) and a concat_mask_index telling WAN which concat slot to read. WAN I2V models reserve extra input channels for exactly this image conditioning; the pack inspects the model to figure out how many slots exist.

Optional inputs ride along:

  • start_images - an IMAGE batch inserted from frame 0 (a real start sequence instead of a single guide).
  • ref_image - encoded into reference_latents, WAN's reference-image mechanism.
  • control_video - an IMAGE sequence encoded into the first concat slot, so you can combine control with guides. Needs a model with at least two slots.

Inputs and outputs that matter

Required: positive/negative conditioning (from a CLIP encode with the WAN text encoder), a WAN 2.2 vae, width/height, length (the frame count - note the tooltip: WAN latent length is ((length - 1) // 4) + 1, so it's grouped in fours), batch_size, and the image_guides payload from the Manager. All the timing and strength settings (fps, duplicate policy, strengths) travel inside that payload, which is why this node has no separate copies - if an older saved payload is missing a key, it falls back to the pack defaults.

Outputs are positive_high, positive_low, negative, and latent. Wire positive_high into the sampler running the WAN 2.2 high-noise model, positive_low into the low-noise model's sampler (WAN 2.2 splits denoising between a high-noise expert that handles motion and a low-noise expert that handles detail), and negative into both. The latent is an empty, correctly-sized WAN latent - you do not encode your start frame into it. That trips up people coming from the native WanImageToVideo node, where the latent is the encoded image. Here the guidance lives in the concat, not the latent.

How to install

A plain clone into custom_nodes - the pack has no requirements.txt and downloads no models itself:

cd ComfyUI/custom_nodes
git clone https://github.com/helto4real/comfyui-helto-wan22

Restart ComfyUI, or install via ComfyUI Manager (search "comfyui-helto-wan22"). You still need a WAN 2.2 I2V high/low model pair, the WAN VAE, and the umt5 text encoder in models/, downloaded separately like any WAN workflow.

Where people get burned

  • Duplicate guide frames default to error. If two guides land in the same 4-frame latent group, the run dies. Fix it in the Manager's duplicate_policy.
  • The VAE must match the model family. WAN latent channels aren't sliced or padded anymore - a 5B VAE feeding a 14B concat slot raises a channels-mismatch error on purpose, because padding quietly degrades image fidelity. Use the matching WAN 2.2 VAE for your checkpoint.
  • It expects a payload, not raw images. If you've got guides_json-style data lying around from an older workflow, parse_guides_json skips malformed entries silently - an empty payload means "no guides," which will happily produce an unguided clip that looks like a plain I2V run.

If you just want one node that does this and the whole pipeline, WAN22GenerateAllInOne folds guide application, two-phase sampling, and decode into a single pass. This node is for when you want to keep the sampler visible and tune the two expert passes yourself.

CategoryWAN 2.2

Inputs (11)

NameTypeDefaultDescription
positiveCONDITIONINGPositive conditioning to augment with WAN 2.2 image guide metadata.
negativeCONDITIONINGNegative conditioning to augment with matching WAN 2.2 image guide metadata.
vaeVAEWAN 2.2 VAE used to encode inserted guide frames.
widthINT128032–16384
heightINT70432–16384
lengthINT491–16384Output video frame count. WAN latent length is ((length - 1) // 4) + 1.
batch_sizeINT11–4096
image_guidesWAN22_IMAGE_GUIDESReusable guide payload from WAN 2.2 Image Guide Manager.
start_imagesoptIMAGEOptional IMAGE batch inserted from frame 0.
ref_imageoptIMAGEOptional WAN 2.2 reference image encoded as reference_latents.
control_videooptIMAGEOptional WAN 2.2 control video encoded into the first concat slot.

Outputs (4)

NameTypeDescription
positive_highCONDITIONING
positive_lowCONDITIONING
negativeCONDITIONING
latentLATENT