ComfyUI Node Runs on cloud

Sum

A + B, the simplest node in the pack

By Derfuu·Created 3 years ago·Updated 2 years ago· 455
Sum
    • FLOAT
    Value_A1.00
    Value_B1.00

    Sum adds two numbers. Value_A + Value_B, output as a float - genuinely the whole node, and probably one of the most-used ones in Derfuu_ComfyUI_ModdedNodes, a math-and-utility pack that's been around since ComfyUI's early days in 2023. If you've opened an older workflow and found some odd-looking arithmetic wired in - an offset added to a computed width, two calculated sizes combined before a resize node - there's a decent chance a node exactly like this one is doing that quiet work.

    The pack also has DF_Sum, doing the identical job under the current DF_-prefixed convention. This bare Sum is the older name; both compute the same thing, so if you inherited a workflow with this one, there's no reason to swap it out.

    How it works

    Straight addition, nothing else. No rounding, no clamping - if you need a whole number afterward, that's what this pack's Ceil or Floor nodes are for.

    The inputs and outputs that matter

    Two required inputs, both FLOAT:

    • Value_A
    • Value_B

    One output: FLOAT, equal to Value_A + Value_B.

    Where it fits

    Sum exists because, for a long stretch of ComfyUI's history, there wasn't a clean built-in way to do arithmetic on a value mid-graph. If you needed "this width plus 64" and the 64 wasn't something you could just type into a fixed widget, you needed a node - and Sum, Subtract, Divide and friends became the default toolkit. It's more wiring than a modern expression-evaluator node (rgthree's Power Puter does the same job with a typed formula in one node), but the upside is every intermediate value in a calculation stays visible and inspectable on the canvas, which is genuinely nice when a downstream size comes out wrong and you need to find where.

    You'll typically see it right after a couple of computed values, or after Get image size / Get latent size, adding a fixed padding amount or combining two dynamically-computed numbers before they feed into an image resize, a latent size, or a conditioning area calculation.

    How to install it

    The pack installs as a single unit - no way to grab just this node. ComfyUI Manager: search Derfuu_ComfyUI_ModdedNodes, install, restart. Manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Derfuu/Derfuu_ComfyUI_ModdedNodes
    

    then restart. Plain Python arithmetic - no models, no unusual dependencies, so install is fast and rarely the thing that goes wrong.

    Common issues & troubleshooting

    Not showing up right after install. Restart the server and hard-refresh the browser tab - clears up the large majority of "installed but not visible" reports, and it's a generic ComfyUI frontend quirk, not specific to this pack.

    Result isn't the whole number you expected. Output is FLOAT. Chain Ceil, Floor, or Integer (also in this pack) afterward if the next node wants an INT.

    Node missing after a pack update. Worth flagging generally: Derfuu has, in the past, removed deprecated nodes outright rather than leaving a legacy version in place, and long-time users of the pack have called that out directly. The basic math nodes - Sum included - have been stable fixtures since the beginning and aren't the ones that have historically disappeared, so this is more "know the pattern exists" than a specific warning here. If an old workflow throws a missing-node error elsewhere after an update, that maintenance history is the first thing worth checking.

    CategoryDerfuu_Nodes/Math

    Inputs (2)

    NameTypeDefaultDescription
    Value_AFLOAT1.00
    Value_BFLOAT1.00

    Outputs (1)

    NameTypeDescription
    FLOATFLOAT