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

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

Pick out the significant points in a noisy curve and draw a clean line through them

By ryanontheinsideΒ·Created 2 years agoΒ·Updated 5 months agoΒ· 852
Feature Interpolator βš‘πŸ…‘πŸ…žπŸ…£πŸ…˜
  • feature
  • FEATURE
β—„interpolation_methodβ–Ύβ–Ί
β—„threshold0.00β–Ί
β—„min_difference0.00β–Ί
β—„min_distance1β–Ί
β—„extrapolatefalseβ–Ί
β—„invert_outputfalseβ–Ί

A raw feature - especially one pulled straight from audio - is usually noisy: lots of small wiggles on top of the moments that actually matter. Feature Interpolator's job is to find the points that are actually significant, throw away the noise between them, and then draw a curve (or a step function, or a hold) connecting just those points. It's essentially keyframe extraction plus interpolation, bundled into one node.

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 like audio or motion and reshaped by Feature Modulator nodes like this one before it drives a Flex node's parameter or an external target.

How it works

First, the node picks out candidate points from the input feature, filtered by three settings: threshold (ignore points below this value entirely), min_difference (a point has to change by at least this much from the last kept point to count as significant - this is what actually removes the noise), and min_distance (points have to be at least this many frames apart, so you don't get a cluster of "significant" points all within a couple of frames of each other).

Once it has that reduced set of points, it connects them using whichever interpolation_method you choose - and the tooltip is worth quoting directly, since it's the clearest explanation of each option: zero (a step function between points), linear (straight lines), cubic (smooth curves, needs 4+ points), nearest (jump to the nearest point's value), previous (hold the previous value - good for a "step and hold" feel), next (jump to the next value early), and quadratic (smooth curves, needs 3+ points). If extrapolate is on, values before the first point and after the last are extended rather than left flat at the edges.

Inputs and outputs that matter

  • feature (required) - the raw curve to interpolate.
  • threshold (0.0–1.0, default 0) - only consider points above this value.
  • min_difference (0.0–1.0, default 0) - minimum value change required between kept points; this is your main noise filter.
  • min_distance (1–100 frames, default 1) - minimum spacing between kept points.
  • interpolation_method - zero, hold, linear, cubic, nearest, previous, next, or quadratic. Reach for linear or cubic for a smooth swoop between hits, and previous/zero for a rhythmic step-and-hold feel.
  • extrapolate - extend values past the first/last kept point instead of holding flat.
  • 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

This node runs on already-extracted feature data - no GPU or model work of its own, though it installs alongside the pack's full dependency set for the audio/MIDI/optical-flow extraction nodes elsewhere.

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, not a partial git pull.

Two things trip people up on this node specifically. First, cubic and quadratic need a minimum number of points (four and three respectively) to actually produce a curve - if your threshold, min_difference, and min_distance settings are aggressive enough to filter your feature down to just one or two points, those methods either fall back to something simpler or misbehave, so loosen the filtering settings if you're picking a smooth method and getting a flat or broken-looking result. Second, min_distance and min_difference interact - a low min_distance with a high min_difference can still collapse a busy section of your feature down to almost no points, because even closely-spaced candidates get rejected unless they differ enough from the last kept one. If you're getting far fewer points than expected, loosen min_difference before touching min_distance.

CategoryRyanOnTheInside/FlexFeatures/FeatureModulators

Inputs (7)

NameTypeDefaultDescription
featureFEATUREInput feature to interpolate
interpolation_methodCOMBOChoose interpolation method: - zero: Step function between points - linear: Straight lines between points - cubic: Smooth curves (needs 4+ points) - nearest: Jump to nearest point value - previous: Hold previous value - next: Jump to next value early - quadratic: Smooth curves (needs 3+ points)
thresholdFLOAT0.000–1Only consider points above this value (0.0 to 1.0)
min_differenceFLOAT0.000–1Minimum value change required between points (0.0 to 1.0)
min_distanceINT11–100Minimum frames between points (1 to 100)
extrapolateBOOLEANfalseWhether to extend values beyond the first/last points
invert_outputBOOLEANfalseβ€”

Outputs (1)

NameTypeDescription
FEATUREFEATUREβ€”