Smart Video Preview Scaled Masked
See your video frames AND the mask at the same time
- images
- mask
- composed_image
When you're working on video - inpainting, frame interpolation, mask-based edits - the standard ComfyUI preview shows you either the frames or the mask, and you have to mentally stitch them together. Smart Video Preview Scaled Masked does both at once: it overlays your mask in a color you choose right on top of the frames, scales the whole thing up, and plays it back as a video preview. It's the "let me actually see what the mask is doing" node.
How it works
It walks each frame in the batch, converts it to RGBA, and if you've wired in an optional mask, composites a colored overlay onto it: the mask's white areas become the mask_color at the overlay's alpha. Mask stuck to the wrong region, bleeding onto the subject, drifting between frames? You'll see it immediately, in motion, instead of squinting at a static mask.
Then it scales the frame by scale_by using nearest-neighbor resampling (crisp, no blur-smearing of your pixels) and writes each frame to a temp file that the front end plays back at your fps. Because it's an output/preview node, it's also the endpoint - wire it at the end of a video branch and that's what you watch.
Inputs and outputs
images- the video frame batch (IMAGE).fps- playback speed, default 12.scale_by- magnification, default 2.0 (0.1–10).mask_color- hex color for the mask overlay, default#FF0000FF. Note it's an 8-digit RGBA hex - the last two digits control the overlay's opacity, so#FF0000FFis fully opaque red. Use a partial alpha like#FF000080for a see-through tint.mask(optional) - theMASKto overlay.
Output: composed_image - the batch of frames with the overlay baked in.
Installing it
Same pack as everything else here:
cd ComfyUI/custom_nodes
git clone https://github.com/slvslvslv/ComfyUI-SmartImageTools
pip install -r ComfyUI-SmartImageTools/requirements.txt
Restart ComfyUI, or install via ComfyUI Manager ("SmartImageTools").
When it earns its keep
Any video workflow where the mask is the product - video inpainting, rotoscoping check, subject-tracking previews. It also ignores ComfyUI's node caching deliberately (it re-runs each time with a random component), so it always reflects the latest frames rather than showing you a stale preview. The trade-off is that "always re-runs" also means it recomputes every time you touch anything upstream, which on long batches is real compute. Keep the batch short while you're iterating, and remember the mask_color alpha is your friend for seeing through the overlay.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| fps | FLOAT | 120.1–60 | — |
| scale_by | FLOAT | 2.00.1–10 | — |
| mask_color | STRING | #FF0000FF | — |
| maskopt | MASK | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| composed_image | IMAGE | — |