Nodes/ComfyUI_Fill-Nodes/FL Video Recompose
ComfyUI Node

FL Video Recompose

Paste a cropped, processed video back into the full frame

By filliptm·Created 3 years ago·Updated about 17 hours ago· 628
FL Video Recompose
  • original_video
  • cropped_video
  • crop_data
  • output_video

If you've ever used a crop-and-stitch node for still images - Impact Pack's detailer crop, FL's own FL_InpaintCrop / FL_Inpaint_Stitch pair - this is that idea, moved to video. FL_VideoRecompose takes a region you cropped out of a clip, ran through some other node (an upscaler, a face-restore pass, a second Wan generation, whatever), and pastes it back into the original, full-resolution frames at the exact spot it came from. It's the second half of a two-node system; the first half, FL_VideoCropMask, is the one that actually did the cropping.

Why crop-and-recompose instead of just processing the whole clip

Running a heavy model over an entire 1080p video when you only care about a subject's face, or a small region a mask is tracking, is wasteful - more VRAM, more time, and usually worse results because your model is spending its attention budget on background pixels that didn't need to change. The standard move is: crop tight around the region (with some smoothing so the crop box doesn't jitter frame to frame), run your expensive step only on that smaller crop, then recompose the processed crop back into the untouched original. FL_VideoCropMask handles the first part - mask-driven cropping with temporal smoothing - and hands off a CROP_DATA object that records exactly where each frame's crop came from. FL_VideoRecompose reads that bookkeeping and does the paste.

How it works

You give it the original, unprocessed frames and the (now-processed) cropped frames, plus the crop_data that ties them together. For each frame, it resizes the processed crop back to the dimensions it was originally cropped at (so it doesn't matter if your in-between step changed the resolution - an upscaler, for instance) and drops it back into the original frame at the recorded position. What comes out is a full clip at the original resolution, with only the cropped region actually changed.

The inputs and outputs that matter

There are exactly three inputs, all required, and none of them optional:

  • original_video (IMAGE) - the full, untouched frames. This is your canvas.
  • cropped_video (IMAGE) - the cropped region after whatever processing you ran on it.
  • crop_data (CROP_DATA) - the position/size bookkeeping from FL_VideoCropMask. This has to be the actual CROP_DATA output from that node; there's no way to fake it with plain numbers.

One output: output_video (IMAGE) - the recomposed full-resolution clip, ready for your save node.

How to install it

Same as every other node in this pack - via ComfyUI Manager, search ComfyUI_Fill-Nodes (or Fill-Nodes) and install, or manually:

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

Restart ComfyUI afterward. This is a huge, sprawling pack - hundreds of nodes across image, video, audio, PDF, and API-integration categories - but this particular node has no model downloads and no unusual dependencies of its own; it's plain tensor resize-and-paste.

Common issues & troubleshooting

Frame count mismatch. original_video, cropped_video, and crop_data all need to describe the same number of frames in the same order. If you dropped or reordered frames anywhere between the crop step and here (a batch splitter, a frame trim, a filter node), the paste will land on the wrong frames or error out.

crop_data from the wrong source. This type only makes sense coming straight from FL_VideoCropMask in the same workflow. Don't try to reuse crop data across two different videos or two different crop passes - the coordinates won't line up.

Visible seams at the crop boundary. Because the paste is a straight resize-and-drop rather than a feathered blend, a processed crop with very different color or exposure from the surrounding frame can show a hard edge. If your in-between step (upscaler, generator) shifts brightness or color noticeably, correct that before recomposing rather than after.

Aspect ratio looks off. The node resizes the processed crop back to its original crop dimensions - if your processing step changed the crop's aspect ratio (not just its resolution), expect stretching, since there's no independent width/height control here to compensate.

Category🏵️Fill Nodes/experiments

Inputs (3)

NameTypeDefaultDescription
original_videoIMAGE
cropped_videoIMAGE
crop_dataCROP_DATA

Outputs (1)

NameTypeDescription
output_videoIMAGE