Scale Batch Prompt Schedule
Retime a prompt schedule to a new frame count
- STRING
Niche node, clear job. If you build animations with prompt scheduling - the "at frame 0 do this, at frame 24 do that" travel format from Fizzledorf's FizzNodes BatchPromptSchedule - and you've ever wanted to change the length of a clip without hand-retyping every keyframe number, this is the node that does the arithmetic for you.
What problem it solves
Prompt scheduling in AnimateDiff-style workflows uses a little text format where you pin values to specific frames:
0:(0.0),
7:(1.0),
15:(0.0)
That says "at frame 0 the value is 0, ramp to 1 by frame 7, back to 0 by frame 15." Great - until you decide the animation should be 64 frames instead of 16. Now every one of those frame indices is wrong, and if you've got a dozen keyframes across several scheduled parameters, rescaling them by hand is exactly the kind of fiddly error-prone busywork that produces off-by-a-few-frames bugs. This node takes the schedule string and remaps all the frame numbers proportionally from an old length to a new one, so the shape of your animation stays identical while the timeline stretches or squashes to fit.
It's a text transformer. Nothing about images or latents touches it - it eats a string and emits a string.
The inputs and output
All three inputs are the whole story:
input_str- your schedule text in the FizzNodes format, the thing you'd normally paste straight into a BatchPromptSchedule node.old_frame_count- the length the schedule was written for.new_frame_count- the length you want it retimed to.
The single output is a STRING: the same schedule with every frame index scaled from old to new. You feed that string into your actual prompt-schedule node downstream. So the pattern is: write the schedule once at a convenient length, then park this node in front of your scheduler and change only new_frame_count when you want a different duration.
How to install it
It comes with kijai's KJNodes pack.
- ComfyUI Manager - search KJNodes for ComfyUI, install, restart.
- Manual -
cd ComfyUI/custom_nodes && git clone https://github.com/kijai/ComfyUI-KJNodes, thenpip install -r ComfyUI-KJNodes/requirements.txt, restart.
No models or extra dependencies. Note that the node that consumes the output - BatchPromptSchedule - lives in a different pack (FizzNodes), so you'll want that installed too for the schedule to actually do anything.
Common issues & troubleshooting
Keyframes land on fractional frames. Scaling 15 to a 64-frame timeline won't always produce whole numbers, and downstream nodes want integer frame indices. If a rescaled schedule behaves oddly, check whether the new counts came out clean; sometimes nudging new_frame_count to a value that divides more evenly avoids ugly rounding.
The output does nothing on its own. This node only rewrites text. If you wired it to something that isn't a prompt-schedule consumer, nothing happens - it's a preprocessor for BatchPromptSchedule, not a scheduler itself.
It's an AnimateDiff-era tool. Prompt-travel scheduling belongs to the AnimateDiff/SD1.5 animation era. If you've moved to Wan or LTX for video, that whole pipeline is different and this node isn't part of it - it's here for the batch-schedule workflows that still run, not for modern diffusion-transformer video.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| input_str | STRING | 0:(0.0), 7:(1.0), 15:(0.0) | — |
| old_frame_count | INT | 11–4096 | — |
| new_frame_count | INT | 11–4096 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |