Nodes/comfyui-moonpack/VACE Looper Frame Mask
ComfyUI Node

VACE Looper Frame Mask

Let it compute the fade schedule for you

By moonwhaler·Created about a year ago·Updated 11 days ago· 16
VACE Looper Frame Mask
  • images
  • total_frames
  • fade_mask
  • overlap_frames
  • between_frames
  • source_frames
  • was_clamped
overlapping_frames15
in_between_frames51

Seamless video loops are one of the genuinely impressive things you can do with Wan and reference-based workflows, but the frame arithmetic is fiddly: you've got overlapping frames at the start and end that should hold the source, a middle stretch that's fully generated, and a fade mask schedule that has to match kjnodes' Create Fade Mask Advanced parser exactly or the whole loop falls apart. VACE Looper Frame Mask Creator does that arithmetic for you. Tell it how many frames overlap and how many are in between, and it hands you the total frame count plus a ready-to-use fade schedule.

The core idea: in a loop, the first N frames and the last N frames are "source-driven" (weight 1.0 - the model is anchored to your input images), while the middle is "fully generated" (weight 0.0). The node encodes that as a kjnodes keyframe schedule, which is the format ComfyUI-KJNodes' fade mask node consumes. This is the piece people hand-write and get wrong; the node makes it a two-integer input.

The inputs that matter

  • overlapping_frames - frames at start and end held at weight 1.0 (source-driven). Default 15. This is the seam of your loop; too few and the loop visibly jumps.
  • in_between_frames - frames in the middle at weight 0.0, fully generated. Default 51.
  • images (optional) - wire in the source image batch. The node reads its length and, if your overlapping_frames exceeds half the source count, clamps it down and tells you via the was_clamped output. That's a real safety net: overlap can't exceed what your source frames can anchor.

The outputs

Six of them, but the two you'll actually wire are total_frames and fade_mask (the kjnodes schedule string, e.g. 0:(1.0),15:(0.0),66:(1.0),). The others are diagnostics: overlap_frames, between_frames, and source_frames report the effective values (post-clamp), and was_clamped is a boolean flag that tells you the node had to rein in your overlap. If you're debugging a janky loop, was_clamped being true is usually the first clue.

The trailing-comma detail

The schedule string it produces ends in a comma - that's not a typo. kjnodes' Create Fade Mask Advanced parser expects it, and the node keeps the format contract intact. If you ever hand-write a schedule for that node, remember the trailing comma.

Installing it

Part of MoonPack:

cd ComfyUI/custom_nodes
git clone https://github.com/moonwhaler/comfyui-moonpack.git

or ComfyUI Manager → MoonPack → install, restart. Under MoonPack/video. No models, no extra Python dependencies - but it only earns its keep if you also have ComfyUI-KJNodes installed (for the fade mask node) and a VACE-capable Wan setup feeding it.

Verdict

A niche helper for a genuinely cool workflow. If you've ever manually typed a kjnodes schedule and watched a loop shimmer at the seam, this is the node that stops that - the clamp-on-images logic alone is worth the install.

CategoryMoonPack/video

Inputs (3)

NameTypeDefaultDescription
overlapping_framesINT151–10000Frames at start and end with weight 1.0 (source-driven).
in_between_framesINT510–10000Frames in the middle with weight 0.0 (fully generated).
imagesoptIMAGEOptional source images. If provided, overlap is clamped to half their count.

Outputs (6)

NameTypeDescription
total_framesINT
fade_maskSTRING
overlap_framesINT
between_framesINT
source_framesINT
was_clampedBOOLEAN