Nodes/ComfyUI-Apt_Preset/AD_sch_prompt_basic
ComfyUI Node

AD_sch_prompt_basic

Prompt travel with keyframes and easing curves

By cardenluo·Created 2 years ago·Updated 18 days ago· 309
AD_sch_prompt_basic
  • clip
  • positive
  • graph
prompts0: a girl @Sine_In@ 7: a boy 15: a dog
easing_typeLinear
max_length120
f_text
b_text

This is the pack's prompt-travel node - the "a girl becomes a boy becomes a dog over the course of the animation" tool. Instead of one static prompt for your whole clip, you write a small schedule of frame: prompt lines, and this node cross-fades the CLIP conditioning between them as the animation plays, following whatever easing curve you pick. It's the same idea AnimateDiff's SparseCtrl-era community built prompt-scheduling and keyframe-conditioning tooling around, and it's exactly what the pack's README means by "prompt scheduling" in its General Control AD Stack section.

How it works

Each line in prompts is a keyframe: a frame number, a prompt, and optionally an inline easing tag. The node encodes each segment with your clip, then blends between consecutive keyframes' conditioning according to the easing curve - either the per-line tag if you set one, or the node's overall easing_type if you didn't. It also renders a debug graph of the resulting weight curve, so you can eyeball whether the blend timing matches what you meant before committing to a full render.

The inputs and outputs that matter

  • clip (CLIP) - required, since this node does the text encoding itself.
  • prompts (multiline STRING) - your schedule. The default gives the shape: 0: a girl @Sine_In@, 7: a boy, 15: a dog - frame number, colon, prompt text, and an optional @EasingName@ tag at the end of a line to override the curve for that specific transition.
  • easing_type (default Linear, 23 choices total - Linear plus Sine/Quart/Cubic/Circ/Back/Elastic/Bounce, each with _In/_Out/_InOut variants) - the default curve used for any line that doesn't specify its own @tag@.
  • max_length (optional, default 120) - CLIP token truncation length.
  • f_text / b_text (optional STRINGs) - front and back text, prepended and appended to every scheduled prompt. This is where your quality tags or consistent style phrasing go, so you don't have to retype them on every single keyframe line.

Outputs: positive (CONDITIONING) - wire this into your sampler in place of a normal CLIP Text Encode - and graph (IMAGE), a visual of the blend curve, purely for your own sanity-checking.

How to install it

Via ComfyUI Manager: search "ComfyUI-Apt_Preset". Manually:

cd ComfyUI/custom_nodes
git clone https://github.com/cardenluo/ComfyUI-Apt_Preset.git

Then install.bat (Windows) or pip install -r requirements.txt (Linux/Mac), and restart. No model downloads for this node - it uses whatever clip you already have loaded elsewhere in your workflow.

Common issues & troubleshooting

Transitions happen at the wrong frame. Double-check your frame numbers in prompts line up with your actual context length - a schedule written for a 16-frame AnimateDiff window won't map sensibly onto a 97-frame LTX clip without rewriting the numbers.

One keyframe's prompt seems to bleed into the next too early or too late. That's the easing curve talking - Linear blends evenly across the whole gap, while something like Sine_In holds closer to the first prompt longer before rushing toward the next. Try a different @tag@ on that specific line rather than changing the global easing_type and affecting every transition.

Repeated boilerplate across every keyframe line. That's exactly what f_text/b_text are for - move your quality tags and consistent style words there instead of retyping them on every line of prompts.

Not sure if the schedule is doing what you think. Check the graph output before committing to a full generation - it's cheap to render and will show you the actual blend curve, not just what you assumed you wrote.

CategoryApt_Preset/AD/😺backup

Inputs (6)

NameTypeDefaultDescription
clipCLIP
promptsSTRING0: a girl @Sine_In@ 7: a boy 15: a dog
easing_typeCOMBOLinear23 options: Linear, Sine_In, Sine_Out, Sine_InOut, Sin_Squared, Quart_In, +17
max_lengthoptINT1200–100000
f_textoptSTRING
b_textoptSTRING

Outputs (2)

NameTypeDescription
positiveCONDITIONING
graphIMAGE