XB_WanCameraImageToVideo
Wan camera-control conditioning, with a start frame and tiled VAE encode
- positive
- negative
- vae
- clip_vision_output
- start_image
- camera_conditions
- positive
- negative
- latent
Wan 2.2's camera-control flavor lets you move the camera through a scene - dolly, pan, orbit - via a camera trajectory embedding, instead of hoping the model invents the move. XB_WanCameraImageToVideo is the pack's conditioning node for that: it builds the Wan latent, encodes your start image (with tiled VAE encoding so it doesn't OOM), injects the camera embedding, and bundles it all into the conditioning your sampler reads.
The mechanism is the standard Wan I2V construction with one extra input. The source allocates a 16-channel latent (Wan 2.1-style format - camera control rides on the 2.1 latent layout), encodes the start_image through encode_tiled and stuffs it into the head of the concat latent with a noise mask so the first frame is fixed, then attaches the camera conditions and any CLIP vision output to both positive and negative conditioning. The camera_conditions input takes a WAN_CAMERA_EMBEDDING type - that comes from a camera-control node elsewhere (ComfyUI's Wan camera embeddings are built by separate encoder nodes), so this node is the "apply it to the pipeline" half, not the "design the camera path" half.
Inputs and outputs
Required: positive / negative (CONDITIONING), vae, width (default 832), height (default 480), length (default 81), batch_size, and vae_tile_size (default 64).
Optional: clip_vision_output (identity signal from a CLIP vision encode), start_image (the anchor frame), camera_conditions (the WAN_CAMERA_EMBEDDING), and the usual scale_method / crop_mode for resizing inputs.
Outputs: positive, negative, and latent - the three-way bundle that goes into a Wan-compatible sampler.
The honest takes
This is a specialized node for a specific workflow - plain image-to-video is XB_Wan22ImageToVideoLatent, reference+control is XB_Wan22FunControlToVideo, and this one is only worth reaching for when you have an actual camera trajectory to apply. The trap for beginners is wiring it up without the camera embedding: leave camera_conditions empty and you've just built a slightly more convoluted I2V node, because the interesting part never runs. Also note it hardcodes the Wan 2.1 (16-channel) latent format, so it expects a Wan model that consumes that layout - feed it to the pack's Wan sampler and you're on the right track. The vae_tile_size default of 64 is deliberately small because the concat latent already eats a lot of VRAM; raise it only if you're comfortably below the ceiling.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/WJLUOXIAO/XB_ToolBox.git
then restart, or install via ComfyUI Manager ("XB_ToolBox"). No extra dependencies beyond the pack's usual set; you'll need a camera-control encoder node from elsewhere in ComfyUI to produce the WAN_CAMERA_EMBEDDING.
Inputs (13)
| 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 | — |
| clip_vision_outputopt | CLIP_VISION_OUTPUT | — | |
| start_imageopt | IMAGE | — | |
| camera_conditionsopt | WAN_CAMERA_EMBEDDING | — | |
| scale_methodopt | COMBO | lanczos | 5 options: lanczos, bilinear, bicubic, nearest-exact, area |
| crop_modeopt | COMBO | center | 2 options: center, disabled |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| positive | CONDITIONING | — |
| negative | CONDITIONING | — |
| latent | LATENT | — |