ComfyUI Node

RAMP

The textbook ramp function, one float in and out

By aria1th·Created 3 years ago·Updated 7 months ago· 119
RAMP
    • FLOAT
    input1

    RAMP is about as minimal as this pack gets: one FLOAT in, one FLOAT out, no widgets, no seed, nothing else in the schema to configure. Going by the name and the shape of the node - a single numeric input with no extra parameters - this is almost certainly the standard math/DSP "ramp function": negative input clamps to zero, positive input passes through unchanged (the same shape as ReLU, if you know that term from neural networks - it's the same curve, just a much older name for it). The pack's README doesn't spell out the exact formula, so take that as the well-grounded, name-and-shape-consistent read rather than a guarantee down to the exact edge-case behavior.

    Part of aria1th's ComfyUI-LogicUtils, a personal utility pack from the trainer behind Illustrious XL - mostly small math and logic building blocks meant to be composed together rather than used in isolation.

    Why you'd reach for it

    A ramp is the simplest possible "floor at zero" clamp: useful anywhere you're computing a numeric value that should never go negative - a strength multiplier, an interpolation factor, a weight derived from some other calculation that could technically dip below zero but shouldn't in practice. Instead of chaining a max/min node or reaching for a Python-expression node just to floor a value, this is a one-node version of that specific, common clamp.

    How it works

    Takes input1 and returns the ramp-clamped result: values at or above zero come out unchanged, values below zero come out as zero. There's no upper bound in this shape - unlike a full clamp node, a plain ramp function only floors the low end, it doesn't cap the high end.

    Inputs and outputs

    • input1 (FLOAT, required) - the value to pass through the ramp function.
    • Output: FLOAT - the result: input1 if non-negative, 0 if negative.

    How to install it

    ComfyUI Manager: search "ComfyUI-LogicUtils", install, restart. Manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/aria1th/ComfyUI-LogicUtils
    

    then restart ComfyUI. No models or heavy dependencies - a trivial CPU-side calculation.

    Common issues & troubleshooting

    "Missing node type" on a shared workflow. ComfyUI Manager's "Install Missing Custom Nodes" installs the whole pack from the graph JSON.

    Import error at startup. The README documents an opt-in dependency auto-installer for the pack: COMFYUI_LOGICUTILS_AUTO_INSTALL=1 before launch to install what's needed, or COMFYUI_LOGICUTILS_SKIP_INSTALL=1 to disable that hook if it's the actual issue. RAMPNode needs nothing beyond built-in Python arithmetic.

    Expected an upper clamp too, and it's not capping high values. That's expected if this is the plain ramp function - it only floors negative values to zero, it doesn't cap a maximum. If you need both a floor and a ceiling, you'll want to chain this with another clamp/min node, since RAMPNode's schema exposes no second bound to configure.

    Output looks identical to the input. Normal, if every value you're feeding it is already non-negative - the ramp function is a no-op for anything at or above zero. It only changes behavior for negative inputs.

    CategoryMath

    Inputs (1)

    NameTypeDefaultDescription
    input1FLOAT

    Outputs (1)

    NameTypeDescription
    FLOATFLOAT