Nodes/ComfyUI-WanVideoWrapper/WanVideo Phantom Embeds
ComfyUI Node Runs on cloud

WanVideo Phantom Embeds

Drop specific subjects into a Wan video

By kijai·Created about a year ago·Updated 2 months ago· 6,650
WanVideo Phantom Embeds
  • phantom_latent_1
  • phantom_latent_2
  • phantom_latent_3
  • phantom_latent_4
  • vace_embeds
  • image_embeds
num_frames81
phantom_cfg_scale5.00
phantom_start_percent0.00
phantom_end_percent1.00

Regular Wan image-to-video takes one image and uses it as the first frame. Phantom is different: you hand it reference images of subjects - a person, an outfit, an object - and it generates a video that keeps those subjects consistent, without them having to be the opening frame. This node is how you feed those references into a WanVideoWrapper graph. It's the plumbing behind "Phantom: Subject-Consistent Video Generation," a Wan-based model (1.3B and 14B) that the community picked up specifically for things like transferring a piece of clothing onto a character or building a scene out of multiple reference images.

The clearest way to think about it: I2V anchors the scene, Phantom anchors the stuff in the scene. If you want "this exact jacket, worn by this exact person, doing something new," Phantom is the mechanism.

How it works

You VAE-encode your reference images into latents (with WanVideoEncode) and feed them in as phantom_latent slots - up to four. Phantom conditions the generation on those subject latents throughout the denoise, so the identity/appearance of each reference persists across the clip instead of being used once and forgotten. The node bundles all of that into an image-embeds object the sampler consumes.

The inputs and outputs that matter

  • phantom_latent_1 (required) plus phantom_latent_2 / _3 / _4 (optional) - your subject references, as latents. One is enough; add more to pin multiple subjects (say a character and a separate garment). These come from encoding reference images.
  • phantom_cfg_scale (default 5) - how hard the model is pushed toward the reference subjects. Turn it up if the subjects aren't holding; down if they're dominating and the motion/prompt is suffering.
  • num_frames (default 81) - the clip length, in Wan's native 81-frame territory. Keep it on the 4n+1 grid (81, 77, etc.) that the Wan VAE likes.
  • phantom_start_percent / phantom_end_percent (0 / 1) - the slice of the denoise where Phantom conditioning is active. Pulling the end back can loosen the grip late in the schedule if the subjects feel over-baked.

Optional vace_embeds lets you combine Phantom with a VACE control setup. The single output, image_embeds (WANVIDIMAGE_EMBEDS), wires into the WanVideo sampler.

How to install it

It ships in the WanVideoWrapper. ComfyUI Manager: search ComfyUI-WanVideoWrapper, install, restart. Manual:

cd ComfyUI/custom_nodes
git clone https://github.com/kijai/ComfyUI-WanVideoWrapper
pip install -r ComfyUI-WanVideoWrapper/requirements.txt

then restart. Beyond the base Wan weights you'll need the Phantom model itself downloaded into your models folder - it's a separate checkpoint, not part of base Wan. Historically some of the Phantom wiring landed on the wrapper's dev branch first, so if the node is missing after an update, git switch dev inside the pack directory is worth a try.

Common issues & troubleshooting

Subjects don't hold. Raise phantom_cfg_scale, and make sure your reference images are clean, well-cropped shots of the subject - Phantom is only as good as what you encode into those latents.

Everything looks stiff or the prompt is ignored. Too much subject pressure. Drop phantom_cfg_scale, or pull phantom_end_percent back so the model gets some free rein late in the denoise to actually animate.

Frame count acts weird. Wan's VAE compresses time ~4x, so it wants frame counts on the 4n+1 grid. Off-grid num_frames can come back a couple frames short or glitchy - stick to values like 81.

CategoryWanVideoWrapper

Inputs (9)

NameTypeDefaultDescription
num_framesINT811–10000Number of frames to encode
phantom_latent_1LATENTreference latents for the phantom model
phantom_cfg_scaleFLOAT5.000–10CFG scale for the extra phantom cond pass
phantom_start_percentFLOAT0.000–1Start percent of the phantom model
phantom_end_percentFLOAT1.000–1End percent of the phantom model
phantom_latent_2optLATENTreference latents for the phantom model
phantom_latent_3optLATENTreference latents for the phantom model
phantom_latent_4optLATENTreference latents for the phantom model
vace_embedsoptWANVIDIMAGE_EMBEDSVACE embeds

Outputs (1)

NameTypeDescription
image_embedsWANVIDIMAGE_EMBEDS