Nodes/ComfyUI_agilly1989_motorway/WanImageToVideo_motorway_edition
ComfyUI Node

WanImageToVideo_motorway_edition

Wan's whole image-to-video setup, folded into one Motorway node

By agilly1989·Created 2 years ago·Updated about a year ago· 7
WanImageToVideo_motorway_edition
  • MOTORWAY 🚌💨
  • MOTORWAY 🚌💨
INPUT_positive_keypositive
INPUT_negative_keynegative
INPUT_vae_keyvae
INPUT_clip_vision_output_keyclip_vision_output
INPUT_start_image_keystart_image
width1280
height720
length121
batch_size1
OUTPUT_positive_keypositive
OUTPUT_negative_keynegative
OUTPUT_latent_keylatent

Wan image-to-video isn't one node in ComfyUI, it's a whole setup: encode the start image, build the frame-count latent, attach a mask so the first frame stays put, and fold all of it into the conditioning. The stock WanImageToVideo node does exactly that in one place - and it's already the most complex node in a Wan graph. This _motorway_edition clone wraps it for the agilly1989 Motorway pipe, so its five data inputs come from the shared dict by key and its three outputs get stored back by key. If any node benefits from not dragging six wires around, it's this one.

Motorway, briefly: start with MotorwayStart, then each _motorway_edition node trades data wires for key strings, reading and writing a shared dict that flows down one MOTORWAY connection. The clone is generated from ComfyUI's own registry, so the underlying Wan math is stock.

What it does. It takes your positive and negative conditioning plus the VAE, and builds the I2V latent: a [batch, 16, frames, height/8, width/8] tensor sized by width, height, length (frame count), and batch_size. If a start_image is supplied, it's upscaled to your resolution, VAE-encoded, and attached to both conditionings as a concat_latent_image with a mask that locks the first frames in place. A clip_vision_output (for the reference-image path) gets attached to the conditionings too. It returns positive, negative, and the latent - ready for the sampler.

The inputs that matter. MOTORWAY is required. Five key fields point into the dict: INPUT_positive_key, INPUT_negative_key (both default positive/negative), INPUT_vae_key (vae), INPUT_clip_vision_output_key (clip_vision_output), and INPUT_start_image_key (start_image). The defaults here are width 1280, height 720, length 121, batch_size 1 - sensible Wan 2.1 I2V territory, though your model variant may want other numbers. Three output keys store the results: OUTPUT_positive_key, OUTPUT_negative_key, and OUTPUT_latent_key. Output: the MOTORWAY port only.

Common issues. Resolution and frame count are the classic Wan pain points: 720p-ish with a multiple-of-16 width, and length in the 81–121 range, or you'll blow VRAM for no quality gain - the KB's Wan notes are a good sanity check. The INPUT_clip_vision_output_key default is lowercase clip_vision_output, so if your CLIP vision lives in the dict under CLIP_VISION (the unCLIP loader's default), retype it. And the usual Motorway traps: exact-match keys, 'MotorwayClass' object has no attribute 'hash_' meaning "key not found," and the standing caveat that the pack's current main branch has the clone registration commented out in __init__.py.

Install via ComfyUI Manager (search "ComfyUI_agilly1989_motorway") or git clone https://github.com/agilly1989/ComfyUI_agilly1989_motorway into custom_nodes, restart. The Wan models themselves still go in their usual folders - the pack downloads nothing. Solo-dev beta pack, but for a big video graph where every wire is precious, this is the node in the set that most justifies the Motorway's existence.

Categoryagilly1989 Nodes/Motorway-ed/conditioning/video_models

Inputs (13)

NameTypeDefaultDescription
MOTORWAY 🚌💨MOTORWAY 🚌💨
INPUT_positive_keySTRINGpositive
INPUT_negative_keySTRINGnegative
INPUT_vae_keySTRINGvae
INPUT_clip_vision_output_keySTRINGclip_vision_output
INPUT_start_image_keySTRINGstart_image
widthINT128016–16384
heightINT72016–16384
lengthINT1211–16384
batch_sizeINT11–4096
OUTPUT_positive_keySTRINGpositive
OUTPUT_negative_keySTRINGnegative
OUTPUT_latent_keySTRINGlatent

Outputs (1)

NameTypeDescription
MOTORWAY 🚌💨MOTORWAY 🚌💨