Nodes/MTB Nodes/Batch Float Fit (mtb)
ComfyUI Node Runs on cloud

Batch Float Fit (mtb)

Remap and ease a float curve into the range you need

By melMass·Created 3 years ago·Updated about a month ago· 723
Batch Float Fit (mtb)
  • values
  • FLOATS
clampfalse
auto_compute_sourcefalse
source_min0.00
source_max1.00
target_min0.00
target_max1.00
easingLinear

Of MTB's whole batch-float family, this is the one that actually makes your animation feel good. Batch Float Fit takes a curve of floats and remaps it from one range to another - like map() in Arduino or Processing - and, crucially, lets you apply an easing function on the way through. So a boring linear 0-to-1 ramp becomes a smooth ease-in-out that accelerates and settles instead of moving like a robot.

You reach for it whenever a curve is in the wrong range or has the wrong feel. Got a normalized 0–1 progress value from Animation Builder and need it to drive a zoom from 1.0 to 1.5 with a gentle start? That's a Fit. Got a noisy signal that needs to sit between −50 and +50 pixels? Also a Fit.

How it works

It rescales each value from a source range [source_min, source_max] into a target range [target_min, target_max], then bends it through the chosen easing curve. If you don't know your source range, auto_compute_source measures it from the data for you. clamp keeps anything outside the source range from overshooting the target.

The inputs and outputs that matter

  • values (FLOATS) - the curve to remap.
  • target_min / target_max - the range you want out. This is usually the point of the node.
  • easing - 22 options: Linear, plus In/Out/InOut variants of Sine, Quart, Cubic, Circ and more. This is where the nice motion comes from - Sine In/Out or Cubic In/Out for smooth starts and stops, the sharper ones for snappier moves.
  • auto_compute_source (default false) - let the node figure out source_min/source_max from the data. Handy when your input range is unknown or varies.
  • source_min / source_max - the input range, if you're setting it manually.
  • clamp (default false) - pin values to the target range so easing can't overshoot.

Output is a FLOATS curve, ready for Batch2d Transform, Auto Pan, or another batch-float node.

How to install it

Via ComfyUI Manager: search MTB Nodes, install, restart. Or manually:

cd ComfyUI/custom_nodes
git clone https://github.com/melMass/comfy_mtb

then restart. No models.

Common issues & troubleshooting

The output is squashed into a tiny range. Your source range is wrong - the node thinks the input spans more (or less) than it really does, so the remap compresses everything. Turn on auto_compute_source and let it measure the actual min/max.

The motion overshoots or jitters at the ends. Some easing curves (the "back" and elastic-style ones, if present) intentionally overshoot. If you don't want that, use clamp, or pick a plain In/Out easing like Sine or Cubic.

Linear still looks robotic. That's linear doing its job. The entire reason this node has 22 easing options is to get away from constant-velocity motion - pick an In/Out variant and the difference is immediate.

Categorymtb/batch

Inputs (8)

NameTypeDefaultDescription
valuesFLOATS
clampBOOLEANfalse
auto_compute_sourceBOOLEANfalse
source_minFLOAT0.00
source_maxFLOAT1.00
target_minFLOAT0.00
target_maxFLOAT1.00
easingCOMBOLinear22 options: Linear, Sine In, Sine Out, Sine In/Out, Quart In, Quart Out, +16

Outputs (1)

NameTypeDescription
FLOATSFLOATS