Prompt Schedule | Deforum
The famous Deforum prompt string, now as real conditioning
- clip
- POS
- NEG
This is the node people come to this pack for. Prompt Schedule | Deforum takes the exact keyframe syntax anyone who used Deforum on Automatic1111 knows - "0" : "a lone lighthouse", "40" : "a lone lighthouse, stormy" - and turns it into real CLIP conditioning for the current frame of an animation. It's the per-frame prompt evolution that made Deforum famous, reimplemented as a native graph node instead of buried inside one giant A1111 tab.
The mechanism, in plain terms: it parses your schedule, splits positive and negative (anything after --neg in a value becomes the negative), and for every frame between two keyframes it computes a blended conditioning - the node encodes the previous prompt and the next prompt and mixes their conditioning vectors by the frame's weight. So you get a smooth transition from one prompt to the next, not a hard cut at frame 40. You also get the classic extras: pre_text and app_text get prepended/appended to every prompt (great for a fixed style qualifier), and the pw_a through pw_d variables are available inside math expressions.
The inputs that matter: text (the schedule itself, defaulting to an empty 0-to-119 template), clip (your CLIP encoder), max_frames (the animation length, default 120), current_frame (which frame's conditioning to emit - this is a forceInput socket, so wire it from your loop counter, not by typing), and print_output to dump the resolved prompts to the console for debugging. The two outputs are POS and NEG, both CONDITIONING, which feed straight into a sampler's positive and negative inputs.
The genuinely clever bit is the math expressions. Wrap anything in backticks and it's evaluated per frame with t (current frame), max_f (max_frames minus one), and pw_a–pw_d available, plus the usual sin, cos, sqrt, abs and friends. That turns a static schedule into a living one - "0" : "a lighthouse, sin(t*0.1)*50% stormy" oscillates the storminess as the animation runs. This is where the schedule stops being a keyframe list and becomes a tiny program, and it's the same spirit as the original Deforum's prompt magic.
Two honest caveats. First, the conditioning blend is a straightforward weighted mix of the two encodings - it's not semantic prompt interpolation, so expect the visual transition to be "two prompts dissolving," which is usually exactly what you want in a morph. Second, get max_frames right: it's the total animation length, and current_frame wraps modulo max_frames, so a mismatch between your loop length and this number is the classic source of "why is my animation looping the same two prompts."
Installation is the pack: ComfyUI Manager → search "ComfyUI-Deforum" or deforum-comfy-nodes → install and restart, or git clone https://github.com/deforum-art/deforum-comfy-nodes into ComfyUI/custom_nodes. No model downloads, no extra deps. If you want the raw interpolated strings before CLIP encoding - to feed a different encoder or debug the schedule - the sibling String Schedule | Deforum does that. This one is the full-power version.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| text | STRING | "0" :"", "11" :"", "23" :"", "35" :"", "47" :"", "59" :"", "71" :"", "83" :"", "95" :"", "107" :"", "119" :"" | — |
| clip | CLIP | — | |
| max_frames | INT | 1201–999999 | — |
| current_frame | INT | 00–999999 | — |
| print_output | BOOLEAN | false | — |
| pre_textopt | STRING | — | |
| app_textopt | STRING | — | |
| pw_aopt | FLOAT | 0.0-9999–9999 | — |
| pw_bopt | FLOAT | 0.0-9999–9999 | — |
| pw_copt | FLOAT | 0.0-9999–9999 | — |
| pw_dopt | FLOAT | 0.0-9999–9999 | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| POS | CONDITIONING | — |
| NEG | CONDITIONING | — |