Nodes/ComfyUI-SA-Nodes-QQ/Temporal Smoothing Node (QQ)
ComfyUI Node

Temporal Smoothing Node (QQ)

Stop your Wan videos from flickering with Temporal Smoothing

By siraxe·Created 11 months ago·Updated 2 days ago· 72
Temporal Smoothing Node (QQ)
  • images
  • IMAGE
kernel_size5
sigma1.00
modegaussian

You generated a Wan clip and every frame looks fine on its own, but the video shimmers. That's per-frame noise - the model wasn't being temporally consistent, and nothing downstream is going to fix it for you. This node attacks the problem directly: it blends each frame with its neighbors in time, not in space. It's the temporal equivalent of a Gaussian blur, and it's the cheapest flicker-reduction hack in the Wan playbook.

It comes from siraxe/ComfyUI-WanVideoWrapper_QQ, the experimental Wan toolpack (you'll see its nodes tagged "(QQ)"). The author, sir_axe, is best known on r/comfyui for the TTM video-physics integration built on this same pack, and this node is one of the quieter utility pieces in it.

How it works

Temporal Smoothing takes your batch of frames - shape [B, H, W, C] - and rebuilds frame n as a weighted average of the frames around it. The kernel_size is how many frames participate (it must be odd, which is why the widget steps by 2), and sigma controls how fast the weights fall off from the center frame. Bigger kernel, smoother result, more motion blur. There's a real tradeoff: overdo it and everything looks like a vaseline-smeared dream sequence, so 5 with sigma 1 is a sensible starting point and you tune from there.

The interesting part is the mode dropdown. gaussian does the plain weighted average described above. optical_flow goes further: it runs RAFT-Small from torchvision to estimate motion between frames, warps each neighbor onto the target frame, and then blends. That means moving objects get averaged in their correct positions instead of ghosting. It's genuinely better for videos with real motion - but it downloads the RAFT weights on first use and eats VRAM while the model is resident, so don't leave it on for a 5-frame test render.

Inputs and outputs that matter

You only really set three things:

  • images - your IMAGE tensor, straight from a VAE decode or a video loader.
  • kernel_size - odd integer, 1 to 21. 1 is a no-op. Start at 5.
  • sigma - 0.1 to 5. Higher = smoother/blurrier.

Plus the mode toggle (gaussian default, optical_flow for motion-aware smoothing).

Output is a single IMAGE of the same shape, so it drops into any node that took your original frames. Wire it between the VAE decode and your video saver and you're done.

Installation

The pack has no requirements.txt to speak of, so this is bare-bones:

cd ComfyUI/custom_nodes
git clone https://github.com/siraxe/ComfyUI-WanVideoWrapper_QQ.git

Then restart ComfyUI - or just search "WanVideoWrapper_QQ" in ComfyUI Manager. Note the pack was renamed to ComfyUI-SA-Nodes-QQ internally in v1.3.4, so if you had the old wanwrapper_qq folder lying around, delete it or you'll get duplicate-node warnings.

Common issues

The usual suspect is optical_flow mode failing on machines without torchvision's RAFT weights reachable - the first run needs network access to download them. If that errors, fall back to gaussian; for mild flicker it's 90% of the way there anyway. Also, kernel_size values that aren't odd just get silently rounded by the step, and a large kernel over a fast-moving clip will smear motion even in gaussian mode. If your video is mostly static and just sparkles, this is the exact right tool - if it's a busy action shot, reach for optical_flow or reconsider what you're trying to smooth.

Categoryimage/postprocessing

Inputs (4)

NameTypeDefaultDescription
imagesIMAGE
kernel_sizeINT51–21
sigmaFLOAT1.000.1–5
modeoptCOMBOgaussian2 options: gaussian, optical_flow

Outputs (1)

NameTypeDescription
IMAGEIMAGE