Wan 2.2 TI2V Latent (Nukun)
One latent node that flips Wan 2.2 between text-to-video and image-to-video
- vae
- settings
- start_image
- latent
- report
Wan 2.2's TI2V-5B is one model with two modes - text-to-video and image-to-video - and the difference at the graph level is mostly how the starting latent gets built. Doing that by hand means grabbing the right empty-latent node or the right image-encoding chain, and it's exactly where beginner Wan workflows break. Nukun Wan 2.2 TI2V Latent collapses both paths into one node that switches on the settings object you already made with Video Settings (Nukun). No cable changes, no "wait, did I use the T2V latent on an I2V run?" moments.
How it works
It takes your vae, the WAN22_VIDEO_SETTINGS object, and an optional start_image, then builds the Wan 2.2 latent with the shape the 3D causal VAE actually wants: [1, 48, temporal, height/16, width/16] - 48 channels, 16x spatial downsample, 4x temporal. In text_to_video mode it just returns a zero latent of that shape. In image_to_video mode it prepares your start image to the target size, encodes it with the Wan VAE, splices the encoded frames into the front of the latent, and emits a noise_mask that marks the image frames as "already conditioned" (mask 0) and the rest as "to denoise" (mask 1). That mask is what keeps the first frames from being destroyed by the noise the sampler adds - it's the standard inpainting-style seam that makes I2V continuation work.
The inputs that matter
vae- the Wan 2.2 VAE (must be the 48-channel Wan 2.2 one; the node errors out if you feed it the wrong shape).settings- fromNukunWan22VideoSettings; drives dimensions, frame count, and which mode you're in.resize_mode-center_crop(default) orpad. Crop trims your image to fill the frame; pad letterboxes it into the target aspect ratio. For continuation workflows, crop is usually what you want so the seam lines up.start_image(optional) - required in I2V mode; the node raises a clear error if you forget it. Ignored in T2V mode.
Outputs: latent (wire to your sampler's latent_image input) and a report string that tells you what mode ran and how the start image was prepared.
What it's good for
This is the heart of the pack's Wan 2.2 toolkit: it's what makes the "Anima to Wan" workflow - generate a keyframe, caption it, extend it into a video - and the segmented continuation loop possible. It's also the node that keeps your T2V and I2V experiments honest: switch the mode on Video Settings, rerun, and you get a correctly-built latent either way. If you're just doing one-off Wan clips, you might be fine with stock nodes, but the moment you start chaining segments this is the one you want holding the latent together.
Installing it
Part of Nukun_ComfyUI_Nodes - ComfyUI Manager (search "Nukun") or:
cd ComfyUI/custom_nodes
git clone https://github.com/OnekoSL/Nukun_ComfyUI_Nodes
Restart ComfyUI. Only numpy, Pillow, scipy, and PyWavelets are required. The most common failure - "Wan 2.2 TI2V-5B requires a 48-channel Wan 2.2 VAE latent" - means your VAE input isn't the Wan 2.2 VAE; check the model you loaded before suspecting the node.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| vae | VAE | — | |
| settings | WAN22_VIDEO_SETTINGS | — | |
| resize_mode | COMBO | center_crop | 2 options: center_crop, pad |
| start_imageopt | IMAGE | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| latent | LATENT | — |
| report | STRING | — |