Multi-reference image injection and seamless video connection for ComfyUI's WanAnimate pipeline.
ComfyUI-WanAnimatePlus adds four major feature groups to the WanVideo workflow:
- prefix_frames: allows passing 1–5 additional reference images for multi-reference guided generation
- transition_video: allows passing the last 21 frames of the previous video segment for seamless video connection
When used together, canvas layout and frame offsets are automatically coordinated without conflicts.
Supports Bernini models. Allows passing source video, reference video, or reference images as generation conditions. Supports v2v, rv2v, r2v, and t2v tasks.
Use cases:
- Multi-shot video sequence generation
- Video continuation / extension
- Motion transfer with multi-reference control
- Video editing with source video + reference images
- Reference-to-video generation
Adds a wrapper-native WanAnimatePlus SCAIL_2 Embeds node for SCAIL-2 models. It prepares reference image, driving pose, colored pose mask, reference mask, optional prefix/transition hard-freeze latents, and prefix-aligned colored masks for the WanAnimatePlus sampler.
video_001.mp4
video_002.mp4
Allows 1–5 additional reference images. Internally expands the canvas pixel space and encodes reference images across the front frames, with automatic frame offset coordination for control signals (pose / face).
- Supports 1–5 reference images (truncated if exceeding 5)
- Auto-resizes reference images to target resolution
- Automatically aligns frame offsets for pose / face / bg / mask signals
Allows passing the last 21 frames of the previous video segment. Writes these pixel frames directly into the front of the generation canvas, with sampled+reversed padding for control signal offsets.
- Automatically coordinates with prefix when both are used
Generates condition latents from source video, reference video, and/or reference images via VAE encoding. Supports v2v, rv2v, r2v, and t2v — task is auto-detected from connected inputs.
- Reference images kept at native aspect ratio
- Compatible with context windows
Provides SCAIL-2 ref / pose / mask conditioning through WanAnimatePlus SCAIL_2 Embeds.
- Encodes
ref_image,pose_images,pose_image_mask,prefix_mask, andreference_image_mask - Aligns SCAIL-2 inputs to 32-pixel multiples before VAE encoding
- Supports animation and replacement modes
- Supports optional
prefix_framesandtransition_videohard-freeze conditioning - Uses a single SCAIL-2 prefix layout: 37 front pixel frames when
prefix_framesis connected, with transition frames placed at frames 17-36 whentransition_videois also connected; transition-only uses 21 front pixel frames - Writes
prefix_maskinto the prefix pixel-mask frames before SCAIL-2 mask latent encoding - Supports context-window sampling; non-first windows can see prepended prefix/transition context without fusing those prepended predictions
Place this repository into ComfyUI's custom_nodes directory:
cd ComfyUI/custom_nodes
git clone https://github.com/wuwukaka/ComfyUI-WanAnimatePlus.gitRestart ComfyUI after installation.
Important: To use
prefix_frames,transition_video,Bernini, orSCAIL_2 Embeds, you must replace the full workflow chain with WanAnimatePlus nodes. Mixing WanAnimatePlus nodes with original WanVideoWrapper nodes in the same workflow will result in degraded output.
- Start ComfyUI and confirm the WanAnimatePlus nodes appear under the
WanAnimatePluscategory - Replace the entire workflow chain with WanAnimatePlus counterparts:
ModelLoader,VAELoader,ContextOptions,AnimateEmbeds,Sampler,Decode, and supporting nodes - Do not mix original WanVideoWrapper nodes in the same workflow
- Connect
prefix_framesand/ortransition_videoinputs as needed - Example workflows are available in the
example_workflows/directory
WanAnimatePlus exposes a complete workflow chain to avoid cross-package object mixing with the original WanVideoWrapper nodes.
Core nodes:
WanAnimatePlus ModelLoaderWanAnimatePlus VAELoaderWanAnimatePlus TextEncodeCachedWanAnimatePlus ClipVisionEncodeWanAnimatePlus ContextOptionsWanAnimatePlus AnimateEmbedsWanAnimatePlus Sampler/WanAnimatePlus Samplerv2WanAnimatePlus Scheduler/WanAnimatePlus Schedulerv2WanAnimatePlus Decode/WanAnimatePlus EncodeWanAnimatePlus LoraSelect/WanAnimatePlus LoraSelectMulti/WanAnimatePlus SetLoRAsWanAnimatePlus BlockSwap/WanAnimatePlus SetBlockSwapWanAnimatePlus TorchCompileSettingsWanAnimatePlus SamplerExtraArgsWanAnimatePlus Uni3C ControlnetLoader/WanAnimatePlus Uni3C EmbedsWanAnimatePlus BerniniWanAnimatePlus SCAIL_2 Embeds
Core node, replaces the original WanVideoAnimateEmbeds.
New inputs:
| Input | Description |
|---|---|
prefix_frames |
1–5 additional reference images for multi-reference guided generation |
transition_video |
Last 21 frames of the previous video segment for seamless video connection |
Other inputs are identical to the original WanVideoAnimateEmbeds: vae, width, height, num_frames, ref_images, pose_images, face_images, bg_images, mask, start_ref_image, clip_embeds, etc.
Generates condition latents from source video, reference video, and/or reference images for Bernini models.
Inputs:
| Input | Description |
|---|---|
vae |
VAE model for encoding |
width / height / num_frames |
Output dimensions |
source_video |
Source video to edit/restyle (v2v/rv2v). Resized to width/height |
reference_video |
Moving content to composite (video insertion), native aspect |
reference_images |
Reference image(s) as in-context tokens (r2v/rv2v). Native aspect |
ref_max_size |
Max long-edge size for reference media (default 848) |
force_offload |
Offload VAE after encoding to save VRAM |
tiled_vae |
Use tiled VAE encoding for memory savings |
The task (v2v, rv2v, r2v, t2v) is automatically inferred from which inputs are connected.
Creates SCAIL-2 conditioning for WanAnimatePlus sampling. Use this node with SCAIL-2 checkpoints that include the pose and mask streams.
Inputs:
| Input | Description |
|---|---|
vae |
VAE model for encoding |
width / height / num_frames |
Target dimensions; width and height are aligned to multiples of 32 |
ref_image |
Reference image for SCAIL-2 conditioning |
pose_images |
Driving pose video/images, encoded at half resolution |
pose_image_mask |
Colored per-identity pose mask sequence |
prefix_mask |
Optional colored mask images matching prefix_frames; expanded as 1+4+4... and written into the prefix mask frames before mask latent encoding |
reference_image_mask |
Colored reference mask image |
replacement_mode |
Enables SCAIL-2 replacement-mode RoPE and reference-mask compositing |
prefix_frames |
Optional frames to hard-freeze at the front of the latent sequence |
transition_video |
Optional transition frames to hard-freeze at the front of the latent sequence |
clip_embeds |
Optional CLIP vision features from WanAnimatePlus ClipVisionEncode |
force_offload / tiled_vae |
Memory controls for VAE encoding |
For short generations, context windows are optional. For long generations or low VRAM, context windows are recommended. In context-window mode, the sampler prepends protected prefix/transition latents for model context and removes those prepended predictions before overlap fusion.
For SCAIL-2, prefix_frames always expands the front canvas by 37 pixel frames. If only transition_video is connected, the front canvas expands by 21 pixel frames. The separate 45-frame outfit layout belongs to the regular AnimateEmbeds node and is not used by WanAnimatePlus SCAIL_2 Embeds.
ComfyUI-WanAnimatePlus/
├─ wanvideo/ # WanVideo core model code
├─ nodes.py # Core WanAnimatePlus embeds / encode / decode nodes
├─ nodes_sampler.py # Core WanAnimatePlus sampler / scheduler nodes
├─ nodes_model_loading.py # Core WanAnimatePlus model / VAE / LoRA / block swap nodes
├─ context_windows/ # Context-window scheduling
├─ cache_methods/ # Cache acceleration
├─ utils.py # Shared utilities
├─ docs/
│ └─ images/ # Documentation images
├─ example_workflows/ # Example workflows
├─ __init__.py # Node registration entry point
├─ pyproject.toml
├─ requirements.txt
└─ LICENSE
- Verify the repo path is
ComfyUI/custom_nodes/ComfyUI-WanAnimatePlus - Ensure the original
ComfyUI-WanVideoWrapperis also installed - Restart ComfyUI and search for
WanAnimatePlusin the node list
No. All node names use the WanAnimatePlus prefix, completely avoiding conflicts with the original WanVideo prefixed nodes. Both can be installed simultaneously.
3 is recommended. Up to 5 are accepted (excess is truncated). The node works with fewer than 3 as well, but the coverage range will be smaller.
Input is automatically cropped to 21 frames (padded with the first frame if insufficient).
Modified from kijai/ComfyUI-WanVideoWrapper. Deep respect to the original author for their tremendous contributions to the WanVideo ecosystem.
- Bilibili: @wuwukasi
- Email: wuwukawayi@gmail.com
If you find this project helpful, consider supporting me! Your support is what keeps this project going and motivates me to continue improving it.
Every contribution, no matter how small, means a lot and helps me dedicate more time to development and new features. Thank you!
This project is an independently maintained fork / derivative project based on kijai/ComfyUI-WanVideoWrapper and is released under the Apache License, Version 2.0. Thanks again to kijai and the original contributors for their work.
Modified portions and newly added code are Copyright (c) 2026 wuwukasi/wuwukaka. See NOTICE for attribution and detailed modification notice requirements. Downstream projects that use or modify the WanAnimatePlus additions should preserve the copyright/modification notices and include a detailed notice in their README, NOTICE file, or equivalent attribution document. That notice should identify the wuwukasi/wuwukaka-derived modules, files, or feature areas and describe any downstream modifications made to those portions.
The wuwukasi/wuwukaka additions include WanAnimatePlus-specific node registration/renaming and integration code, prefix/transition video conditioning, Bernini in-context conditioning, SCAIL-2 embeds support including prefix-mask handling and sampler freeze/prepend integration, EverAnimate embeds support, sampler/context-window changes, cache/inference safeguards, and related custom-op handling.


