ComfyUI Node

Float Exact

For numbers the sliders won't let you type

By nova452·Created 3 months ago·Updated a day ago· 524
Float Exact
    • FLOAT
    ◄value0►

    A float node that accepts a range of ±10^18 is not pretending the range is useful. It's saying "type whatever number you want and I'll pass it through unchanged." That's the actual job here, and it's a real gap in ComfyUI's stock plumbing.

    What it's for

    Same pitch as any typed primitive: right-click a numeric widget, Convert widget to input, wire a node into it, and now that value has one authoritative source instead of being retyped on six samplers. Core ships PrimitiveFloat for this. Float Exact is the pack's version, and it's the one you pick when the number you need doesn't fit a slider's window - negative strengths, model-merge multipliers, scale factors near zero, a constant copied out of a paper or a config that expects to survive the trip intact.

    Where it earns its keep beyond that is the value it hands downstream. It rounds to ten decimals on the way out. ComfyUI widgets work in binary float math, so 0.30 can reach a node as 0.30499999999999994.

    return (round(value, 10),)
    

    If you've ever A/B'd two supposedly identical runs, seen a different result, and concluded the sampler was non-deterministic - this, or something like it, is often the actual cause. Ten decimal places is far more precision than diffusion math needs, and it's the smallest amount that reliably de-noises the artifacts without touching anything you meant to send.

    Inputs and outputs

    • value - FLOAT, default 0.0, min: -1e18, max: 1e18, step 1e-10.
    • FLOAT - the output socket, a single float. Feed it into any converted float input: CFG, denoise, a LoRA strength, a merge ratio, a scale.

    No optional inputs, no other outputs. The node is two lines of Python and the interface matches.

    Installing it

    Part of the Rebalance Pack - one clone covers this and every other node in it.

    cd ComfyUI/custom_nodes
    git clone https://github.com/nova452/Rebalance-Pack.git
    # restart ComfyUI
    

    Manager route: search Rebalance Pack, publisher nova452. The repo was renamed from ComfyUI-ConditioningKrea2Rebalance (that's the name in most links and, weirdly, in this node's own package path), so old URLs still work. Zero dependencies beyond what ComfyUI already installs, and no model files.

    Where it bites

    The step size makes the arrows useless. 1e-10 is what the spinner and arrow keys advance by. Clicking up does nothing you can see. Type the number, or drag the slider for coarse moves and then edit the field - which is fine, but it surprises people who expect the widget to behave like a normal float field. If you want a friendly dial with a fixed window, use Float 10.00 or Float 1.00 from the same pack.

    It's still just a float. Nothing here validates your number against what the downstream node wants. Typing 12 for CFG works fine and produces whatever CFG 12 produces on a CFG-3.5 model. The ±10 node is the one with the guardrail; this one has none, on purpose.

    Pick one or the other, per value. Float 10.00 clamps and rounds to two decimals; Float Exact doesn't clamp and rounds to ten. Wiring Float Exact into a widget that expects a 0.01 grid gets you a value the UI can't render properly, and wiring Float 10.00 into something that needs 0.125 gets you 0.13. Neither is wrong - using the wrong one for a given dial is.

    CategoryRebalance-Pack/foundational

    Inputs (1)

    NameTypeDefaultDescription
    valueFLOAT0-1000000000000000000–1000000000000000000—

    Outputs (1)

    NameTypeDescription
    FLOATFLOAT—