(deforum) Frame Data Extract
Peek inside the animation loop's frame data
- deforum_frame_data
- frame_idx
- seed
- steps
- cfg_scale
- sampler_name
- scheduler_name
- denoise
- subseed_strength
- first_run
Every frame of a Deforum animation carries a little dictionary around with it - DEFORUM_FRAME_DATA - full of everything the sampler resolved for that moment: which frame you're on, the seed, the step count, the CFG, the sampler and scheduler names, the denoise level. It travels from node to node, but unless you can read it, it's just a black box. This node is the keyhole. It unpacks that dict into plain typed outputs you can wire into anything else in your graph.
The whole point is escape velocity: instead of being stuck inside Deforum's own sampler, you can drive a standard KSampler, a checkpoint, or your own logic from the loop's current state.
What comes out
frame_idx- which frame of the animation you're on. The most useful output here: feed it to a comparator or switch to change behavior at a specific frame.seed,steps,cfg_scale,sampler_name,scheduler_name,denoise- the resolved sampling settings for this frame, ready to plug into a regular sampler node so your own sampling path matches what Deforum would have done.subseed_strength- the subseed (variation) strength for this frame.first_run- a Boolean meant to signal the first pass of a two-pass render.
The outputs are typed (INT, FLOAT, STRING, BOOLEAN), so they slot into standard nodes without adapters. Drop one next to a Logical NOT or FLOAT Comparator and you've got conditional animation.
One quirk worth knowing
In the source, first_run is actually populated from the dict's second_run key:
first_run = deforum_frame_data.get("second_run", False)
So that output can feel inverted from what its name suggests, and it defaults to False when the dict lacks the key. If you rely on it for two-pass logic and get surprising results, that's why - don't go hunting for a bug in your graph.
Installation
It's part of the Deforum Nodes pack, installed like the rest:
cd ComfyUI/custom_nodes
git clone https://github.com/XmYx/deforum-comfy-nodes.git
Restart, or grab "Deforum Nodes" by XmYx from ComfyUI Manager. Like the logic nodes, this one doesn't need the heavy backend to function - it needs a DEFORUM_FRAME_DATA input, which only the animation loop produces, so realistically you'll be using it after the full install (Python 3.10 and the deforum[comfy] backend) is up.
When you'd reach for it
Mostly when you outgrow the stock sampler. Want the same animation but with a custom noise injection per frame? Pull seed and frame_idx and build your own path. Want a prompt change at frame 120? frame_idx through a comparator. It's the node you don't need on day one and reach for on day four.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| deforum_frame_data | DEFORUM_FRAME_DATA | — |
Outputs (9)
| Name | Type | Description |
|---|---|---|
| frame_idx | INT | — |
| seed | INT | — |
| steps | INT | — |
| cfg_scale | FLOAT | — |
| sampler_name | STRING | — |
| scheduler_name | STRING | — |
| denoise | FLOAT | — |
| subseed_strength | FLOAT | — |
| first_run | BOOLEAN | — |