Nodes/Sage Utils/Percentage To Float
ComfyUI Node

Percentage To Float

Your 0–100 dial, converted to the 0.0–1.0 the nodes actually want

By arcum42·Created 2 years ago·Updated 28 days ago· 33
Percentage To Float
    • float_value
    percentage0.00

    Two different scales, same slider, and everyone has tripped on it. When you're picking a denoise strength, an IP-Adapter weight, or a blending factor, a lot of nodes want 0.0 to 1.0. But the setting that lives in your head - and in half the UIs you've used - is a percentage, 0 to 100. Wire 35 into a socket that means 0.35 and you're silently running 100x the strength you wanted.

    Percentage To Float exists to make that conversion a named, obvious thing instead of a "did I divide by 100 this time?" gamble.

    How it works

    It's one line under the hood: float_value = percentage / 100.0. Input percentage (a float, 0 to 100, default 0) becomes output float_value (0.0 to 1.0). That's the entire mechanism, and that's fine - the value of the node isn't the math, it's that the conversion is explicit and readable in your graph.

    You'd think ComfyUI would have this built in, but the primitive/number tooling has historically been bare-bones, which is why utility packs keep shipping these. The Sage Utils philosophy here is the same as everywhere else in the pack: give the fiddly conversion a dedicated node so a workflow reads like intent, not arithmetic.

    When it's worth using

    • Hooking a human-readable "35%" slider up to a node that expects a fraction - denoise strength, blend weights, adapter strengths.
    • Building metadata or prompt text where you want the percentage and the fraction to agree.
    • Anywhere you're composing values through other utility nodes and don't want a mystery /100 buried in a formula string.

    Honest talk: if you're comfortable with the division and never mix the scales up, you don't need this node. But "I mixed the scales up" is a remarkably common failure mode, and a named node in the middle of the wire makes the intent explicit for the next person (or future-you) reading the graph.

    Inputs and output

    • percentage - float, 0–100, default 0.
    • float_value - the normalized 0.0–1.0 result.

    Nothing optional, nothing hidden. It's as thin as a utility node gets.

    Installation

    Sage Utils install, same as the rest of the pack. ComfyUI Manager, search "Sage Utils", or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/arcum42/ComfyUI_SageUtils
    cd ComfyUI_SageUtils
    pip install -r requirements.txt
    

    Restart ComfyUI. Only dependency is dynamicprompts; no models, no extra compute.

    A small thing to keep in mind: the widget clamps to 0–100, so you can't accidentally type 150 and get a nonsense 1.5 - the value is always a real percentage when it leaves the input. The node's job starts after that.

    CategorySage Utils/util

    Inputs (1)

    NameTypeDefaultDescription
    percentageFLOAT0.000–100Percentage value to convert into a normalized float.

    Outputs (1)

    NameTypeDescription
    float_valueFLOATConverted normalized float value from the input percentage.