Load Frame From Dataset
'give me frame N' — the reliable version
- frame_dataset
- Image
- Frame number
This is the loader you'll actually build workflows around. It takes a FRAME_DATASET (the thing MakeFrameDataset outputs), asks for a specific frame by number, and returns that image plus the frame number it used. Clean, predictable, and - unlike its older cousin LoadFrame - it doesn't have a known validation quirk. If a ComfyWarp workflow says "load the current frame," this is the node doing it in the current samples.
The seed input is the frame index; again, not random - it's just the author's name for "which frame." The node clamps it into range both ways (negative requests get floored to 0, oversized ones to the last frame), so it never errors out of bounds; it quietly hands you the nearest real frame and reports what it gave you via the Frame number output. That clamping is deliberate: in a loop you sometimes step past the end, and erroring would kill the whole render instead of just being safe.
What you wire in
frame_dataset- fromMakeFrameDataset'sFRAME_DATASEToutput.seed- the current frame counter. Drive it withFixedQueue'scurrentoutput, or a scheduler if you want to bounce around the clip.total_frames- the clip length, from the dataset's Total_frames output. It's used to clamp, so getting this right keeps the node honest about what's in range.
Outputs are Image and Frame number. The image goes to the sampler as your init/conditioning; the frame number gets passed along to SaveFrame and RenderVideo so the loop bookkeeping stays consistent.
Loopback mental model
The whole loop is: dataset → this node grabs frame N → you diffuse it → SaveFrame writes the result → the counter increments → this node grabs frame N+1. Every iteration re-queries the dataset, which is also why MakeFrameDataset's update_on_frame_load matters - if the dataset is set to refresh on load, frames your own loop just saved get picked up by downstream LoadFrameFromFolder-style loopback.
One tuning note: there's no resize knob here - you get the frame at whatever resolution MakeFrameDataset extracted it at. If you need a consistent working size (and you do, for the flow nodes), put a ResizeToFit right after this node's image output. That keeps frame sizes matched across the whole pipeline, which the optical-flow nodes demand.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| frame_dataset | FRAME_DATASET | — | |
| seed | INT | 00–9999999999 | — |
| total_frames | INT | 00–9999999999 | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| Image | IMAGE | — |
| Frame number | INT | — |