XB_WanPhantomSubjectToVideo
Multi-reference conditioning with Phantom Subject
- positive
- negative
- vae
- images
- positive
- negative_text
- negative_img_text
- latent
The thing that kills single-frame I2V is identity: you feed Wan one image and by frame 40 the character has subtly become someone else. XB_WanPhantomSubjectToVideo is the pack's node for the "Phantom Subject" style of Wan conditioning, and its answer is to feed the model several reference frames of your subject as time-dimension concatenated latents. Give it a few images and the model has enough visual anchor points that the subject stays on-model through the whole clip.
The display name is the bare class name - no fancy label, no Chinese flair. This is one of the pack's quieter, more technical nodes, and it's aimed at people doing character-consistency work rather than first-time video makers.
How it works
The core trick is time_dim_concat. The node VAE-encodes each image you pass into images, concatenates their latents along the temporal dimension, and writes the result into the conditioning as time_dim_concat. The model then treats those reference latents as a temporal prefix - context it can lean on throughout generation instead of a single pinned frame.
Where it gets interesting is the three-way split of the negative side:
positivegets the realtime_dim_concat- the subject it should preserve.negative_textgets the same real concat, which is the conditioning you'd feed a sampler that should still see the subject but be free of the text-negative's influence.negative_img_textgets the concat zeroed out - a "no subject" negative, used when you want the model to wander rather than be anchored.
So the node outputs four sockets: positive, negative_text, negative_img_text, and latent. The exact wiring of which negative goes where depends on your sampler setup, but the split is deliberate: it gives you a clean way to run with or without the subject-anchor on the negative side.
Inputs that matter
width/height (832×480 default), length (81), batch_size, vae_tile_size. The star input is images - pass a batch of reference frames (the node encodes each one, capped at your length). More references means better consistency but more encode time and memory; 2–4 well-chosen frames (front, profile, action pose) is the sweet spot. scale_method/crop_mode handle fitting.
Install & honest caveats
Same as the whole pack: ComfyUI Manager → XB_ToolBox, or git clone https://github.com/wjluoxiao/XB_ToolBox.git into custom_nodes, restart. Declared deps opencv-python + easyocr, no weights bundled - bring the Phantom Subject Wan checkpoint and the standard VAE/CLIP/T5.
Two caveats. First, this node only builds conditioning - sampling, CFG and step setup are yours. Second, "Phantom Subject" is a niche model line, so community troubleshooting is thin; if you can't find the exact checkpoint name on your model hub, double-check which Wan 2.1/2.2 reference-to-video variant you're actually running, because this node's time_dim_concat contract is specific to that family.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| positive | CONDITIONING | — | |
| negative | CONDITIONING | — | |
| vae | VAE | — | |
| width | INT | 83216–8192 | — |
| height | INT | 48016–8192 | — |
| length | INT | 811–8192 | — |
| batch_size | INT | 11–4096 | — |
| vae_tile_size | INT | 6464–3840 | — |
| imagesopt | IMAGE | — | |
| scale_methodopt | COMBO | lanczos | 5 options: lanczos, bilinear, bicubic, nearest-exact, area |
| crop_modeopt | COMBO | center | 2 options: center, disabled |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| positive | CONDITIONING | — |
| negative_text | CONDITIONING | — |
| negative_img_text | CONDITIONING | — |
| latent | LATENT | — |