Nodes/ComfyUI_Fill-Nodes/FL Wan Video Continue
ComfyUI Node

FL Wan Video Continue

Build the overlap frame buffer that lets Wan extend a clip

By filliptm·Created 3 years ago·Updated about 11 hours ago· 628
FL Wan Video Continue
  • input_video_frames
  • end_video_frames
  • control_images
  • inpaint_mask
  • continuation_video_frames
  • continuation_frame_masks
total_output_frames81
overlap_frames3
empty_frame_fill_level0.50
how_to_use_control_imagesstart_sequence_at_beginning_and_prioritise_input_frames
how_to_use_inpaint_masksstart_sequence_at_beginning_and_prioritise_input_frames

Wan tops out around 81 frames of native context - call it five seconds. Everyone who wants a longer video runs into the same wall and solves it the same way: generate a chunk, feed the tail of it back in as the start of the next chunk, and let the model continue from there with a few frames of overlap so the seam doesn't jump. Doing that bookkeeping by hand is fiddly and error-prone. FL_WanVideoContinue is the node that builds the buffer for you.

It assembles a continuation-ready frame sequence: the last N frames of your input clip placed at the start (so the model knows where it's coming from), an optional block of the first N frames of an end clip placed at the end (so it knows where it's heading), and gray filler in between marking the frames you want generated. Alongside the frames it hands you a mask that tells the sampler which frames are known anchors and which are open for generation. That mask is the whole point - it's what turns "here are some frames" into "inpaint the middle, keep the ends."

How it works

Think of it as prepping an inpaint job in the time dimension. The overlap frames from your input are the fixed context at the head; the empty frames are what the Wan VACE / inpaint sampler downstream will paint; the mask marks the boundary. If you also give it an end clip, it does the same at the tail, so you get a symmetrical bridge between two shots rather than an open-ended extension. This is the manual, transparent version of what single-node chunkers like SCAIL-2 Infinity automate - useful when you want to see and control the overlap yourself.

The inputs and outputs that matter

  • input_video_frames (IMAGE, required) - the clip you're continuing from. Its tail becomes the anchor.
  • total_output_frames (INT, default 81, step 4) - how long the assembled buffer is. Keep this on Wan's cadence.
  • overlap_frames (INT, default 3) - how many known frames to carry over as context at each end. This is your seam-quality knob.
  • empty_frame_fill_level (FLOAT, 0–1, default 0.5) - the gray level of the frames to be generated (mid-gray by default).

Optional: end_video_frames (IMAGE) for a target to land on, control_images (IMAGE) and inpaint_mask (MASK) if you're steering the generation, plus two enums - how_to_use_control_images and how_to_use_inpaint_masks - that decide whether those extras align to the very beginning of the sequence or start after the overlap block.

Outputs: continuation_video_frames (IMAGE) and continuation_frame_masks (MASK). Both go into your Wan VACE / inpainting sampler - the frames as the reference, the mask as the region to generate.

Installing it

ComfyUI Manager → search ComfyUI_Fill-Nodes → install → restart. Or:

cd ComfyUI/custom_nodes
git clone https://github.com/filliptm/ComfyUI_Fill-Nodes

then restart. This is one node in filliptm's large Fill-Nodes pack; the continuation family lives under its WIP section, so treat it as functional but evolving.

Common issues & troubleshooting

Respect the frame cadence. Wan wants counts on a 4n+1 pattern (81 = 4×20+1). The total_output_frames step of 4 nudges you toward valid lengths - getting the arithmetic wrong is exactly the tax this whole approach exists to manage, and a bad count makes the end of the clip behave weirdly.

Seam still visible. Bump overlap_frames. Too few and the model has thin context to blend against; too many and you're regenerating frames you already had, which wastes time without helping.

Use the matching blender afterward. Clips produced this way carry embedded overlap frames. The pack's FL_WanVideoContinuationBlender knows to strip those before joining so frames aren't duplicated - use it after the generation step rather than a generic crossfade.

Drift across many extensions. This is a Wan reality, not a node bug: quality holds for several continuations, then character appearance slowly wanders. Plan for a handful of chunks, not infinite length.

Category🏵️Fill Nodes/WIP

Inputs (9)

NameTypeDefaultDescription
input_video_framesIMAGEInput video frames to create continuation from.
total_output_framesINT811–10000Total number of frames for the output continuation video. Must satisfy: (frames - 1) divisible by 4.
overlap_framesINT31–50Number of frames to use for overlap at both start (from end of input video) and end (from start of end video frames).
empty_frame_fill_levelFLOAT0.500–1Grayscale level (0.0 black, 1.0 white) for empty continuation frames.
end_video_framesoptIMAGEOptional video frames - first X frames (where X=overlap_frames) will be placed at the end of the continuation video.
control_imagesoptIMAGEOptional control images to fill the empty frames.
inpaint_maskoptMASKOptional inpaint mask to use for the empty frames, overriding the default mask.
how_to_use_control_imagesoptCOMBOstart_sequence_at_beginning_and_prioritise_input_framesIf start_sequence_at_beginning_and_prioritise_input_frames is selected, control images align with frame 0 but input overlap frames take priority, so control images become visible after the overlap period. If start_sequence_after_overlap_frames_and_prioritise_input_frames is selected, control images start being placed after the overlap frames from the input video.
how_to_use_inpaint_masksoptCOMBOstart_sequence_at_beginning_and_prioritise_input_framesIf start_sequence_at_beginning_and_prioritise_input_frames is selected, inpaint masks align with frame 0 but preserve input overlap frames as known. If start_sequence_after_overlap_frames_and_prioritise_input_frames is selected, inpaint masks only affect frames after the overlap period.

Outputs (2)

NameTypeDescription
continuation_video_framesIMAGE
continuation_frame_masksMASK