ComfyUI Node Runs on cloud

Power

DF_Power – ComfyUI Node from Derfuu_ComfyUI_ModdedNodes

By Derfuu·Created 3 years ago·Updated 2 years ago· 455
Power
    • FLOAT
    Value1.00
    Exponent1.00

    DF_Power raises a value to an exponent - Value multiplied by itself Exponent times, as the pack's own description puts it. It's the least frequently needed of Derfuu_ComfyUI_ModdedNodes' basic math nodes, which is saying something in a pack that's already a niche, 2023-era math toolkit for ComfyUI. You won't wire this into a normal workflow; it's here for the cases where a formula genuinely needs exponentiation and not just addition, subtraction, or a ratio.

    The realistic use case is area math. If you're scaling something by a ratio and need the area effect of that scale rather than the linear one - doubling a side length quadruples the area, because area scales with the square of the linear factor - DF_Power with an exponent of 2 gets you there without doing it by hand. It shows up in the same kind of custom scaling chains that DF_Latent_Scale_by_ratio and DF_Conditioning_area_scale_by_ratio live in, computed a step earlier when the ratio being applied needs to account for area rather than a single dimension.

    Inputs and output

    Two required FLOAT inputs:

    • Value - the base
    • Exponent - the power to raise it to

    One output: FLOAT, equal to Value ** Exponent. Non-integer exponents work the way you'd expect from standard floating-point exponentiation (a fractional exponent is effectively a root), so this node can double as a square-root-or-cube-root calculator too if you set Exponent to 0.5 or 0.33 - though the pack also ships a dedicated DF_Square_root node if that's specifically what you want.

    Where it fits

    This is deep-plumbing territory - a node for people building genuinely custom math logic inside a graph, not something you'd add casually. If you're not already chaining several of this pack's math nodes together to compute a derived value, you almost certainly don't need DF_Power. It's most at home a step or two before a scaling node, computing a factor that then feeds into DF_Image_scale_by_ratio, DF_Latent_Scale_by_ratio, or similar.

    Installing

    The pack installs as one unit - there's no way to pull just this node. 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. It's pure Python arithmetic, no models, no unusual dependencies - install is fast and rarely the source of trouble.

    Troubleshooting

    If it doesn't show up in the node search right after installing, restart the server and hard-refresh your browser tab - that fixes the large majority of "installed but not visible" reports, and it's a generic ComfyUI frontend quirk, not specific to this pack.

    Worth knowing about the pack in general: its maintainer has, in the past, removed deprecated nodes outright on updates rather than keeping a legacy-labeled version around, which has broken workflows for people who relied on it heavily over the long term. The core math nodes, DF_Power included, have been stable since the pack's early days and aren't the ones that have historically been pruned - but if you update the pack and an old workflow throws a missing-node error somewhere else in the graph, that maintenance history is the first thing worth checking before assuming your ComfyUI install itself is broken.

    CategoryDerfuu_Nodes/Math

    Inputs (2)

    NameTypeDefaultDescription
    ValueFLOAT1.00
    ExponentFLOAT1.00

    Outputs (1)

    NameTypeDescription
    FLOATFLOAT