(deforum) Schedule Templates
73 pre-built expressions for people who don't do math
- STRING
Every Deforum parameter can be a schedule, and every schedule can be either boring keyframes (0:(0), 50:(1)) or a math expression (0:(sin(2*3.14*t/max_f))). Expressions are powerful - and a wall of trig is exactly what most people don't want to write at 11 p.m. This node exists so you never have to: pick from 73 pre-written schedule expressions and it hands you the string, ready to paste into any schedule field.
It's a cheat sheet with a dropdown, deliberately boring, and genuinely useful.
What's in the dropdown
The templates cover the shapes that actually matter in animation math:
- Ramps and fades -
0:(t/max_f)(linear up),0:(1 - t/max_f)(linear down), quadratic and square-root variants, exponential curves. - Waves - sine, cosine, and combinations of both, with frequency and phase modulations (
sin(2*3.14*t/max_f), damped waves, summed sines). - Seed-driven - expressions that use
s(the seed) so different seeds give different motion without editing the schedule. - Special shapes - sawtooth via
t % 20, triangle waves,abs()-peaked waves.
In every template, t is the current frame and max_f is the total frame count, so an expression works at any animation length. The dropdown is built from the pack's source, so what you see in the list is exactly what you get on the wire.
Input and output
expression- the dropdown. That's the only input.- Output:
STRING- the selected expression, ready to paste into a schedule field (or into theSchedule Visualizerto preview it first).
Yes, the output is just the text of what you selected. The node's show function literally returns str(expression). If that feels anticlimactic, it's because the real work is the catalog, not the plumbing.
Installation
Ships with Deforum Nodes:
cd ComfyUI/custom_nodes
git clone https://github.com/XmYx/deforum-comfy-nodes.git
Restart, or install "Deforum Nodes" by XmYx via ComfyUI Manager. Zero dependencies - it's a string picker.
How to use it well
Grab an expression here, drop it into Schedule Visualizer to see the curve before you commit, then paste it into the schedule field of whatever parameter node you're tuning. That three-node loop - template → visualize → use - is the fastest way to build a feel for what exp(-t/max_f)*sin(4*3.14*t/max_f) actually does to your animation, without a single careful reading of the math.
And when none of the 73 fit: the syntax is open, so write your own. The templates are training wheels, not a cage.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| expression | COMBO | 73 options: 0:(0), max_f:(100), 0:(100), max_f:(0), 0:(sin(2*3.14*t/max_f)), 0:(exp(-t/max_f)*sin(4*3.14*t/max_f)), 0:(s%100), 0:(sin(2*3.14*(t+s)/max_f)), +67 |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |