K3NK Image Loader (Blending)
The Loader That Hides the Seams When You Stitch Video Segments Together
- images
If you've ever extended a video by regenerating segment after segment, you know the exact moment this node exists for: the cut. Segment one ends, segment two begins, and no matter how careful you were, there's a visible pop - different lighting, a shifted pose, a jump in color. K3NK Image Loader (Blending) loads a folder of frames the normal way, then fades each sequence boundary into the next so the re-generated segments feel like one continuous take.
It's built for the long-form WanVideo / AnimateDiff workflow where you generate in chunks, save each chunk as numbered PNGs, and want to reassemble them into a video that doesn't stutter at the joins. The K3NK pack's whole personality is "plumbing for stitching long videos," and this is the smoothest part of it.
How it works - the clever bit
Here's the trick that makes it different from a plain folder loader: it detects where one sequence ends and the next begins by looking for .latent files sitting in the same folder. In the K3NK workflow, each generated segment gets its latent saved alongside its PNG frames (that's what the pack's Save Latent pass-through node is for). This loader reads those latent filenames, works out which PNG index each boundary lands at, and treats them as the seams.
At each boundary it takes overlap_frames frames on either side and blends them with a smootherstep curve - the same easing trick game devs use - so the crossfade ramps gently at the start and end rather than linearly. The source blends in-place into a pre-allocated tensor, so there's no memory blowup on long sequences, and if no .latent files exist it just falls back to loading everything with no blending.
The one thing to internalize: the output has fewer frames than the folder. Blending consumes the overlap frames - it replaces them, it doesn't add them. The README's rule of thumb for RIFE 2× interpolation is to double your sequence size and overlap accordingly, because the interpolator needs the boundary math to still line up.
The inputs that matter
directory_path- folder with your numbered image sequence.auto_detect_sequences- on by default; lets the node find boundaries from the.latentfiles.enable_blending- flip this off to get a plain loader if you just want the frames unmodified.overlap_frames- how many frames to crossfade at each seam. Default 10, range 1–50. Bigger overlap = smoother joins but more frames eaten and more blur where motion doesn't match.file_pattern- glob, default*.png.
Output is a single images tensor (IMAGE), ready to feed an encoder, a VideoCombine-style node, or RIFE interpolation. It re-reads the folder on every run (IS_CHANGED returns the current time), so dropping new frames in and re-running just works.
Installing it
Via ComfyUI Manager, search ComfyUI-K3NKImageGrab. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/K3NK3/ComfyUI-K3NKImageGrab
Restart ComfyUI. This node needs Pillow, which ComfyUI already has. No models, no downloads.
Where people get burned
The most common surprise is the frame count. People load a folder expecting N frames out and get N minus (seams × overlap). If you're chaining this into a video node that requires an exact frame count, do the subtraction yourself first.
Second gotcha: it needs the .latent files present to detect seams. If you renamed or deleted them, or you're loading someone else's exported frames without the latents, blending silently turns off - the seams come back. Keep the latent files in the same folder as the PNGs and let the node do its thing. And if a seam lands closer to the start than overlap_frames, the node skips blending there rather than crash - which is friendly, but means a boundary near frame zero won't get smoothed.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| directory_path | STRING | — | |
| auto_detect_sequences | BOOLEAN | true | — |
| enable_blending | BOOLEAN | true | — |
| overlap_frames | INT | 101–50 | — |
| file_pattern | STRING | *.png | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |