(deforum) Prompt
The keyframe script that tells your story frame by frame
- deforum_data
- deforum_data
This is where Deforum stops being a camera effect and becomes storytelling. The Prompt node takes the classic Deforum keyframe format - one line per keyframe, frame:prompt - and writes it into the deforum_data dict, which the sampler then interpolates across the animation. Type the default 0:'Cat Sushi' and the whole animation runs on one prompt; add keyframes and the scene becomes something else over time.
The format is the thing that's been passed down since the A1111 extension days:
0:'A vast alien desert under two moons, cinematic'
30:'a ruined city rising from the sand, cinematic'
60:'the city from above, golden light, cinematic'
Frame numbers, colon, prompt. You can interpolate prompts or cut between them - Deforum handles both by blending the conditioning at each frame. Blank lines don't matter, but every line needs the frame:'text' shape or the parser chokes.
Inputs and output
prompts- the multiline keyframe script. The only input you set.deforum_data(optional) - chain a dict in and the node merges itspromptsinto the existing data instead of overwriting it. This is how you layer prompt keyframes from multiple nodes into one run.- Output:
deforum_data, carrying your parsed prompt schedule downstream.
One neat behavior from the source: if the incoming deforum_data already has formatted prompts, the node re-serializes them back into editable text (frame:'text' lines) so you can round-trip a prompt schedule through the graph without losing it.
How it works
The node parses each line by splitting on the first colon, trims quotes, and builds a {frame: prompt} dict into deforum_data. It's pure data work - no model, no tokens, nothing downloaded. The actual prompt interpolation happens later, inside the sampler, which is why a syntax error here doesn't crash the node but produces a confusing render.
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. Lightweight on its own, but it's the heart of the animation workflow, so you'll be running it with the full backend (Python 3.10, deforum[comfy]) in practice.
Common issues
- "Prompt changed but the render didn't" - check that this node is actually in the chain feeding the sampler, and that your keyframe line is well-formed (
frame:'text', with the colon inside the format, notframe: 'text'on the wrong side). - A scene that melts at the transition - prompt blending across very different prompts can smear. Try a hard cut (two keyframes close together) or shorter blend spans.
- Quotes inside the prompt - escape them or avoid them; the parser strips the outer quotes with
strip('"')and a stray quote in the middle can break a line.
The prompt node is the one beginners should learn first: it's the difference between "a zoom" and "a story."
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| prompts | STRING | 0:'Cat Sushi' | — |
| deforum_dataopt | deforum_data | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| deforum_data | deforum_data | — |