Nodes/ComfyUI/WanPhantomSubjectToVideo
ComfyUI Node Runs on cloud

WanPhantomSubjectToVideo

Wan's subject-to-video node, with the CFG trick that keeps identity

By Comfy-Org·Created 4 years ago·Updated about 22 hours ago· 129,495
WanPhantomSubjectToVideo
  • positive
  • negative
  • vae
  • images
  • positive
  • negative_text
  • negative_img_text
  • latent
width832
height480
length81
batch_size1

WanPhantomSubjectToVideo is the subject-to-video conditioning node for Wan: you hand it one or more images of a subject - a character, an object, a product - and it builds the conditioning that makes a Wan video of that exact subject moving. It's the Wan-family answer to "reference-to-video" that doesn't need a separate identity adapter: the subject images get encoded into the model's conditioning as time-dimension context, and the text prompt supplies the motion and the scene.

The interesting bit, and the reason this node has three conditioning outputs where most have two, is how it keeps the subject's identity intact during CFG. That's the "phantom subject" part, and it's worth understanding before you wire it up.

How it works

The node creates the empty latent for your video (dimensions from width / height / length / batch_size), and if you connect images, it upscales them to the canvas and VAE-encodes them into a time_dim_concat - a reference stream the Wan model attends to over time. Then it builds two negative conditioning streams:

  • negative_text - the normal negative, but still carrying the subject latents, so it cancels the text part of the positive without killing the subject.
  • negative_img_text - the negative with a zeroed reference latent, which lets CFG subtract only what the image adds.

Net effect: the subject survives the CFG subtraction while the prompt's negative instructions still work. If that's over your head, the takeaway is simpler: wire the outputs to the sampler in the right order and the subject stays put.

Inputs and outputs

  • positive / negative - text conditioning from the Wan text encoder.
  • vae, width / height / length / batch_size - canvas and encoding.
  • images (optional) - the subject reference(s); first length frames are used.
  • Outputs: positive, negative_text, negative_img_text, and the ready-made latent.

Where it fits

Ships with ComfyUI core, part of the Wan family of conditioning nodes (2026-era, alongside the Wan i2v and camera nodes). The Wan model checkpoint goes in your ComfyUI models folder. Reach for it when the generic Wan i2v is too loose about the subject - Phantom Subject is the variant trained to hold identity across the clip.

Common issues

The trap is treating the three outputs casually. Drop negative_img_text or wire it into the wrong input and identity drifts or the whole image gets noisy - the three-way split is load-bearing. Also, if you're generating a long clip, the reference images are only informative if they actually match the subject in the scene; lighting and angle gaps between reference and scene show up as instability. And no images connected? The node still outputs a valid latent for text-driven generation - just without the subject lock.

Categorymodel/conditioning/wan/phantom subject

Inputs (8)

NameTypeDefaultDescription
positiveCONDITIONING
negativeCONDITIONING
vaeVAE
widthINT83216–16384
heightINT48016–16384
lengthINT811–16384
batch_sizeINT11–4096
imagesoptIMAGE

Outputs (4)

NameTypeDescription
positiveCONDITIONING
negative_textCONDITIONING
negative_img_textCONDITIONING
latentLATENT