ComfyUI Node Runs on cloud

Sum

DF_Sum – ComfyUI Node from Derfuu_ComfyUI_ModdedNodes

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

    DF_Sum adds two numbers together. That's genuinely the whole node - A + B, output as a float - and it's probably the single most-used node in Derfuu_ComfyUI_ModdedNodes, a math-and-utility pack that's been around since ComfyUI's early days in 2023. If you've downloaded an older workflow and it has some odd-looking arithmetic wired into it (adding an offset to a calculated width, combining two computed sizes before they hit a resize node), there's a decent chance a DF_Sum is doing that quiet work somewhere in the graph.

    The reason a node this trivial exists at all is that ComfyUI, for a long time, didn't have 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 a fixed number you could just type into a widget, you needed a node - and DF_Sum, DF_Subtract, DF_Divide and friends became the default toolkit people reached for. It's one operation per node, which is more wiring than a modern expression-evaluator node (rgthree's Power Puter does the same job in one node with a typed formula), but it also means every intermediate value in your calculation is visible and inspectable on the canvas, which is genuinely nice when you're debugging why a downstream size came out wrong.

    Inputs and output

    Two required inputs, both FLOAT:

    • Value_A
    • Value_B

    One output: FLOAT, equal to Value_A + Value_B. No rounding, no clamping - if you need a whole number afterward, that's what DF_Ceil or DF_Floor (also in this pack) are for.

    Where it fits

    You'll typically find DF_Sum wired right after a couple of other calculated values, or after a DF_Get_image_size / DF_Get_latent_size node, adding a fixed padding amount or combining two dynamically-computed numbers before they feed into something like an image resize, a latent size, or a conditioning area calculation. It's not a node you add for its own sake - it's the connective piece that lets a workflow do "read this size, do some arithmetic on it, use the result" without hardcoding numbers.

    Installing

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

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

    then restart ComfyUI. It's plain Python arithmetic under the hood - no models, no unusual dependencies - so the install is fast and rarely the thing that goes wrong.

    Troubleshooting

    If it's not showing up in the node search right after installing, restart the server and hard-refresh your browser tab - that clears up the vast majority of "installed but not visible" reports, and it's a generic ComfyUI frontend quirk rather than anything specific to this pack.

    Worth knowing about the pack generally: its maintainer has, in the past, removed deprecated nodes outright on updates instead of leaving a legacy version in place, and people who've relied on the pack for a while have called that out directly. The basic math nodes - Sum included - have been stable fixtures of the pack since the beginning and aren't the ones that have historically disappeared, so this is more a "know the pattern exists" note than a specific warning about DF_Sum itself. If an old workflow throws a missing-node error somewhere else after you 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