Nodes/MTB Nodes/Curve To Float (mtb)
ComfyUI Node Runs on cloud

Curve To Float (mtb)

Sample a hand-drawn curve into usable numbers

By melMass·Created 3 years ago·Updated about a month ago· 721
Curve To Float (mtb)
  • curve
  • FLOATS
  • FLOAT
steps10

A FLOAT_CURVE - the type MTB's Curve node produces - isn't directly usable by most of the pack's other nodes. It's a drawn shape, not a list of numbers. Curve To Float is the bridge: it samples that curve at a chosen resolution and hands back the plain FLOATS list that things like Batch Time Wrap actually consume.

What it does

You give it a FLOAT_CURVE and a steps count, and it walks along the curve at steps evenly-spaced points, returning the values it finds as a FLOATS list - the same currency Batch Float produces from a preset easing function instead of a hand-drawn shape. Whichever of the two you used to build your curve, everything downstream that wants a per-frame value list (Batch Time Wrap's curve input, a per-frame schedule, anything expecting one number per frame) treats the output the same way.

The inputs and outputs that matter

  • curve (FLOAT_CURVE, required) - the drawn curve to sample, typically straight from MTB's Curve node.
  • steps (default 10, min 2) - how many points to sample along the curve. Match this to however many frames you actually need the curve to cover.

It returns two things: FLOATS, the sampled list at steps resolution, and a single FLOAT alongside it - for cases where you need just one number off the curve rather than the whole sampled list.

Installing it

ComfyUI Manager: search MTB Nodes, install, restart. By hand:

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

then restart ComfyUI. No models - this is straightforward numeric sampling.

Common issues

Because the curve input depends on MTB's Curve node, and that node is marked work-in-progress by the pack itself, anything strange about the values you're sampling here is worth chasing back to how the curve was drawn before assuming Curve To Float is doing the wrong math. If you don't strictly need a hand-drawn shape, Batch Float's preset easing dropdown is a more stable way to get a FLOATS list with a known, well-defined shape.

The other easy mistake: steps set lower than the number of frames you actually need downstream leaves you interpolating or reusing values to fill the gap, depending on what consumes the list - set steps to match your real frame count from the start rather than adjusting it after the fact.

And the pack-wide caveat that applies to every mtb node: it logs [comfy_mtb] Some nodes (N) could not be loaded at startup instead of crashing outright, with a pointer to http://127.0.0.1:8188/mtb for the real cause - a real, confirmed behavior from other users' install logs. Check that line first if this node doesn't show up after installing the pack.

Categorymtb/curve

Inputs (2)

NameTypeDefaultDescription
curveFLOAT_CURVE
stepsINT10

Outputs (2)

NameTypeDescription
FLOATSFLOATS
FLOATFLOAT