ComfyUI Node

Float Add

Add two decimal numbers in the graph

By jamesWalker55·Created 3 years ago·Updated about a year ago· 215
Float Add
    • FLOAT
    a0.00
    b0.00

    The float version of the pack's integer adder. Two decimal numbers in, their sum out. It's arithmetic as a node, for when a float value in your workflow should be computed rather than typed.

    Floats are the currency of a lot of the interesting knobs: CFG, denoise strength, LoRA weights, scheduler sigmas. So the moment you want one of those to be derived - a base weight plus an offset, a strength that shifts a little each pass, a value driven from somewhere else in the graph - you need to do float math somewhere, and this is the add. Once one input is dynamic, computing the rest beats editing constants by hand every run.

    How it works

    a + b in floating point, float out. No rounding, no surprises. Just addition that preserves the decimals.

    Inputs and outputs

    • a and b - the two floats to add. Both default to 0 and span an enormous range, so you won't hit a limit doing anything sane.

    Output is a single FLOAT, the sum.

    Installing it

    It's in the pack's comfyui_primitive_ops file. Install via ComfyUI Manager (search Various ComfyUI Nodes by Type / comfyui-various) or clone:

    cd ComfyUI/custom_nodes
    git clone https://github.com/jamesWalker55/comfyui-various
    

    Restart ComfyUI. No models, no extra dependencies.

    Common issues

    Nothing breaks here - it adds two floats. Two small things to keep in mind.

    First, keep the inputs floats. Feed an integer into a float socket and you may hit a type mismatch depending on where the value came from; convert with JWIntegerToFloat (same pack) if needed so the types agree.

    Second, this is one operation. Subtracting, multiplying, dividing - those are their own separate nodes (JWFloatSub, JWFloatMul, JWFloatDiv), by design. The pack keeps each op tiny and single-purpose rather than bundling a calculator. That's clean for a quick offset, but if you're assembling a long formula out of ten of these, consider whether an expression-evaluator node from another pack would be less of a spaghetti mess. For a plain "add a bit to this value," though, this is the right amount of tool.

    One practical use worth spelling out: nudging a value by a fixed offset. Say you want to run a few passes where the denoise creeps up a little each time - start from a base float, add a small increment with this node, and feed the result forward. Because the offset lives in the graph instead of in a widget you retype, you can drive it from a counter and let the value march on its own. It's a small thing, but it's the difference between a workflow you babysit and one that just runs.

    And the standard note: if it ever shows up red as missing when you open a shared workflow, the pack just isn't installed - Manager's "Install Missing Custom Nodes" or a clone of the repo fixes it.

    CategoryjamesWalker55

    Inputs (2)

    NameTypeDefaultDescription
    aFLOAT0.00-100000000000000000–100000000000000000
    bFLOAT0.00-100000000000000000–100000000000000000

    Outputs (1)

    NameTypeDescription
    FLOATFLOAT