Temporal Mask Cropper
Crop a whole video clip to one stable window
- images
- masks
- images
- masks
Crop a video frame-by-frame with an independent detection pass on each frame and you get jitter - even a good per-frame crop shifts slightly from one frame to the next as your subject moves, your mask wobbles, or your detector's confidence varies. Temporal Mask Cropper solves the actual problem instead of the symptom: it looks at the whole batch at once, finds one bounding box that's stable across every frame, and crops the entire clip to that single window. One window, no per-frame drift.
How it works
The pack's own description spells this out clearly. method controls how the stable box gets found:
mask(the default) uses your input mask, thresholded bysensitivity.bbox,non_black,anime, andbg_submirror this pack's standalone Auto Cropper node's detection modes, each usingsensitivityfor its own detection logic.
The pack calls out one combination explicitly: for OpenPose or other control frames rendered on a black background, non_black is usually the best fit. That's directly relevant if you're prepping a pose-conditioning video for a WAN pipeline - this pack's Native Wan Pose Strength and SCAIL Pose Frames both live in that same pose-driven-video territory, and a clean, stable crop on the control video before it reaches the model matters for consistent motion transfer.
padding adds margin around whatever box gets detected, and use_image_padding decides what fills that margin: true extends the crop window into the surrounding image content (clamped at the frame edges), false fills it with plain black instead.
The inputs and outputs that matter
imagesandmasks- your clip and its mask, both required.method-mask,bbox,non_black,anime, orbg_sub.sensitivity(0–1, default 0.5) - the detection threshold feeding whichever method you picked.padding(0–512, default 16) - extra margin around the detected box.use_image_padding(boolean, default true) - extend into real image content vs. fill with black.
Outputs: images and masks, both cropped to the same stable window.
How to install it
Search "Link Comfy Nodes" in ComfyUI Manager and install from there. Or by hand:
cd ComfyUI/custom_nodes
git clone https://github.com/Mister-Link/link-comfy-nodes
pip install -r link-comfy-nodes/requirements.txt
Restart ComfyUI. No extra models needed for this node specifically.
Common issues & troubleshooting
Wrong method for your content. mask mode is only as good as the mask you feed it - a weak or noisy input mask gives a weak or noisy crop. non_black on an ordinary photographic scene (rather than a black-background control frame) will likely grab a much bigger box than intended, since it treats anything not-black as subject.
Subject clipped at the edges on some frames. If the detected box is too tight and your subject brushes against the crop boundary on a few frames, raise padding before switching detection methods.
Stretched or duplicated-looking edges after cropping. That's use_image_padding extending into real content near the frame boundary. Turn it off if you'd rather have hard black borders than that stretching effect.
Detection feels too loose or too aggressive across the whole clip. Adjust sensitivity first - it's the cheapest thing to tune before concluding the method itself is wrong for your footage.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| masks | MASK | — | |
| method | COMBO | mask | 5 options: mask, bbox, non_black, anime, bg_sub |
| sensitivity | FLOAT | 0.500–1 | — |
| padding | INT | 160–512 | — |
| use_image_padding | BOOLEAN | true | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |
| masks | MASK | — |