Keyframe Based Upscaler V1
Video upscaling on a budget
- images
- IMAGE
Upscaling a video naively is dumb: you run the same expensive resize on 150 frames that are 90% near-identical, burning compute on frames that barely changed. KeyframeBasedUpscalerV1 is built around the observation that you don't need to. It analyzes the sequence, picks out the frames where something actually changed, upscales those at high quality, and reconstructs everything in between by blending the surrounding keyframes. Same output size, fraction of the work. It's the "more pixels" school of upscaling (see the KB's distinction between adding pixels and adding detail) with a temporal brain attached.
How it works
Three stages. First, each frame gets a signature - downscaled grayscale plus Sobel edge features - and the node measures differences between frames using both structural change and optical flow (Farneback) motion. Frames that clear the keyframe_threshold become keyframes. Second, keyframes get upscaled with your chosen interpolation quality. Third, every non-keyframe is built by blending the nearest keyframes with Gaussian weights and a fast resize. The whole thing runs on OpenCV with a thread pool, so it's genuinely quick.
The inputs that matter
- scale_factor (1–4, default 2) - how much to upscale. 2 is the sensible default; 4 on keyframes only can look thin on the blended frames in between.
- keyframe_threshold (0–100, default 30) - how different a frame must be to qualify as a keyframe. Lower = more keyframes = higher quality, slower. Higher = fewer = faster, riskier on motion. This is the main quality/speed tradeoff.
- temporal_window (1–15, default 5) - how many surrounding keyframes contribute to the blend. Bigger window = smoother, but motion blur on fast cuts; smaller = crisper.
- motion_sensitivity (0–1, default 0.5) - how much optical flow counts toward keyframe detection. High-motion footage wants this up (0.7–0.9) or the camera pans will starve the keyframe detector; static talking-head footage can run it low.
- quality_preservation (0–1, default 0.8) - blends between temporal smoothing and per-frame sharpness. Higher preserves detail and adds a touch of sharpening.
- interpolation_method (0/1/2) - the keyframe upscaler: 0 linear (fastest), 1 cubic, 2 Lanczos (best).
Input images, output IMAGE at the scaled resolution.
The honest take
Straight up: this is not a quality-first upscaler. Lanczos-on-keyframes can't invent detail the way a real-ESRGAN or SeedVR2 pass can, and on fast motion the blended intermediate frames will smear where a per-frame model would hold. But that's not the job. The job is "upscale a long clip cheaply and consistently," and there it genuinely delivers - it's the node you reach for when a 2-minute video would otherwise cost you a model pass on every single frame. The setting that matters most is keyframe_threshold: lean on it. Static footage can ride a high threshold and fly; anything with pans or action needs it low or you'll see the blend fall apart. Keep motion_sensitivity honest with your content type and this is a very effective speed hack hiding in a pack that mostly does effects.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| scale_factor | FLOAT | 2.01–4 | — |
| keyframe_threshold | FLOAT | 300–100 | — |
| temporal_window | INT | 51–15 | — |
| quality_preservation | FLOAT | 0.80–1 | — |
| motion_sensitivity | FLOAT | 0.50–1 | — |
| interpolation_method | INT | 00–2 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |