WanAnimate To Video (自定义)
The one node that glues a whole WanAnimate generation together
- positive
- negative
- vae
- clip_vision_output
- reference_image
- face_video
- pose_video
- continue_motion
- background_video
- character_mask
- prev_latent
- positive
- negative
- latent
- trim_latent
- trim_image
- video_frame_offset
- concat_latent
- latent_yaw_angles
WanAnimate is Alibaba's open motion-transfer model: you hand it a reference image of a character plus a pose/face driving video, and it re-renders the character performing that motion. The fiddly part has always been the preprocessing - the reference image has to be tiled 1+4n into latent frames, the pose video has to become a pose-conditioning latent, the face video gets its own channel, the character mask, the tail frames for continuation... on a stock workflow that's a half-dozen nodes wired by hand, and one wrong shape silently wrecks the output.
WanAnimateToVideoCustom collapses all of that into one node. You feed it the raw ingredients - reference image, pose video, face video, background, mask - and it encodes, arranges, and concatenates everything into the positive/negative/latent triple that goes straight into a KSampler. It's the node that makes the pack's "WanAnimate_ref_pics_loop+context" workflow readable at all.
The inputs that matter
You don't need to touch most of these to get a first result. Start with:
- positive / negative - your CLIP-conditioned prompts (required).
- vae - the Wan VAE (required).
- width / height (default 832×480, multiples of 16) and length (default 77, multiple of 4) - output geometry. 77 pixel frames is the classic WanAnimate chunk.
- reference_image - the character reference batch. Feed it the
selected_imagesoutput from the pack's Reference Image Selector. The node handles the 1+4n tiling internally (first image ×1, each extra ×4). - pose_video / face_video - the driving inputs. Both optional, both encoded into the right latent slots.
- ref_mode - 原模式 (original) is the default 1+4n batch encode; 兼容模式 (compatible) encodes each reference frame independently, which is what EverAnimate-trained LoRAs expect.
- mode - the continuation strategy for long videos:
vanillais stock behavior,legacydoes a tail-frame fade mask,fixdoes black-frame detection with a transition zone (transition_width). - continue_motion or prev_latent - how the next chunk starts from the last one. Feed the previous chunk's tail frames as
continue_motion, or (better) feed its fullconcat_latentintoprev_latent, which ignorescontinue_motionand replaces the neutral-gray frames directly. - video_frame_offset - the chain counter; wire the previous chunk's
video_frame_offsetoutput into the next chunk's input.
Outputs
positive, negative, latent go to the KSampler. trim_latent and trim_image tell you how many leading frames are reference anchors you should cut when decoding. concat_latent is the fully-assembled latent (feed it to a VAE decode for output), and video_frame_offset plus latent_yaw_angles chain into the next chunk.
Reality check
This is a third-party wrapper around WanAnimate, and Wan 2.2 is the last open Wan - the interesting ecosystem now lives in derivatives like SCAIL-2, which this same pack also supports. The honest take: if your motion-transfer target is a different character or you need proportions preserved, SCAIL-2 is the better base; WanAnimate is where you land for a recognizable existing character and where the pack's reference-selector/yaw machinery really shines. It also expects a hefty supporting stack - the README's workflows pull in sdpose-ood, ComfyUI-WanAnimatePreprocess, VideoHelperSuite and friends, so installing this node alone won't run the full graph.
Install
Part of ComfyUI-CustomNodeKit. ComfyUI Manager → search "ComfyUI-CustomNodeKit", or:
cd ComfyUI/custom_nodes
git clone https://github.com/user2318/ComfyUI-CustomNodeKit.git
cd ComfyUI-CustomNodeKit
pip install -r requirements.txt
Restart ComfyUI. No model files ship with the pack - you need the WanAnimate model weights plus your pose/face detection stack separately.
Inputs (30)
| Name | Type | Default | Description |
|---|---|---|---|
| positive | CONDITIONING | 正向提示词 conditioning。Positive prompt conditioning. | |
| negative | CONDITIONING | 负向提示词 conditioning。Negative prompt conditioning. | |
| vae | VAE | Wan 模型的 VAE,用于编码参考图和窗口帧。VAE for the Wan model, used to encode reference images and window frames. | |
| width | INT | 83216–16384 | 生成视频的宽度(像素),必须是 16 的倍数。Width of the generated video (pixels), must be a multiple of 16. |
| height | INT | 48016–16384 | 生成视频的高度(像素),必须是 16 的倍数。Height of the generated video (pixels), must be a multiple of 16. |
| length | INT | 771–16384 | 生成视频的帧数(像素帧),必须是 4 的倍数。Number of frames for the generated video (pixel frames), must be a multiple of 4. |
| batch_size | INT | 11–4096 | 批量大小,通常保持为 1。Batch size, usually keep at 1. |
| continue_motion_max_frames | INT | 51–16384 | 从上一块携带的最大帧数(RGB 图像),用于块间接续。Maximum frames carried from the previous chunk (RGB images), used for inter-chunk continuity. |
| video_frame_offset | INT | 00–16384 | 当前 chunk 的帧偏移量,从上一块的 video_frame_offset 输出接入。Frame offset of the current chunk, connected from the previous chunk's video_frame_offset output. |
| transition_width | INT | 00–128 | fix 模式下黑帧区域的过渡区宽度,0=禁用过渡。Transition zone width for black frame areas in fix mode, 0=disable transition. |
| mode | COMBO | vanilla | 掩码模式:vanilla=官方行为(fix/legacy不动),fix=黑帧检测+过渡,legacy=尾帧渐变。Mask mode: vanilla=official behavior, fix=black frame detection+transition, legacy=tail frame fade. |
| tail_frame_count | INT | 00–1000 | legacy 模式下尾帧处理帧数,0=禁用。Number of tail frames to process in legacy mode, 0=disabled. |
| tail_start_strength | FLOAT | 0.000–1 | legacy 模式尾帧起始强度。Tail frame start strength in legacy mode. |
| tail_end_strength | FLOAT | 0.000–1 | legacy 模式尾帧结束强度。Tail frame end strength in legacy mode. |
| ref_mode | COMBO | 原模式 | 原模式=内部1+4n排列后批量编码(接selected_images);兼容模式=逐帧独立编码(接selected_images,兼容EverAnimate LoRA)。Original mode=internal 1+4n arrangement then batch encode; Compatible mode=per-frame independent encode (compatible with EverAnimate LoRA). |
| clip_vision_outputopt | CLIP_VISION_OUTPUT | CLIP Vision 输出,用于参考图语义理解。CLIP Vision output for reference image semantic understanding. | |
| reference_imageopt | IMAGE | 参考图输入。接参考图选择器的 selected_images(排序后的原始图片,节点内部自动处理1+4n或逐帧编码)。Reference image input. Connect to selected_images from ReferenceImageSelector (node handles 1+4n or per-frame encoding internally). | |
| face_videoopt | IMAGE | 面部视频帧序列,用于面部引导。Face video frame sequence for face guidance. | |
| pose_videoopt | IMAGE | 姿态视频帧序列,用于姿态引导。Pose video frame sequence for pose guidance. | |
| continue_motionopt | IMAGE | 上一块的末尾 RGB 帧,用于块间运动接续。Last RGB frames of the previous chunk for inter-chunk motion continuity. | |
| background_videoopt | IMAGE | 背景视频帧序列,用于替换/增强背景。Background video frame sequence for background replacement/enhancement. | |
| character_maskopt | MASK | 角色遮罩,用于精确控制角色区域的保护。Character mask for precise control of character area protection. | |
| yaw_anglesopt | FLOAT | 0.00-180–180 | 偏航角序列(像素帧级别)。Yaw angle sequence (pixel frame level). |
| face_strengthopt | FLOAT | 1.000–1 | 面部引导强度,0=关闭面部引导。Face guidance strength, 0=disable face guidance. |
| pose_strengthopt | FLOAT | 1.000–2 | 姿态引导强度,0=关闭姿态引导,>1=增强姿态影响。Pose guidance strength, 0=disable pose guidance, >1=enhance pose influence. |
| mid_frameopt | INT | -1-1–1000 | legacy 模式中间帧锚点位置,-1=不使用。Mid-frame anchor position in legacy mode, -1=not used. |
| mid_strengthopt | FLOAT | 0.500–1 | legacy 模式中间帧锚点强度。Mid-frame anchor strength in legacy mode. |
| neutral_mix_minopt | FLOAT | 0.000–1 | legacy 模式掩码=0时的中性灰混合比例。Neutral gray mix ratio when mask=0 in legacy mode. |
| neutral_mix_maxopt | FLOAT | 1.000–1 | legacy 模式掩码=1时的中性灰混合比例。Neutral gray mix ratio when mask=1 in legacy mode. |
| prev_latentopt | LATENT | 前一段输出的完整 latent(concat_latent),接入后忽略 continue_motion,直接用前一段潜变量替换中性灰帧编码后的 latent。Complete latent output from previous chunk, when connected ignores continue_motion and uses previous latent to replace neutral gray frame encoded latent. |
Outputs (8)
| Name | Type | Description |
|---|---|---|
| positive | CONDITIONING | — |
| negative | CONDITIONING | — |
| latent | LATENT | — |
| trim_latent | INT | — |
| trim_image | INT | — |
| video_frame_offset | INT | — |
| concat_latent | LATENT | — |
| latent_yaw_angles | FLOAT | — |