Video Stitch πΌ π π π £π
Stitching a crop into the original video
- original_frames
- cropped_frames
- crop_info
- stitched_frames
Video Stitch is the "put it back" half of a two-node trick, and honestly the half people get wrong. Its partner, Video Crop, isolates a rectangle across every frame of a video batch. You run whatever heavy processing you actually wanted - face restore, lip sync, a region inpaint - on just that rectangle. Then Video Stitch pastes the processed crop back exactly where it came from, leaving every other pixel in the frame untouched. That crop-process-stitch pattern is the standard way to edit a face without regenerating the whole frame, and it beats whole-frame editing for a simple reason: nothing outside the mask moves. The KB's inpainting essay makes the same point about compositing - bit-identical unmasked pixels are the whole appeal.
Mechanically it's boring in the best way: a tensor write. The node reads x and y out of the crop_info dictionary that Video Crop emits, clones your original_frames, and assigns cropped_frames into that rectangle. Two details keep it from being a footgun. First, it uses the actual dimensions of the cropped tensor for the write, not the numbers you typed into the Crop node, so a slightly-off crop width won't silently misalign. Second, if the frame counts of the two batches differ, it stitches only min(orig, cropped) frames and leaves the trailing ones as the untouched original - usually exactly what you want when your processing chain dropped a frame.
Three inputs, one output. You need:
original_frames- the pre-crop batch, straight from the video source (VHS or Load Images).cropped_frames- the processed crop (after IPAdapter, a latent sync pass, whatever).crop_info- theBETA_CROPINFOoutput from Video Crop. Don't try to hand-build this; just wire the wire.
That gives you stitched_frames, which flows straight back into your save or VHS Combine.
Installing it is just installing the pack - this node isn't separate. Easiest path is ComfyUI Manager: search "BETA" or "Burgstall" and install ComfyUI-BETA-Cropnodes (the repo has since been renamed ComfyUI-BETA-Helpernodes, so you may see either name - GitHub redirects the old one). Or clone it by hand:
cd ComfyUI/custom_nodes
git clone https://github.com/Burgstall-labs/ComfyUI-BETA-Cropnodes
then restart ComfyUI. It's a pure-utility pack: no model downloads, no API keys, nothing but the usual ComfyUI environment.
Where people get burned: the most common failure is output identical to input, which almost always means crop_info is missing or came from a different crop node - the code returns the original frames when the dictionary is malformed, and it's only a console print that tells you. The other classic is resizing the crop between nodes. If you changed the crop dimensions after cropping (say, an upscale in between), the stitch still writes whatever dimensions the cropped tensor has, positioned from the original x/y - the top-left anchor holds, but the region no longer matches what you cropped. Crop, process, and stitch with one crop_info from a single BETACrop and you're fine.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| original_frames | IMAGE | β | |
| cropped_frames | IMAGE | β | |
| crop_info | BETA_CROPINFO | β |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| stitched_frames | IMAGE | β |