VQ Temporal Consistency (Warping/Flickering)
The node that catches shimmer, melting objects, and strobe lighting in your video
- video_frames
- warping_error
- flickering_score
- summary
Here's the thing nobody tells you about video generation: a video can be gorgeous frame-by-frame and completely broken in motion. Frames shimmer, backgrounds melt, lighting strobes. The full-reference metrics won't catch it because each frame individually looks fine. This node is the one that catches it - it analyzes your video internally and scores two kinds of temporal instability: warping error (does motion stay coherent between frames?) and flickering (does brightness stay stable over time?). No reference video needed.
You reach for this right after generating anything with motion - text-to-video, frame interpolation, video upscaling. It's the fastest way to know if your output is going to look like a film or a glitch montage.
How it works
For warping error, the node computes optical flow between consecutive frames using a pretrained RAFT model (auto-downloaded on first use, ~20 MB), then warps frame t+1 back to the position of frame t using that flow. If the motion was consistent, the warped frame should match the original; the residual difference is the error. When bidirectional_flow is on (it is by default), it also computes flow in reverse and uses a forward-backward consistency check to mask out occluded regions - pixels that legitimately appear or disappear - so they don't get counted as errors. A sudden spike in warping error at a specific frame is your "glitch" signal.
Flickering works differently: it takes per-pixel brightness across a sliding time window, measures the variance, and maps it to a 0–1 score. High variance across time at the same pixels means the lighting is pulsing - the classic early-Video-SVD disease.
Inputs and outputs
Required:
video_frames(IMAGE) - your[T, H, W, 3]frame tensor. Needs at least 2 frames.
Optional:
bidirectional_flow(BOOLEAN, default true) - off for speed, on for accuracy. Leaving it on roughly doubles the flow computation but hides fewer false positives from occlusions.
Outputs:
warping_error(FLOAT) - motion inconsistency, lower is better. Under ~0.05 is clean; above ~0.2 you've got visible warping.flickering_score(FLOAT) - brightness instability, 0–1, lower is better. Under 0.1 is stable; above 0.3 is distracting strobe.summary(STRING) - full report, ideal for a text display.
Installing
It's part of ComfyUI-VideoQuality-Metrics, one install for all its nodes:
cd ComfyUI/custom_nodes
git clone https://github.com/jajos12/ComfyUI-VideoQuality-Metrics
pip install -r ComfyUI-VideoQuality-Metrics/requirements.txt
Restart ComfyUI; it lands under VideoQuality/Temporal. ComfyUI Manager can install it too.
Common issues
- First run downloads RAFT weights (~20 MB) - expect a brief stall.
- Older torchvision silently downgrades flow quality. RAFT needs torchvision 0.15+; on older versions the code falls back to a Lucas-Kanade estimator that's noticeably less accurate. If warping numbers look weird, check your torchvision version.
- Fewer than 2 frames returns zeros. This is a motion node; feed it a real clip, not a single frame.
- Bidirectional flow is slow on long clips. If you're analyzing a long video, try flipping
bidirectional_flowoff for a quick pass and only enable it when you're chasing a specific glitch.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| video_frames | IMAGE | — | |
| bidirectional_flowopt | BOOLEAN | true | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| warping_error | FLOAT | — |
| flickering_score | FLOAT | — |
| summary | STRING | — |