Voltar
Wan2.2 Animate, Character Animation and Replacement

This ComfyUI workflow demonstrates a unified approach to character animation and replacement using the Wan 2.2 Animate video diffusion model. It extracts motion from an input video, segments the target subject, and synthesizes a new character (or restyles the original) that follows the same motion. Core components include UNETLoader loading the Wan2_2-Animate-14B_fp8_e4m3fn_scaled_KJ.safetensors checkpoint, VAELoader for decoding frames, CLIPLoader and CLIPTextEncode for positive/negative prompts, and SaveVideo for final output. Motion cues are produced with comfyui_controlnet_aux’s DWPreprocessor (human pose/whole-body keypoints), while subject isolation comes from ComfyUI-segment-anything-2 via DownloadAndLoadSAM2Model and Sam2Segmentation. If you want to lock identity or style from an image, CLIPVisionLoader + CLIPVisionEncode provide additional reference conditioning, and LoraLoaderModelOnly lets you inject a character LoRA.

Technically, the workflow wires LoadVideo through GetVideoComponents, then preprocesses the background and subject: Sam2Segmentation builds a character mask (guided by user “green points”), and DWPreprocessor extracts pose from each frame. PixelPerfectResolution ensures the working size fits your GPU and stays compliant with the WanAnimateToVideo constraint (width and height must be multiples of 16). ModelSamplingSD3 controls your sampler and schedule for the Wan UNet, and comfyui-kjnodes utilities help with the optimized FP8-scaled model. The result is a flexible pipeline for motion-consistent swaps or restyling—use a single reference image, a LoRA, and prompts to steer identity and appearance while preserving the original motion.