Nodes/ComfyUi-MpiNodes/Mpi Expo Float
ComfyUI Node

Mpi Expo Float

Reshape a 0–1 value with a power curve

By MadPonyInteractive·Created 11 months ago·Updated 5 days ago· 3
Mpi Expo Float
    • value
    value1.00
    exponent2.00

    A lot of ComfyUI knobs are 0–1 floats, and a lot of the time you want to reshape that range rather than just scale it. MpiExpoFloat is the one-liner for exactly that: it takes a 0–1 value, raises it to a power, and clamps the result back to [0, 1]. It's a gamma curve in a single node - one of those tiny math helpers that quietly does a disproportionate amount of work in scheduling and easing setups.

    How it works

    value in, exponent in, value ^ exponent out - clamped to [0, 1] so it stays a legal 0–1 float no matter what. The shape of that curve is the whole game:

    • exponent > 1 (default 2): the curve bows down. Small values get pushed toward zero, so a mid-range input like 0.5 becomes 0.25. Use this to make a "denoise-ish" 0–1 value spend more of its time near the bottom.
    • exponent < 1: the curve bows up. Small values get lifted - 0.25 becomes 0.5. Use this to brighten or promote the low end.
    • exponent = 1: identity. The node is transparent.

    The value input defaults to 1 and clamps to 0–1 on entry; exponent ranges 0.01–10. Output is the reshaped value.

    Where you'd actually use it

    The practical use is shaping strengths that have no business being linear. Think of a value that should spend most of its range "low" - say an effect strength that only really bites near the top of the slider. Raise it to 2 or 3 and the first half of the range does almost nothing, the top does everything. Conversely, if a control feels dead until you push it to 0.9, an exponent under 1 spreads that responsiveness across the whole range. It's the same move photographers know as gamma: one number, and the perceived response changes completely.

    If you're building animated or scheduled strength ramps - a value that sweeps 0→1 over a run - dropping MpiExpoFloat on the sweep gives you an ease-in/ease-out for free, without touching whatever node drives the ramp.

    Where people get burned

    Remember the clamp. Because the output is forced to [0, 1], an exponent below 1 doesn't expand the range - 0.25^0.5 is 0.5, fine - but nothing can exceed 1, so a "brighter" curve saturates rather than overshooting. If you need values above 1, this isn't the node; you want plain math. Also: the exponent is a single knob, not a lookup table - if you need a curve with an inflection (S-curves, easing functions with overshoot), you're into MpiMath territory instead.

    Install

    From the MadPonyInteractive/ComfyUi-MpiNodes pack. ComfyUI Manager → search ComfyUi-MpiNodes (publisher mad-pony-interactive), install, restart. Or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/MadPonyInteractive/ComfyUi-MpiNodes
    

    then restart. Zero dependencies, no model files - it's a power function. The pack is AGPL-3.0 (≤ 1.2.6 MIT) and is the node library behind the author's Cubric Vision app.

    The verdict

    It's one exponent slider, and it's the rare math node you'll reach for more than you expect. Any control that feels "dead in the middle" or "too hot at the top" is a candidate. If you schedule strengths or build easing ramps at all, this is the simplest shaping tool in the box.

    CategoryMpiNodes/Math

    Inputs (2)

    NameTypeDefaultDescription
    valueFLOAT1.000–1
    exponentFLOAT2.000.01–10

    Outputs (1)

    NameTypeDescription
    valueFLOAT