ComfyUI Node Runs on cloud

Square root

DF_Square_root – ComfyUI Node from Derfuu_ComfyUI_ModdedNodes

By Derfuu·Created 3 years ago·Updated 2 years ago· 455
Square root
    • FLOAT
    • FLOAT
    Value1.00

    DF_Square_root computes √A, per the pack's own README - one input, and it hands you back the result as not one but two separate FLOAT outputs. That's the one thing about this node that trips people up: every square root technically has two solutions, a positive one and a negative one (since both 3 × 3 and -3 × -3 equal 9), and this node exposes both instead of picking one for you. In practice, almost everyone wants the positive root - it's the one wired into whatever the first output slot is - and the second output is there for the rarer case where the negative solution is actually meaningful to your math. If you're not sure which you need, use the first one.

    Derfuu_ComfyUI_ModdedNodes, the pack this comes from, is a math-and-utility grab bag that's been part of ComfyUI since 2023 - Sum, Subtract, Power, trig functions, string tools, all built as one node per operation rather than a single expression evaluator. Square root specifically doesn't come up often in a typical generation workflow; it's more likely to show up in a custom scaling calculation, since the inverse of "squaring a ratio for area" (which is what DF_Power with exponent 2 gets you) is taking a square root to go from an area factor back to a linear scale factor.

    Input and outputs

    One required FLOAT input:

    • Value

    Two FLOAT outputs, both computed from the same square root - wire whichever one your math actually calls for, but default to the first slot unless you specifically need the negative solution.

    One practical note: square roots of negative numbers aren't real numbers, so if Value can come out negative from earlier math in your graph, you'll want to check that before it hits this node - pair it with DF_Absolute_value upstream if there's any chance of a negative input you didn't intend.

    Where it fits

    This is a niche building block for people constructing custom math chains, most likely around area-to-length conversions in a scaling calculation - not something you'd reach for in a normal workflow. If your graph doesn't already lean on several of this pack's other math nodes, you're unlikely to need this one specifically.

    Installing

    The whole pack installs together - there's no way to pull a single node out of it. Through ComfyUI Manager: search Derfuu_ComfyUI_ModdedNodes, install, restart ComfyUI. Manually:

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

    then restart. Pure Python arithmetic, no models, no unusual dependencies - install is quick and low-risk.

    Troubleshooting

    If DF_Square_root doesn't appear in the node search right after installing, restart the ComfyUI server and hard-refresh your browser tab - that resolves the large majority of "installed but not showing up" cases, 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 keeping a legacy-labeled version around, which has broken workflows for people who relied on the pack heavily. The core math nodes have been stable since the pack's early days and aren't the ones that have historically been pruned, but if an old workflow throws a missing-node error elsewhere after you update the pack, that maintenance history is the first thing worth checking before assuming your ComfyUI install itself is broken.

    CategoryDerfuu_Nodes/Math

    Inputs (1)

    NameTypeDefaultDescription
    ValueFLOAT1.00

    Outputs (2)

    NameTypeDescription
    FLOATFLOAT
    FLOATFLOAT