Nodes/RyanOnTheInside/Feature Smoothing βš‘πŸ…‘πŸ…žπŸ…£πŸ…˜
ComfyUI Node

Feature Smoothing βš‘πŸ…‘πŸ…žπŸ…£πŸ…˜

Denoise a jittery curve before it makes your effect flicker

By ryanontheinsideΒ·Created 2 years agoΒ·Updated 5 months agoΒ· 852
Feature Smoothing βš‘πŸ…‘πŸ…žπŸ…£πŸ…˜
  • feature
  • FEATURE
β—„smoothing_typeβ–Ύβ–Ί
β—„window_size5β–Ί
β—„alpha0.30β–Ί
β—„sigma1.0β–Ί
β—„invert_outputfalseβ–Ί

A feature pulled straight from audio or motion analysis is rarely clean - there's frame-to-frame jitter baked in from the analysis itself, and if you drive an effect directly off that, it flickers instead of moving. Feature Smoothing is the denoising step: three different smoothing algorithms, pick whichever shape suits what you're doing.

If you're new to the RyanOnTheInside pack (Ryan / u/ryanontheinside, also behind ComfyStream and Daydream's real-time reactive video work): a FEATURE is a per-frame value curve, extracted from a source and reshaped by Feature Modulator nodes like this one before it drives a Flex node's parameter or an external target.

How it works

smoothing_type picks the algorithm. moving_average replaces each frame's value with the flat average of the frames around it, using a window of window_size frames (must be odd, 3–21) - simple and predictable, but can feel a little mechanical since every frame in the window counts equally. exponential weights recent frames more heavily than older ones, controlled by alpha - higher alpha tracks the input more closely (less smoothing), lower alpha smooths more aggressively by leaning on history. gaussian uses a bell-curve-weighted window instead of a flat one, controlled by window_size and sigma (the spread of the bell curve) - this tends to produce the most natural-looking result of the three, since nearby frames matter more than distant ones instead of all mattering equally.

Inputs and outputs that matter

  • feature (required) - the curve to smooth.
  • smoothing_type - moving_average, exponential, or gaussian.
  • window_size (3–21, odd numbers only, default 5) - window size for moving_average and gaussian.
  • alpha (0.0–1.0, default 0.3) - smoothing factor for exponential; only relevant when that mode is selected.
  • sigma (0.1–5, default 1) - standard deviation for gaussian; only relevant when that mode is selected.
  • invert_output - flips the result.

Output is a single FEATURE, wired into a Flex node's optional feature input or another modulator.

Installing it

Via ComfyUI Manager: search RyanOnTheInside. Manual install:

cd ComfyUI/custom_nodes
git clone https://github.com/ryanontheinside/ComfyUI_RyanOnTheInside
cd ComfyUI_RyanOnTheInside
pip install -r requirements.txt

Pure math on already-extracted feature data - no models, no GPU work, though it ships with the pack's full dependency set.

Where people get tripped up

If a v1-to-v2 update leaves the pack broken, the README's fix is a full uninstall and reinstall rather than a git pull.

The default window_size of 5 and sigma of 1 are conservative - enough to take the edge off obvious jitter without flattening the curve, but if your feature is still visibly noisy after applying this node, most people's instinct is to switch algorithms when really they just need a bigger window. Push window_size up (staying odd) or sigma up before assuming gaussian "isn't working" for you. The flip side: too much smoothing and you'll lose the punch of genuine hits - if peaks that should be sharp are coming out rounded off, that's this node doing exactly what it's told, and you may want to detect peaks before smoothing (with Feature Peak Detector) rather than after, so the smoothing doesn't erase what you were trying to isolate in the first place.

CategoryRyanOnTheInside/FlexFeatures/FeatureModulators

Inputs (6)

NameTypeDefaultDescription
featureFEATUREInput feature to be processed
smoothing_typeCOMBOType of smoothing to apply ("moving_average", "exponential", "gaussian")
window_sizeINT53–21Size of the smoothing window for moving average and gaussian (3 to 21, odd numbers only)
alphaFLOAT0.300–1Smoothing factor for exponential smoothing (0.0 to 1.0)
sigmaFLOAT1.00.1–5Standard deviation for gaussian smoothing (0.1 to 5.0)
invert_outputBOOLEANfalseβ€”

Outputs (1)

NameTypeDescription
FEATUREFEATUREβ€”