ComfyUI Node

AD_sch_value

Turn a number into an eased curve over time

By cardenluo·Created 2 years ago·Updated 17 days ago· 309
AD_sch_value
    • data
    • graph
    values0:0.5 @Sine_In@ 30:1 60:0.5 90:1 120:0.5
    easing_typeLinear
    max_length120
    scale_factor1.00
    offset0.00

    This is AD_sch_prompt_stack's sibling, minus the text - instead of scheduling prompts across frames, it schedules a single number. ControlNet strength that ramps up over the first second, IPAdapter weight that eases out toward the end, a CFG value that breathes - anything a downstream node takes as a float can, in theory, be driven by a curve out of this node instead of a static slider.

    The syntax mirrors the prompt-stack node on purpose: one keyframe per line, frame:value @EasingCurve@. The default example is 0:0.5 @Sine_In@, 30:1, 60:0.5, 90:1, 120:0.5 - a value that eases up, holds, drops, rises, drops again, over 120 frames. Same 23 Penner easing curves as its sibling (Linear plus Sine/Quart/Cubic/Circ/Back/Elastic/Bounce, each In/Out/InOut), same idea: instead of a value snapping between keyframes, it accelerates or decelerates into each one, which is what makes a scheduled parameter look intentional instead of stepped.

    Where it earns its keep over the prompt-stack node is the two extra dials: scale_factor and offset. scale_factor multiplies the whole curve (default 1, range 0.001–1000) and offset shifts it up or down (default 0, range -1000 to 1000) - so you can author one clean 0-to-1 curve in the values field and then reuse it at different magnitudes for different targets, rather than rewriting the schedule every time you want the same shape at a different scale. max_length caps the schedule length the same way it does on the prompt-stack node, defaulting to 120 frames.

    The outputs are the actual reason to reach for this over hand-animating values: you get data (a wildcard-typed output - the raw schedule, wire it into whatever accepts a per-frame value stream) and graph, an IMAGE output that renders the curve as a visual plot. That second output is a genuinely nice touch for a node like this - you can preview exactly what your easing curve looks like before you commit GPU time to a full render, instead of guessing whether Elastic_Out is going to overshoot more than you wanted.

    Where this fits: it's the general-purpose version of the audio-reactive, keyframe-driven schedule that a chunk of the AnimateDiff-era community still uses deliberately for morphing, organic-feeling motion - the kind of workflow that drives ControlNet strength or motion amount off a curve rather than a flat number. If you're doing that style of work, AD_sch_value is your curve editor; pair it with Amp_audio_Normalized (also in this pack) if you want the curve driven by actual audio rather than hand-typed keyframes.

    Installing it: through ComfyUI Manager (search "ComfyUI-Apt_Preset"), or manually - cd ComfyUI/custom_nodes && git clone https://github.com/cardenluo/ComfyUI-Apt_Preset, then run install.bat and restart. Nothing model-related to download for this specific node.

    Troubleshooting: the data output being typed * (wildcard) is convenient for wiring but means ComfyUI won't stop you from connecting it somewhere that doesn't actually know how to consume a schedule - if a downstream node just shows a static/wrong value, check that it's actually built to accept a per-frame stream and not just a plain float. And as with the prompt-stack sibling, watch your syntax: a line that doesn't match frame:value (or a curve name that isn't one of the 23 listed) is more likely to quietly misbehave than to throw a clear error, so preview with the graph output before trusting the curve.

    CategoryApt_Preset/AD/😺backup

    Inputs (5)

    NameTypeDefaultDescription
    valuesSTRING0:0.5 @Sine_In@ 30:1 60:0.5 90:1 120:0.5
    easing_typeCOMBOLinear23 options: Linear, Sine_In, Sine_Out, Sine_InOut, Sin_Squared, Quart_In, +17
    max_lengthoptINT1200–100000
    scale_factoroptFLOAT1.000.001–1000
    offsetoptFLOAT0.00-1000–1000

    Outputs (2)

    NameTypeDescription
    data*
    graphIMAGE