Smart Video Preview Scaled
A video preview that scales, so your GPU doesn't have to
- images
Smart Video Preview Scaled is a preview node with two jobs: show you a batch of frames as a video in the UI, and let you scale those frames first. The second job is the point. When you're iterating on a frame sequence (AnimateDiff-style batches, or any video pipeline), the default preview can be a wall of small thumbnails - this node blows each frame up by scale_by (default 2×) so you can actually see what you're working on, or shrinks it down when a 4K batch would choke the preview pane.
How it works
For every frame in the batch it does three things:
- Converts the tensor to a PIL image, clipped to 0–1.
- Scales it by
scale_byusing nearest-neighbor resampling - fast and cheap, which is the right call for a preview. Don't expect quality upscaling here; it's about legibility, not fidelity. - Optionally composites it over a solid
bg_color(15 presets includingtransparent, which is the default). This matters for RGBA frames - previews of cutouts and transparent animations otherwise show up as checkerboard soup.
Each frame is then written as a temp PNG and pushed to the UI with the fps you set, so the node area plays it back as a video. Inputs: images, fps (0.1–60, default 12), scale_by (0.1–10, default 2), bg_color. No outputs - it's a terminal display node.
There's a deliberate quirk in the code: IS_CHANGED returns a hash that includes random.random(), so the node re-executes on every run even if nothing else changed. That's a standard preview-node pattern - it guarantees the on-node video refreshes instead of being skipped by ComfyUI's caching. Downside: it always burns a few milliseconds of rework, which is fine for a preview and worth knowing so you don't think something's broken.
Where it plugs in
Drop it at the end of any branch that produces a frame batch: video generation, AnimateDiff, frame-interpolation output, even a multi-frame img2img batch. Because it scales before display, it's the preview you reach for when the raw batch is too small to judge (scale up) or too big to fit the screen (scale down to 0.5 or less).
Installing it
Pack-wide install:
cd ComfyUI/custom_nodes/
git clone https://github.com/slvslvslv/ComfyUI-SmartImageTools
pip install -r ComfyUI-SmartImageTools/requirements.txt
Restart or use ComfyUI Manager ("ComfyUI-SmartImageTools"). Real requirements: scikit-learn, scikit-image, numpy, Pillow, opencv-python, numba - the README's short list understates the install.
Gotchas
- Nearest-neighbor scaling means chunky pixels past ~2×. That's intentional (fast, cheap preview) - don't use it to judge fine detail, and never use it as a real upscaler.
- Transparent frames default to a transparent background, which can render as a checkerboard pattern in the UI. If that annoys you, pick a solid
bg_color. - It always re-runs (the random cache key), so it's not a zero-cost node on huge batches - fine for a handful of frames, wasteful at the end of a 200-frame pipeline you're just leaving connected.
- It's a preview only: no
IMAGEoutput, so you can't chain it into anything. For a scaled image you actually want to keep, use a real resize node.
Small, fast, and it solves a genuinely annoying part of frame-sequence work. If you're previewing video batches more than a few frames long, this is the node that keeps your workspace readable.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| fps | FLOAT | 120.1–60 | — |
| scale_by | FLOAT | 2.00.1–10 | — |
| bg_color | COMBO | transparent | 15 options: transparent, red, green, blue, black, white, +9 |
Outputs (0)
No outputs