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

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

Change how a curve responds, not just its range

By ryanontheinsideΒ·Created 2 years agoΒ·Updated 5 months agoΒ· 852
Feature Scaler βš‘πŸ…‘πŸ…žπŸ…£πŸ…˜
  • feature
  • FEATURE
β—„scale_typeβ–Ύβ–Ί
β—„min_output0.00β–Ί
β—„max_output1.00β–Ί
β—„exponent2.0β–Ί
β—„invert_outputfalseβ–Ί

Remapping a feature's range is one thing; changing the character of its response is another. Feature Scaler does the second: instead of a straight linear stretch, you can pick a scaling curve - logarithmic, exponential, or inverse - that changes how the input value maps to the output, on top of setting the output's min and max.

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

scale_type picks the response curve: linear is the default straight mapping - no reshaping, just min/max remapping. exponential makes the top end of the range hit harder relative to the bottom, so punchy peaks feel punchier and quiet variation near zero gets compressed together - good when you want the biggest hits to dominate visually. logarithmic does roughly the opposite: it compresses the loud end together and stretches out detail in the quiet end, useful if a feature's interesting movement is happening in the low values and you want that to read more clearly. inverse flips the response direction across the curve rather than just inverting the output value (which is what invert_output does separately). exponent only matters for exponential scaling - it's the power the curve is raised to, with higher values making the exponential curve steeper.

Inputs and outputs that matter

  • feature (required) - the curve to reshape.
  • scale_type - linear, logarithmic, exponential, or inverse.
  • min_output / max_output (0.0–1.0, defaults 0/1) - the output range after scaling.
  • exponent (0.1–10, default 2) - the power used for exponential scaling; ignored for the other scale types.
  • invert_output - flips the final result, independent of scale_type.

Output is a single FEATURE, wired into a Flex node's optional feature input or into 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 one that catches people: switching scale_type to exponential and then wondering why nothing changed, because they left exponent at its default of 2 while expecting a dramatic effect - 2 is a fairly mild curve. Push it toward the higher end of its 0.1–10 range if you want an exponential response that visibly emphasizes peaks over the rest of the range. And don't confuse scale_type: inverse with invert_output - they're not the same operation, and it's possible to end up with a doubly-flipped curve if you turn both on without checking what the result actually looks like against a Feature Info Node.

CategoryRyanOnTheInside/FlexFeatures/FeatureModulators

Inputs (6)

NameTypeDefaultDescription
featureFEATUREInput feature to be processed
scale_typeCOMBOType of scaling to apply ("linear", "logarithmic", "exponential", "inverse")
min_outputFLOAT0.000–1Minimum output value after scaling (0.0 to 1.0)
max_outputFLOAT1.000–1Maximum output value after scaling (0.0 to 1.0)
exponentFLOAT2.00.1–10Exponent for exponential scaling (0.1 to 10.0)
invert_outputBOOLEANfalseβ€”

Outputs (1)

NameTypeDescription
FEATUREFEATUREβ€”