Nodes/FeiHou WanAnimate2 Plus/FeiHou-WanAnimate2 Seam Color Match
ComfyUI Node

FeiHou-WanAnimate2 Seam Color Match

That little colour flash at every seam? This node fixes it.

By FX-FeiHou·Created 2 days ago·Updated 2 days ago· 1
FeiHou-WanAnimate2 Seam Color Match
  • images
  • images
frame_window_size81
strength0.60
analysis_frames12
transition_frames10

Chunk any long video generation and you'll meet the seam: a short colour or exposure pulse where one sampled segment hands off to the next. It's usually only a few frames and it's mostly in the low frequencies - a subtle brightness or tint step - but once you've seen it, you see it in every long render. FeiHouWanAnimate2SeamColorMatch is the cleanup pass for exactly that artifact, and it does it in pure pixel space.

It's the third node in the ComfyUI-FeiHou-WanAnimate2-Plus pack (v0.6.0, first public release September 2026 - no long community track record yet). It's also the smallest and safest one: it has no model input, never touches the VAE, never resamples. Wire it after VAEDecode at the very end of a segmented Wan Animate2 render:

VAEDecode → FeiHou-WanAnimate2 Seam Color Match → video output / save node

How it works

Each time the pack's FeiHou-WanAnimate2ToVideo node starts a new segment, that fresh sampling window lands with its own exposure footing - hence the pulse. This node finds those boundaries using your frame_window_size, then works on the assumption that scene corners are stable background. For every seam it does three things:

  1. Grabs the analysis_frames before the seam and measures each corner's per-frame mean and standard deviation - the "what this scene is supposed to look like" reference.
  2. Takes the transition_frames right after the seam and computes a bounded RGB gain/offset that maps them onto that reference.
  3. Blends the correction in at strength, frame by frame, without touching motion, geometry, or anything outside the transition zone.

The bounds matter: gain is clamped to roughly ±15% and the bias to ±0.08, so it can't blow out into a full colour grade. If there's no seam in the clip - a single segment - the node passes the frames straight through untouched.

The inputs

  • images - your decoded IMAGE tensor, straight from VAEDecode.
  • frame_window_size (81) - must match the frame_window_size on the FeiHou-WanAnimate2ToVideo node that produced the video, or the node will look for seams in the wrong places.
  • strength (0.6 default) - how hard later segments get pushed toward the reference. The author suggests starting at 1.0 and backing off if the source intentionally changes lighting at a seam - you don't want to flatten a deliberate light shift into background-colour compliance.
  • analysis_frames (12) - pre-seam frames used to build the reference. More = stabler estimate.
  • transition_frames (10) - how many frames after each seam get corrected, one by one.

The single output images goes on to your video preview or save node.

Install

No extra dependencies - it imports only torch and ComfyUI internals:

cd ComfyUI/custom_nodes
git clone https://github.com/FX-FeiHou/ComfyUI-FeiHou-WanAnimate2-Plus

Restart ComfyUI after cloning (or search "FeiHou WanAnimate2 Plus" in ComfyUI Manager). Because the pack rides ComfyUI's native Wan Animate2 support, keep ComfyUI itself reasonably current.

Where people get burned

  • Mismatched frame_window_size is the number-one silent failure. The node can't tell what segment size generated the video; it trusts you. Get it wrong and the "seams" it finds aren't your seams.
  • It fixes colour, not content. If your artifact is identity drift - the face subtly changing across segments - no amount of corner matching helps, because that's a sampling-consistency problem, not an exposure one.
  • This only makes sense downstream of the pack's segment-loop path. If your video came from WanAnimate2ContextOptions (a single continuous context-window render), there are no hard seams to correct - skip it.

It's a blunt but honest tool: cheap, zero VRAM risk, and it targets exactly the one artifact segment continuation leaves behind. Just feed it the right frame_window_size and lower strength the moment your source video plays with its own lighting.

CategoryFeiHou/WanAnimate2

Inputs (5)

NameTypeDefaultDescription
imagesIMAGE
frame_window_sizeINT819–100000Must match FeiHou-WanAnimate2ToVideo frame_window_size.
strengthFLOAT0.600–1How strongly each later segment is colour-matched to the preceding one.
analysis_framesINT122–64Pre-seam frames used to establish the stable background colour reference.
transition_framesINT101–64Number of frames immediately after each seam corrected one by one.

Outputs (1)

NameTypeDescription
imagesIMAGE