The Wan Animate 2.2 Character Replacement Workflow is designed to replace characters and scenes in video content using advanced AI models. This workflow leverages the power of the Wan 2.2 Animate model, which is specifically optimized for human subjects, ensuring that the character replacement is both stable and convincing. The process begins by utilizing the Nano Banana 2 model to generate a reference image from the first frame of the video. This image serves as the basis for replacing the character throughout the entire video sequence. The workflow employs several custom nodes, including ComfyUI-WanAnimatePreprocess and ComfyUI-segment-anything-2, to segment and process the video frames effectively.

Technically, the workflow uses a combination of nodes such as VHS_LoadVideo to load the video, and GeminiNanoBanana2 to apply the character replacement based on the reference image. The SaveVideo node is then used to output the final animated video. This workflow is particularly useful for creators looking to produce high-quality character animations in video content, offering a seamless integration of AI-driven techniques to enhance video production capabilities. By focusing on human subjects, it ensures that the facial and body features are rendered with high fidelity, making it ideal for projects that require realistic character animations.

API

Use this workflow from code

Every Comfy workflow is a JSON graph. The payload below is this workflow, exactly as ComfyUI runs it — fetch it from the URL, keep it in version control, or load it in ComfyUI and run it node by node.

GET https://comfy.org/workflows/download/840b6e4c3983.json
Fetching workflow JSON…

Run it from Python or TypeScript with the Comfy SDK. The same code targets Comfy Cloud or a ComfyUI you host yourself — only the base URL changes.

# Install (beta)
pip install comfy-sdk        # Python
npm i @comfyorg/sdk          # TypeScript

# Run "Wan Animate 2.2 Character Replacement Workflow" (Python)
from comfy_sdk import Comfy

client = Comfy(api_key="comfyui-...")

# This workflow, exported in API format (see note below)
wf = client.workflows.from_file("templates_purz_wan22_animate_auto_full_scene_api.json")

job = client.run(wf)
for output in job.get_outputs("349"):  # SaveImage
    output.to_file(output.name)

The SDK takes a workflow in API format: open this workflow in ComfyUI and use File → Export Workflow (API). API access requires a Comfy Cloud plan with an API key. SDK docs · Get an API key

FAQ

Frequently Asked Questions

View all workflows
Character
Cinematic
Image to Video
Lip Sync
Multiple Angles
Portrait
Style Reference
Style Transfer
Text to Video
Video Generation
Video
Showing 30 of 30 templates