ComfyUI Node

sch_Value

Schedule a Number (CFG, Strength, Denoise) Across Frames

By cardenluo·Created 2 years ago·Updated 17 days ago· 309
sch_Value
    • INT
    • FLOAT
    • weight
    • length
    scheduleframe_number@value
    current_frame0
    easing_type

    Same engine as sch_Prompt and sch_text, but for numbers instead of text. Write a list of frame@value pairs, tell it which frame you're on, and it hands back the interpolated number - eased by the same 23-curve set the other schedule nodes use. Ramp a ControlNet's strength up across a sequence, fade a LoRA's weight in and out, drop CFG over the back half of a render - anything that's normally "a number that should change over time" without you writing the interpolation math by hand.

    Inputs

    • schedule - multiline string of frame_number@value pairs. Default placeholder is frame_number@value; a real one might read [email protected] on the first line and [email protected] on the next, ramping a value from 8 down to 4 across 60 frames.
    • current_frame - the frame you're currently rendering.
    • easing_type - the same Penner-derived easing set as sch_Prompt and sch_text. Counting what the schema exposes, it lines up with the classic web/game-animation suite: Linear, plus Sine/Quad/Cubic/Quart/Quint/Expo/Circ each in In/Out/InOut flavors, plus one extra Sin_Squared curve - 23 in total. Linear moves at a constant rate; the rest accelerate or decelerate the ramp instead.

    Outputs

    Four of them, all describing the same interpolated point:

    • INT - the value, truncated to an integer.
    • FLOAT - the value, full precision.
    • weight - the raw eased blend fraction (roughly 0 to 1) between the surrounding keyframes, useful if you want to drive something else proportionally rather than use the interpolated value directly.
    • length - how many keyframes your schedule parsed into, handy for sanity-checking that your frame@value lines actually got read.

    The one thing to watch

    If you need fractional precision - denoise strength, LoRA weight, anything under 1.0 - wire the FLOAT output, not INT. The INT output truncates, so a schedule ramping denoise from 0.8 to 0.3 will read as a flat 0 the whole way through on that socket.

    Install

    Search "ComfyUI-Apt_Preset" in ComfyUI Manager and install, or by hand: cd ComfyUI/custom_nodes && git clone https://github.com/cardenluo/ComfyUI-Apt_Preset.git, then restart ComfyUI. The pack ships an install.bat for its Python dependencies - that's Windows-only, so on Linux or a cloud box either read what it installs and pip-install those packages yourself, or let ComfyUI Manager's "install missing nodes" flow do it the first time you load a graph that needs it.

    Troubleshooting

    Malformed lines in schedule (missing the @, or a value that isn't a number) will likely break the parse - keep it strictly frame@value, one pair per line.

    This pack has real, reported import failures: a comfyui subreddit thread shows a user's console printing (IMPORT FAILED): ...ComfyUI-Apt_Preset for a workflow that used one of its nodes. What fixed it for them was ComfyUI Manager's "install missing custom nodes," or deleting and re-cloning the repo by hand and restarting. Check your terminal for the specific missing package before assuming the node is broken.

    And if you're using this to drive a ControlNet strength schedule rather than a static value, the README notes that feature specifically wants ComfyUI-Advanced-ControlNet installed alongside Apt_Preset.

    CategoryApt_Preset/data/schedule

    Inputs (3)

    NameTypeDefaultDescription
    scheduleSTRINGframe_number@value
    current_frameINT00–9999
    easing_typeCOMBO23 options: Linear, Sine_In, Sine_Out, Sine_InOut, Sin_Squared, Quart_In, +17

    Outputs (4)

    NameTypeDescription
    INTINT
    FLOATFLOAT
    weightFLOAT
    lengthINT