Nodes/XB_ToolBox/XB-BOX - Wan Image2Video
ComfyUI Node

XB-BOX - Wan Image2Video

The node that turns your start image into Wan's I2V conditioning

By wjluoxiao·Created 5 months ago·Updated 6 days ago· 302
XB-BOX - Wan Image2Video
  • positive
  • negative
  • vae
  • clip_vision_output
  • start_image
  • positive
  • negative
  • latent
width480
height832
length81
batch_size1
vae_tile_size64
scale_methodlanczos
crop_modecenter

Image-to-video is the reason most people run Wan at all. You've got a still you like, you want it to move, and you want the first frame to actually match it. XB_WanImageToVideo ("XB-BOX - Wan Image2Video") is the piece of the XB_ToolBox pack that does the awkward middle step: it takes your start image, VAE-encodes it, and bakes it into the conditioning and latent that the Wan sampler needs - so you never hand a raw image to a sampler that expects numbers.

If you've used ComfyUI's own Wan I2V workflow, this is the same machinery in one tidy node. The display category is XB_ToolBox/Wan, and it belongs to a pack whose whole premise is beginner-friendly Wan: the author's README literally says the goal is to help people "quickly master workflows" rather than babysit node graphs.

How it works

The node builds an empty latent tensor sized to your width × height × length, then:

  • If you feed a start_image, it upscales/crops it to your target resolution (scale_method defaults to lanczos, crop_mode to center), VAE-encodes it into a concat_latent_image, and stamps both positive and negative conditioning with that image plus a concat_mask. The mask is what pins the first frame - the model is told the start of the video is already decided, and it only gets to invent what comes after.
  • If you also wire in a clip_vision_output (run your start image through a CLIP Vision encode first), it attaches that to the positive conditioning, which is the other half of how Wan keeps identity stable across the clip.

The output is the three things a Wan sampler wants: positive, negative, and a latent. Wire those into XB_WanSampler (or into the relay nodes, which call this internally on every segment). Note it does not load models - your positive/negative come from a text-encode of the Wan T5/CLIP, and the vae is the Wan VAE, same as the rest of this pack.

The inputs that matter

For a first run, set width 480 / height 832 (the safe golden-bucket default this pack favors), length 81 - that's the native context, roughly 5 seconds at 16fps, and the point where Wan quality starts bending. vae_tile_size defaults to 64 for memory-constrained decoding; bump it on a big card. The one thing beginners get wrong: length isn't free. Going to 121 frames works but drifts, and the latent math (((length-1)//4)+1) is why Wan wants lengths that sit nicely on the 4× temporal compression - 81, 85, 89 are the comfortable values.

Install

ComfyUI Manager → search XB_ToolBox, or:

cd ComfyUI/custom_nodes
git clone https://github.com/wjluoxiao/XB_ToolBox.git

Restart and it's under XB_ToolBox/Wan. No model downloads come with the pack - your Wan checkpoint, VAE, CLIP and T5 are your responsibility, and the README's "no extra pip dependencies" claim is shorthand (the shipped pyproject.toml does list opencv-python and easyocr).

Where it fits

This is the building block, not the showpiece. On its own it gives you a single 81-frame clip. If you want more than that, the same pack's XB_Wan_ParamBus + XB_Wan_InfiniteRelayNode chain these segments end-to-end by feeding each segment's last frame back in as the next start image - the classic last-frame-to-first-frame trick that got people to 20–30 second clips. Start here, graduate to the bus.

CategoryXB_ToolBox/Pipeline

Inputs (12)

NameTypeDefaultDescription
positiveCONDITIONING
negativeCONDITIONING
vaeVAE
widthINT48016–8192
heightINT83216–8192
lengthINT811–8192
batch_sizeINT11–8192
vae_tile_sizeINT6464–3840
clip_vision_outputoptCLIP_VISION_OUTPUT
start_imageoptIMAGE
scale_methodoptCOMBOlanczos5 options: lanczos, bilinear, bicubic, nearest-exact, area
crop_modeoptCOMBOcenter2 options: center, disabled

Outputs (3)

NameTypeDescription
positiveCONDITIONING
negativeCONDITIONING
latentLATENT