Nodes/ComfyUI-Keyframed/Constant-Valued Curve
ComfyUI Node

Constant-Valued Curve

The boring node your curve math is secretly built on

By dmarx·Created 3 years ago·Updated 2 years ago· 92
Constant-Valued Curve
    • KEYFRAMED_CURVE
    value

    Constant-Valued Curve is the node that looks pointless until you try to do arithmetic on curves, at which point it becomes the thing you reach for constantly. It takes a single number and returns a curve that evaluates to that same value at every point in time. No keyframes to fight, no interpolation to surprise you - just a flat line.

    Why does that matter? Because the whole trick of this pack is that you can add, subtract, and multiply entire curves together, and flat lines are the neutral values those operations are built on. Want to scale every weight in a schedule by half? Multiply the whole thing by a constant curve of 0.5 rather than re-entering every value. Need a floor under a curve that dips to zero? Add a constant curve of 0.1. The README's "simple curved parameter" example is exactly this: a curve multiplied by a constant to turn it into a usable weight.

    How it works

    Mechanically it's one line: kf.Curve(value) from the keyframed library, which creates a curve that returns the same value for any t. That's the entire implementation, and it's why this node is so dependable - there are no timestamps, no easing functions, no edge cases. It's the curve equivalent of the number 1, which is exactly what makes it useful.

    The input

    Just the one: value (FLOAT). Note it's marked forceInput, which means you can wire a number in from elsewhere in the graph (like the FLOAT output of an Evaluate Curve At T node) instead of typing it. That's the beginning of building curves that react to other curves - a constant baseline that shifts based on something else in your workflow.

    The output

    KEYFRAMED_CURVE - feed it into any of the pack's curve operators (Curve_1 + Curve_2, Curve_1 * Curve_2, and so on), into Apply Curve to Conditioning, or into a Parameter Group to tag along as a static label.

    How to install it

    It's part of ComfyUI-Keyframed, so one install covers it. ComfyUI Manager → search ComfyUI-Keyframed, or clone manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/dmarx/ComfyUI-Keyframed
    

    then restart ComfyUI. No model downloads. The pack's one real dependency is the keyframed library (plus toolz), auto-installed on first import if missing.

    Gotchas

    Not much to trip on here - it's the most forgiving node in the pack. One habit worth forming: when you use a constant curve as a multiplier, remember a value of 1.0 is the identity. If your multiplied curve mysteriously collapses to nothing, check that you didn't leave a 0 in the box; it's embarrassingly common and there's no error message, just silence.

    Categorykeyframed

    Inputs (1)

    NameTypeDefaultDescription
    valueFLOAT

    Outputs (1)

    NameTypeDescription
    KEYFRAMED_CURVEKEYFRAMED_CURVE