Nodes/KJNodes for ComfyUI/Weight Schedule Convert
ComfyUI Node Runs on cloud

Weight Schedule Convert

Reshape a value curve for the next node

By kijai·Created 3 years ago·Updated about 9 hours ago· 2,930
Weight Schedule Convert
    • FLOAT
    • STRING
    • INT
    input_values0.00
    output_typelist
    invertfalse
    repeat1
    remap_to_frames0
    interpolation_curve
    remap_valuesfalse
    remap_min0.00
    remap_max1.00

    Scheduled-animation workflows are a small tower of nodes that pass around lists of numbers - a weight per frame - and they don't all speak the same dialect. One node hands you a Python list, the next one wants a tensor, a third expects a pandas series, and your curve is the right values in the wrong type. Weight Schedule Convert is the adapter that sits between them. But it does more than retype: it can also rescale, invert, repeat, and resample your curve, which quietly makes it the Swiss-army node of the KJNodes "weights" family.

    It's part of KJNodes, kijai's utility pack, and you'll most often see it downstream of a batch-schedule or a mask-to-weight node, cleaning up the signal before it hits IPAdapter or AnimateDiff.

    How it works

    At its core it takes an input value schedule and re-emits it as the type you ask for. Layered on top are a handful of transforms that run on the way through - a remap that stretches your values into a new min/max range, an inversion that flips the curve, a repeat that tiles it, and a frame-remap that resamples it to a different length. So a 16-value curve can come out as a 48-frame curve, rescaled to 0.3–0.8 and inverted, in one node.

    The inputs that matter

    • input_values - the curve coming in.
    • output_type - what to emit: match_input (keep the type), list, pandas series, or tensor. Set this to whatever the next node accepts.
    • invert - flips the curve (high becomes low).
    • repeat - tiles the schedule N times (1–255), for looping patterns.
    • remap_values with remap_min / remap_max - rescales the curve into a new range. Turn remap_values on, then set the min/max; this is how you take a 0–1 mask curve and squeeze it into, say, 0.4–0.7 so an effect never fully turns off.
    • remap_to_frames (optional) - resamples the whole schedule to a target frame count, stretching or compressing it.
    • interpolation_curve (optional) - shapes the interpolation used when remapping.

    Outputs are the converted schedule as FLOAT, STRING, and INT, so you can grab whichever type the downstream node needs.

    Installing it

    ComfyUI Manager → search KJNodes for ComfyUI → install → restart. Or cd ComfyUI/custom_nodes && git clone https://github.com/kijai/ComfyUI-KJNodes, then pip install -r ComfyUI-KJNodes/requirements.txt, and restart.

    Where people get burned

    • Remap does nothing. Setting remap_min/remap_max without flipping remap_values on is a no-op - the toggle gates the rescale. Turn it on.
    • Frame count surprises. remap_to_frames resamples the curve; if your animation length and your schedule length disagree, this is where you reconcile them - but forget it and your weights run out (or repeat) before the video does.
    • Type whack-a-mole. If a downstream node still rejects the wire after conversion, it wants a different one of the three outputs. Try the FLOAT, STRING, or INT branch rather than assuming output_type covers it.
    CategoryKJNodes/weights

    Inputs (9)

    NameTypeDefaultDescription
    input_valuesFLOAT0.00
    output_typeCOMBOlist4 options: match_input, list, pandas series, tensor
    invertBOOLEANfalse
    repeatINT11–255
    remap_to_framesoptINT0
    interpolation_curveoptFLOAT
    remap_valuesoptBOOLEANfalse
    remap_minoptFLOAT0.00-100000–100000
    remap_maxoptFLOAT1.00-100000–100000

    Outputs (3)

    NameTypeDescription
    FLOATFLOAT
    STRINGSTRING
    INTINT