Nodes/Deforum Nodes/(deforum) Unformatted Prompt
ComfyUI Node

(deforum) Unformatted Prompt

Deforum's Unformatted Prompt Node

By XmYx·Created 3 years ago·Updated 3 months ago· 198
(deforum) Unformatted Prompt
  • deforum_data
  • deforum_data
unformatted_prompts
keyframe_interval50

If you've ever written a Deforum prompt schedule by hand, you know the pain. The classic format is 0:'cat', 50:'cat running', 100:'cat flying' - every prompt tagged with a frame number, and if you add one line in the middle you get to renumber everything after it. The (deforum) Unformatted Prompt node exists to make that stop. You type one prompt per line, it assigns the frame numbers for you, and you move on with your life.

This is one of the small quality-of-life nodes in XmYx's official Deforum port for ComfyUI - the same animation engine that made AUTOMATIC1111's Deforum extension famous back in late 2022 (the KB's ui-history essay tracks it arriving as an A1111 tab extension in October 2022). The ComfyUI pack runs the real Deforum backend locally via the deforum-studio package it installs; nothing here calls an API or needs a key. You just chain these data nodes into a Deforum iterator and hit queue.

How it works

The mechanism is almost embarrassingly simple, and that's the point. The node takes your block of text, splits it on newlines, and turns line i into the prompt at keyframe i * keyframe_interval. So with the default interval of 50, your first line lands on frame 0, the second on frame 50, the third on 100 - the classic Deforum cadence for a 2-second-per-prompt animation at 25fps. Between keyframes, the previous prompt holds, which is standard Deforum behavior.

The result gets written into a deforum_data dict under the "prompts" key, and that dict is the connective tissue of every Deforum workflow - each params/prompt node reads the same object, adds its own key, and hands it to the sampler.

The inputs that matter

There are only two, and you'll set one of them every time:

  • unformatted_prompts - the multiline text box. One prompt per line, no frame numbers, no quotes, no colons. This is the whole point of the node.
  • keyframe_interval - how many frames apart each prompt lands (default 50, range 1–8192). Smaller = faster prompt turnover.

The optional deforum_data input is for chaining: feed it the output of another Deforum data node and the prompt schedule is added to the same dict instead of starting a new one. The single output, deforum_data, plugs into the Deforum Iterator or any downstream node that consumes the shared data object.

Installing it

This node ships in the Deforum Nodes pack, so it installs once with everything else:

cd ComfyUI/custom_nodes
git clone https://github.com/XmYx/deforum-comfy-nodes.git

Then restart ComfyUI. Easier still: ComfyUI Manager → search "Deforum Nodes" by XmYx → Install. Heads up that this is not a light install - the pack pulls in deforum-studio from git plus a heavy pip stack (librosa, moviepy, av, pydub, opencv-contrib, and a numpy<2.0.0 pin). The README also insists on Python 3.10. Give it a few minutes on first setup.

Common issues

The classic gotcha isn't this node specifically, it's the pack: if you've previously installed Deforum for A1111, an orphaned deforum package in your user Python can collide with the ComfyUI install. The fix the Deforum folks recommend is pip uninstall deforum, then hit "Try Fix" in the Manager and restart. And remember, this node is an output node - if you forget to wire its deforum_data into the rest of the graph, nothing gets your prompts, and you'll sit there wondering why the animation ignored you.

Categorydeforum/prompt

Inputs (3)

NameTypeDefaultDescription
unformatted_promptsSTRING
keyframe_intervalINT501–8192
deforum_dataoptdeforum_data

Outputs (1)

NameTypeDescription
deforum_datadeforum_data