Make Frame Dataset
Extract the frames once, then stop thinking about it
- FRAME_DATASET
- Total_frames
Before you can style-warp a video, you need its frames on disk as a folder of images. This is the node that does that, and it's the entry point for almost every ComfyWarp workflow. Point it at a video file - or a folder that's already been extracted, or even a glob pattern - and it hands back a FRAME_DATASET object plus the total frame count, ready to feed the loaders.
What it accepts
- A video file (mp4, mov, whatever ffmpeg reads): it extracts frames into a folder inside your ComfyUI output directory, named from a hash of the source file so the same video always maps to the same frames.
- A folder of images: it just indexes them in sorted order.
- A glob pattern: same thing, but you get to cherry-pick which files count.
It also enforces some rules you'll hit as errors: a folder with mixed extensions (a png and a jpg in the same directory) throws, and if it finds zero frames it raises "Found 0 frames" rather than silently giving you an empty dataset. Those messages are annoyingly literal, but they're correct - clean the folder up and move on.
The inputs
file_path- the video, folder, or glob. The default is a leftover Windows path from the author's machine; replace it. On Windows, backslashes work; the code normalizes them internally.start_frame(default 0) andend_frame(default -1, meaning "to the end") - which range to keep. For a video these get passed to ffmpeg'sselectfilter during extraction; for a folder/glob they just slice the file list.nth_frame(default 1) - the "every Nth frame" slider.1keeps everything;4keeps a quarter of the frames. This is the knob for trading video length against compute time - and note the gotcha: if you extract every 4th frame, your rendered output will be 4× shorter at the same fps, so either lowerRenderVideo's fps or interpolate later.overwrite(default off) - if a frame set already exists for that video (same hash), it skips extraction. Tick it to re-extract after changingstart_frame/end_frame/nth_frame.update_on_frame_load(default on) - refreshes the frame list whenever a frame is pulled from the dataset, so frames saved by the loopback (e.g.SaveFrame) get picked up.
Outputs
FRAME_DATASET is the thing the loaders consume - wire it into LoadFrameFromDataset or LoadFramePairFromDataset. Total_frames is the count, and you'll see it plugged into RenderVideo's render_at_frame in the sample workflows so the video export fires exactly when the last frame is diffused.
One habit that saves headaches: keep the source video and its extracted frames in a path without spaces or non-latin characters. The README calls this out for the pack in general, and it's genuinely where Windows users lose an hour - ffmpeg and path joins both misbehave on those. Make the dataset once, and every loader downstream stops caring about the source video entirely.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| file_path | STRING | C:\code\warp\19_cn_venv\images_out\stable_warpfusion_0.20.0\videoFrames\650571deef_0_0_1 | — |
| update_on_frame_load | BOOLEAN | true | — |
| start_frame | INT | 00–9999999999 | — |
| end_frame | INT | -1-1–9999999999 | — |
| nth_frame | INT | 11–9999999999 | — |
| overwrite | BOOLEAN | false | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| FRAME_DATASET | FRAME_DATASET | — |
| Total_frames | INT | — |