ComfyUITemplates.com
Discover free ready-made ComfyUI templates for AI workflows.
Wan Animate Pose transfer + Replace Simple and Fast workflow - Lighting Lora and Multi Lora Loader
ComfyUI Workflow: Wan Animate for Flexible Pose Transfer and Video Character Replacement Wan Animate is a versatile ComfyUI workflow enabling **pose transfer from videos to static images** and **direct character replacement within videos**. It offers a straightforward approach to animating images or re-imagining video content, integrating advanced models and robust control over video processing and mask generation. **What makes Wan Animate special** - **Dual Functionality**: Seamlessly animate a static image with a video's motion or replace a character in a video. - **Optimized Performance**: Utilizes the FP8 version of Animate for efficient processing, along with specific models like umt5_xxl_fp8, Clip ViT H, and Wan 2.1 Vae. - **Multi-Lora Support**: Integrate multiple LORAs using the Power Lora Loader, pre-configured with Lightx2v and Wan Relight for enhanced output. - **Precise Pose Extraction**: Employs two DWPose Estimators for detailed face, body, and hand pose estimation from video sources. - **Intuitive Masking (Replace Workflow)**: Define character masks on the first video frame using a points editor for targeted replacement, supported by Sam2 with configurable grow and blockify options. **How it works** - **Pose Transfer Mode**: Load an image and a reference video. The video's pose is extracted via DWPose, then applied to your image through the WanAnimateToVideo sampler and KSampler to generate an animated output. - **Character Replacement Mode**: Input a video and an image of the desired character. After initial pose processing, you define a mask on the first video frame to isolate the character to be replaced. Sam2 generates the mask, which guides the sampler to integrate your new character into the video. - **Video Pre-processing**: Videos are loaded, resized, and can have their FPS adjusted and end frames capped for precise control. - **Sampling and Output**: The WanAnimateToVideo sampler manages motion coherence, especially for longer videos, while KSampler handles frame generation. Output videos are combined at the source FPS and then interpolated to 32fps by default. **Quick start in ComfyUI** - **Load Image**: Connect your input image to the designated node. - **Load Video**: Upload your reference video, adjusting FPS or capping frames as needed. - **Prompts**: Enter your positive prompt. A negative prompt is generally not required if using Lightx2v. - **Pose Transfer**: Run the workflow to animate your image with the video's motion. - **Character Replace**: For replacement, initiate the workflow to process the video, then pause at the points editor. Define your mask (green for positive, red for negative areas) and resume to generate the masked video. **Recommended settings** - **Video Dimensions**: Resize inputs to a multiple of 16 for optimal Animate model performance. - **FPS**: Start with 16 fps for general videos. Experiment with 21 fps if finer motion is desired. - **Sampling**: "Continue motion" in WanAnimateToVideo can improve long video consistency. - **Replace Masking**: Use shift + left click for positive mask points (what to replace) and shift + right click for negative points (what to exclude). - **Sam2 Masking**: Adjust 'Growmask' to expand the mask coverage and 'Blockify Mask' size (default 16) for different mask styles. Blocking can be toggled off with ctrl + b. **Why use this workflow** - **Efficient Motion Creation**: Quickly animate still images with dynamic video poses. - **Targeted Character Swaps**: Replace specific characters in videos with controlled masking. - **Advanced Model Integration**: Leverages state-of-the-art Wan Animate models for high-quality results. - **Flexible Control**: Offers fine-tuning options for video processing, LORA application, and masking parameters. - **Streamlined Process**: Once pose estimates are cached, subsequent runs for the same video are significantly faster. **Use cases** - **Animation Prototyping**: Rapidly animate character concepts from still images. - **Video Content Customization**: Replace actors or characters in existing video footage. - **Creative Video Editing**: Experiment with different characters in a scene without reshooting. - **Digital Character Development**: Visualize how new characters move within various video contexts. **Pro tips** - **First Frame Masking**: For the replace workflow, precisely mask the first frame of your video. The pose estimators do not re-estimate if dimensions remain consistent, saving time on subsequent runs. - **Pose Cache**: The initial pose estimation takes the longest. Keeping video dimensions consistent allows the workflow to reuse prior estimations, speeding up iterations. - **Lora Management**: Utilize the Power Lora Loader to experiment with different lighting or style LORAs. - **FPS Experimentation**: While 16 fps is a good starting point, test 21 fps for videos with subtle or fast movements if needed. **FAQ** - **Do I need specific hardware**: The FP8 models and general ComfyUI requirements apply. Performance will depend on your GPU. - **Can I use custom LORAs**: Yes, the Power Lora Loader allows you to load multiple custom LORAs. - **How long does a video take to process**: Initial pose estimation can take 2-3 minutes for a new video. Subsequent masking and sampling runs for the same video are much faster. - **Is the replacement workflow always perfect**: The replacement workflow is noted as somewhat experimental and might require fine-tuning for optimal quality compared to the basic pose transfer.
This ComfyUI workflow uses Wan Animate to either transfer a pose from a video to an image or replace a video character with an image character. The pose transfer involves loading an image and video, processing the video with DWPose estimators, applying Lora models, and sampling to generate an interpolated output video. The character replacement workflow includes an additional masking step where users manually define an object to replace on the first frame, which Sam2 then uses to generate a mask for the sampler. The replacement feature is described as experimental.