Nodes/comfyui-AGSoft/🔢AGSoft Float
ComfyUI Node

🔢AGSoft Float

A float constant you can round, and not a widget more

By Art-xmaster·Created 12 months ago·Updated a day ago· 23
🔢AGSoft Float
    • float
    value0.00
    precision2

    Some nodes exist to make your graph cleaner, not to do math. 🔢 AGSoft Float is that kind: a plain float constant - type a number, get that number out as a FLOAT value you can wire anywhere a numeric input lives. ComfyUI already lets you type numbers into widget fields, so why bother? Because a constant as a node can be shared across ten inputs and changed in one place. Adjust one node, and every CFG, denoise, and strength input wired to it moves together.

    It's the float half of the pack's Math family (the integer version is AGSoft Integer), and it does exactly what it says on the tin.

    How it works

    Two inputs: value (the number, range −1,000,000 to 1,000,000) and precision (how many decimal places it keeps - 1 or 2, default 2). The precision option is the small flourish that makes this more than a wire-through: you can force a value like 3.14159 down to 3.14 at the source, so every consumer downstream sees the same rounded number, instead of each widget rounding differently. The single output is float, which is your constant.

    That's the whole node. There's nothing clever happening under the hood - it's a constant generator with a rounding control, built for graph hygiene.

    Why you'd use it

    Three honest scenarios. Parameter sweeps: wire one AGSoft Float into CFG and one into denoise, then tweak both from a single spot while testing. Consistency across a graph: you want the same strength value in three places - a constant node guarantees they never drift apart when you edit. Feeding widgets that insist on inputs: some nodes take FLOAT inputs rather than widgets, and a constant node is the natural source.

    The trap to avoid is expecting more: it won't compute anything, won't clamp, won't animate. If you need math, the pack's AGSoft Math Expression node is the one with actual brains; this one just holds a number still.

    Installing it

    Pack standard: ComfyUI Manager → search comfyui-AGSoft → install, restart. Or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Art-xmaster/comfyui-AGSoft.git
    

    No models, no dependencies - it's a few lines of Python.

    Common issues

    There's very little to break. The one thing that catches people: precision rounds, it doesn't clamp - a value of 1.005 at precision 2 will round per Python's banker's rounding, which can look like off-by-a-hair compared to your hand math. If a downstream node reports a value that differs slightly from what you typed, that's precision doing its job, not a bug. And remember, rounding happens at the output - if you later change precision, every downstream consumer sees the new value immediately, which is either the feature you wanted or a reason to keep precision pinned.

    CategoryAGSoft/Math

    Inputs (2)

    NameTypeDefaultDescription
    valueFLOAT0.00-1000000–1000000RU: Число с плавающей точкой. Диапазон от -1,000,000 до 1,000,000. EN: Floating point number. Range from -1,000,000 to 1,000,000. Пример: 3.14, -0.5, 2.71828
    precisionCOMBO2RU: Количество знаков после запятой (1 или 2). EN: Number of decimal places (1 or 2). Пример: 2 → 3.14, 1 → 3.1

    Outputs (1)

    NameTypeDescription
    floatFLOAT