KfDrawSchedule
Watch your prompt schedule play out as a chart
- schedule
- IMAGE
A prompt schedule is a thing you feel you understand until you render 60 frames and discover prompt three was active for one frame or prompt one never got a chance. KfDrawSchedule makes the schedule visible: it takes your SCHEDULE, converts it into per-prompt weight curves, and plots them as an image you can preview before you ever touch the sampler. If the debug nodes are the pack's stethoscope, this is its X-ray - you see exactly when each prompt rises, peaks, and hands off.
The chart isn't a generic illustration; it's derived from your actual schedule. Each keyframe's prompt becomes a weight curve showing its contribution across time - a hard previous-interpolated keyframe draws as a step function, a linear one as a ramp, and overlapping curves show you where prompts are blending. The legend labels come from the prompts themselves, so you can read which description is where.
Why you'd reach for it
Before running any scheduled animation. Two minutes staring at the chart will tell you what an hour of renders would: is there a keyframe at time 0 (the README's hard requirement)? Does prompt four's window make sense, or did you pin it at the wrong time? Are your transitions smooth or are you getting hard cuts you didn't intend? It's also the best teaching tool for how this pack thinks - you can see, at a glance, what "sum of weights ≈ 1 during transitions" actually looks like.
The inputs that matter
schedule- theSCHEDULEto visualize, force-input fromSet KeyframeorSchedule Prompt.n- anINT, default64. Sample points for the plot. Bump it up for long schedules.show_legend- aBOOLEAN, defaulttrue. Off if you want a clean chart; on (default) to see which prompt is which.
Output is a single IMAGE - the rendered chart, routed to a preview or save node.
How it works
Under the hood it's a clever little transformation. It pulls the schedule's cross-attention curve, then for each keyframe builds a "contribution" curve - using a sliding window of three keyframes, it sets the current keyframe's value to 1 and its neighbors to 0, so each prompt's weight rises and falls across its window. The result is a parameter group of weight curves that sums to roughly 1 at every point, plotted with the same matplotlib helper as KfPGroupDraw. For a single-keyframe schedule it shortcuts to a flat 1.
Installing it
Part of ComfyUI-Keyframed (dmarx's pack wrapping his keyframed library). ComfyUI Manager: search "Keyframed". Or:
cd ComfyUI/custom_nodes
git clone https://github.com/dmarx/ComfyUI-Keyframed
Restart ComfyUI. The pack auto-installs keyframed and toolz on first load. It needs matplotlib (usually already in ComfyUI's env); if the node errors on import, that's the dependency.
Troubleshooting
If the chart looks wrong, the schedule probably is wrong - that's the node doing its job. Curves that jump vertically instead of ramping mean previous/null interpolation on those keyframes (a hard cut). A gap or silence at the start of the plot usually means no keyframe at time=0. And if you see a prompt's curve dominate for way longer than you intended, re-check the time you pinned that keyframe to - the chart is just faithfully reporting the schedule you built.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| schedule | SCHEDULE | — | |
| n | INT | 64 | — |
| show_legend | BOOLEAN | true | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |