Feature Smoothing β‘π ‘π π £π
Denoise a jittery curve before it makes your effect flicker
- feature
- FEATURE
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, orgaussian.window_size(3β21, odd numbers only, default 5) - window size formoving_averageandgaussian.alpha(0.0β1.0, default 0.3) - smoothing factor forexponential; only relevant when that mode is selected.sigma(0.1β5, default 1) - standard deviation forgaussian; 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.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| feature | FEATURE | Input feature to be processed | |
| smoothing_type | COMBO | Type of smoothing to apply ("moving_average", "exponential", "gaussian") | |
| window_size | INT | 53β21 | Size of the smoothing window for moving average and gaussian (3 to 21, odd numbers only) |
| alpha | FLOAT | 0.300β1 | Smoothing factor for exponential smoothing (0.0 to 1.0) |
| sigma | FLOAT | 1.00.1β5 | Standard deviation for gaussian smoothing (0.1 to 5.0) |
| invert_output | BOOLEAN | false | β |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| FEATURE | FEATURE | β |