Feature To Flex Int Param β‘π ‘π π £π
Drive a whole-number parameter off a reactive curve
- feature
- PARAMETER
The integer twin of Feature To Flex Float Param: it converts a FEATURE curve into a per-frame whole number, for any ordinary ComfyUI parameter that specifically expects an INT rather than a float - a step count, an index into a list, a seed offset, anything that has to land on a round number rather than something with a decimal.
If you're new to the RyanOnTheInside pack (Ryan / u/ryanontheinside, also behind ComfyStream and Daydream's real-time reactive video work): this node sits in the "Scheduling" part of the pack rather than "FeatureModulators" - it's the last step that turns a reactive curve into an actual per-frame value for a specific parameter, replacing manual keyframing with the underlying feature driving it directly.
How it works
Same mapping logic as its float sibling: the feature's own observed minimum gets mapped to lower_threshold, its own maximum to upper_threshold, and everything between is scaled proportionally - then rounded to the nearest whole number for output, since the target type is INT. The node's own tooltip for the thresholds is explicit about this: "The feature's minimum value will be mapped to this threshold," and likewise for the maximum onto the upper bound.
Inputs and outputs that matter
feature(required) - the curve to convert into a schedulable integer parameter.lower_threshold(-10,000 to 10,000, step 1, default 0) - the integer output the feature's minimum maps to.upper_threshold(-10,000 to 10,000, step 1, default 100) - the integer output the feature's maximum maps to.invert_output- when enabled, inverts the output values so high becomes low and vice versa, per the tooltip.
Output is a single PARAMETER of type INT - wire it into any node's integer input you want to animate per-frame with the underlying feature.
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 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 default upper_threshold of 100 (versus 1 on the float version) is a hint that this node expects a wider target range than the float variant typically gets used with - but it's still worth setting it deliberately rather than trusting the default, since it needs to actually match the valid range of whatever integer parameter you're driving. If you plug this into something with a narrow valid range (say, an index that only goes 0β4) and leave upper_threshold at 100, you'll get out-of-range values that either clamp unexpectedly or error out downstream, depending on how the receiving node validates its input - set the thresholds to match the real bounds of the parameter you're targeting, not the node's defaults. And because the output rounds to whole numbers, two adjacent frames with a small difference in feature value can end up mapping to the exact same integer - expected, but worth knowing if you notice the parameter "sticking" for a few frames at a time rather than changing every frame.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| feature | FEATURE | Input feature to convert into a schedulable parameter | |
| invert_output | BOOLEAN | false | When enabled, inverts the output values (high becomes low and vice versa) |
| lower_threshold | INT | 0-10000β10000 | Minimum integer value for the output parameter. The feature's minimum value will be mapped to this threshold. |
| upper_threshold | INT | 100-10000β10000 | Maximum integer value for the output parameter. The feature's maximum value will be mapped to this threshold. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| PARAMETER | INT | β |