Video Crop πΌ π π π £π
Crop one rectangle across every frame of a video batch
- video_frames
- cropped_frames
- crop_info
Video Crop does one thing and does it cleanly: it takes a batch of images - video frames, in practice - and cuts the same rectangle out of every single one. If you've ever wanted to run a face-restore model on just the face across a whole clip, or inpaint a region without paying for full-frame inference, this is the node that makes it cheap. The wider workflow is crop β process the small region at high resolution β stitch it back with Video Stitch. That last step is what makes this worthwhile: you get to spend your generation budget on a 256px face rather than a whole 1024px frame, and the untouched pixels stay bit-identical.
Under the hood it's tensor slicing with guard rails. Given x, y, width, and height, it clamps the coordinates into the frame bounds, crops with video_frames[:, y:end_y, x:end_x, :], and packs everything you'd need to reverse the operation into a crop_info dictionary. The interesting extra is round_to_multiple: set it to 16 or 64 and it rounds the requested width and height up to the nearest multiple, then re-clamps so it never overruns the frame edge. That rounding matters more than it looks - models and VAEs are picky about dimensions being multiples of 8/16/64, so a crop that lands on an ugly number will silently misbehave downstream. Set it to 1 to disable.
The inputs you'll actually touch:
video_frames- your image batch (IMAGE).x/y- top-left corner of the crop, 0-indexed.width/height- desired crop size.round_to_multiple- rounds the crop up to a model-friendly size; leave at 1 if you want the literal rectangle.
Two outputs: cropped_frames (the IMAGE you process) and crop_info (the BETA_CROPINFO dict you hand to Video Stitch). Don't lose the second one - it's the only thing that lets the stitch node know where the crop came from.
Install is the pack install, nothing extra: ComfyUI Manager, search "BETA" or "Burgstall", pick ComfyUI-BETA-Cropnodes (recently renamed ComfyUI-BETA-Helpernodes; both names resolve). Or:
cd ComfyUI/custom_nodes
git clone https://github.com/Burgstall-labs/ComfyUI-BETA-Cropnodes
Restart ComfyUI. No models, no keys, no extra pip packages for this node.
The traps are mostly geometry. Coordinates are 0-indexed, so a crop starting at the exact bottom-right pixel means x = width - 1. And remember the rounding is up - if your region is 250px wide and you round to 16, you get 256, which is great for the model but can overshoot the frame edge; the node handles that by clamping, but you'll see a slightly smaller crop than the multiple you asked for. Nothing crashes, but it's the one place the numbers you typed and the numbers you get can diverge.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| video_frames | IMAGE | β | |
| x | INT | 00β8192 | β |
| y | INT | 00β8192 | β |
| width | INT | 2561β8192 | β |
| height | INT | 2561β8192 | β |
| round_to_multiple | INT | 11β256 | β |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| cropped_frames | IMAGE | β |
| crop_info | BETA_CROPINFO | β |