Feature To Filtered List β‘π ‘π π £π
Pull specific frame numbers out of a reactive curve
- feature
- filtered_indices
- filtered_count
- filtered_binary
- filtered_indices_str
Most of the Feature Modulator nodes hand you back another curve. This one is different - it's filed under "ExternalTargets" for a reason: it takes a feature and gives you back a list of specific frame indices that match some condition, as actual numbers you can read, script against, or feed into something outside the Feature system entirely. It's the node for when you need to know which frames, not just what value.
If you're new to the RyanOnTheInside pack (Ryan / u/ryanontheinside, also behind ComfyStream and Daydream's real-time reactive video work): the README mentions external integrations with tools like Depthflow, AdvancedLivePortrait, AnimateDiff-Evolved, and Advanced ControlNet - this node's category name suggests it's part of that bridge, exporting frame data for use somewhere beyond the pack's own Flex nodes.
How it works
filter_type decides what you're looking for, and the tooltip spells each one out clearly: peaks finds local maxima, troughs finds local minima, above_threshold and below_threshold find every frame crossing a level, and significant_changes finds points where the value shifts sharply rather than staying near a level. How that level is interpreted depends on threshold_type: absolute uses threshold_value directly as the cutoff, relative treats it as a percentile of the feature's own values (threshold_value * 100), and adaptive computes the threshold as the feature's mean plus threshold_value times its standard deviation - useful when you don't know in advance what a "high" value looks like for this particular feature and want the threshold to adapt to its actual distribution. smoothing applies Gaussian smoothing before filtering, to keep noise from generating false positives, and min_distance (relevant for peaks/troughs) enforces spacing between detected points the same way it does in Feature Peak Detector.
Inputs and outputs that matter
feature(required) - the curve to filter.filter_type-peaks,troughs,above_threshold,below_threshold, orsignificant_changes.threshold_type-absolute,relative, oradaptive; changes howthreshold_valueis interpreted.threshold_value(0.0β1.0, default 0.5) - the cutoff, interpreted perthreshold_type.smoothing(0.0β1.0, default 0.1) - Gaussian smoothing applied before filtering, to reduce noise.min_distance(1β100, default 1) - minimum frame spacing between detected points, for peaks/troughs.
Four outputs: filtered_indices (the matching frame numbers as an INT), filtered_count (how many frames matched), filtered_binary (a full-length curve, 1 at qualifying frames and 0 elsewhere - usable as its own feature-like signal), and filtered_indices_str (the same indices as a readable STRING, handy for eyeballing what the node actually found).
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 analysis on already-extracted feature data - no models, no GPU work of its own, 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 one that catches people is threshold_type. Leaving it on absolute with the default threshold_value of 0.5 assumes your feature actually spans a range where 0.5 is meaningful - if your feature's values mostly sit between 0.1 and 0.3, absolute at 0.5 will match almost nothing, and it's easy to conclude the node is broken rather than realizing the threshold doesn't fit your data. Switch to relative or adaptive when you're not sure your feature's range lines up with a flat 0β1 assumption - both adjust to the feature's own distribution instead of requiring you to know its range in advance. Before debugging further, wire filtered_indices_str into a preview or text-display node so you can actually see what frames it found rather than guessing from the count alone.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| feature | FEATURE | Input feature to filter | |
| filter_type | COMBO | Type of filtering to apply: - peaks: Find local maxima in the feature values - troughs: Find local minima in the feature values - above_threshold: Find values above the threshold - below_threshold: Find values below the threshold - significant_changes: Find points where the value changes significantly | |
| threshold_type | COMBO | How to determine the threshold: - absolute: Use threshold_value directly - relative: Use percentile of values (threshold_value * 100) - adaptive: Use mean + (threshold_value * std) | |
| threshold_value | FLOAT | 0.500β1 | Value used for thresholding (interpretation depends on threshold_type) |
| smoothing | FLOAT | 0.100β1 | Amount of Gaussian smoothing to apply (0-1) to reduce noise |
| min_distance | INT | 11β100 | Minimum distance between detected points (for peaks/troughs) |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| filtered_indices | INT | β |
| filtered_count | INT | β |
| filtered_binary | FLOAT | β |
| filtered_indices_str | STRING | β |