ComfyUI Extension
comfyui-wan-animate-2-loop-sampler
A ComfyUI extension with 1 custom node.
vjumpkung/comfyui-wan-animate-2-loop-sampler
Nodes1
On cloudLocal install
Categoryvideo/wan animate 2
Stars4
Updated13 days ago
Readme
ComfyUI Wan Animate 2 Loop Sampler
Wan Animate 2 Loop Sampler replaces the manually duplicated Motion Transfer
(Wan Animate 2) subgraphs in video_wan_animate2.json with one V3 ComfyUI
node.
The node automatically:
- splits the pose-video image batch into Wan-compatible segments;
- runs
WanAnimate2ToVideoand custom sampling for every segment; - carries the last generated frame into the next pass;
- advances the pose-video offset using ComfyUI's native Animate 2 behavior;
- trims the reference latent and the one-frame extension overlap; and
- concatenates and crops the result to the pose video's original frame count.
What stays outside the loop
Keep reusable setup nodes outside Wan Animate 2 Loop Sampler:
- Load the diffusion model, LoRA, CLIP, CLIP Vision, and VAE.
- Encode the positive, negative, and pose prompts.
- Encode the reference image and the first pose frame with CLIP Vision.
- Apply optional context windows,
WanAnimate2Cache, andModelSamplingSD3to the model. - Build the sampler and sigmas with
KSamplerSelectandBasicScheduler. - Extract the driving video's frames with
GetVideoComponentsand connect them topose_video.
The sampling model input should match the model that was connected to
SamplerCustom in the original workflow. The sigmas should match the output of
its BasicScheduler.
Loop boundary found in the workflow
The repeated section is:
WanAnimate2ToVideo
-> SamplerCustom
-> TrimVideoLatent
-> VAEDecode
-> remove the extension overlap
-> feed decoded frames + video_frame_offset into the next pass
Model loading, text/vision encoding, resizing, cache/model-sampling setup, and sampler/sigma selection do not need to be duplicated.
Requirements
- A current ComfyUI build containing
WanAnimate2ToVideo. - Wan Animate 2 model files and the same supporting nodes/models used by the source workflow.
- A ComfyUI version with the V3 custom-node API (
comfy_api.latest).
This package is V3-only: it registers with ComfyExtension and
comfy_entrypoint and does not expose legacy NODE_CLASS_MAPPINGS.