Nodes/comfyui-sequential-batcher/💾 Save Scene Keyframe
ComfyUI Node

💾 Save Scene Keyframe

Pass the scene's last frame to the next flow without losing it to a workflow split

By Meisoftcoltd·Created 7 months ago·Updated 18 days ago· 3
💾 Save Scene Keyframe
  • image
  • image
  • file_path
file_path

In this pack's split-workflow setup, Flow 1 makes the plan and Flow 2 renders the video - two separate graphs that share only the filesystem. Continuity between them comes down to one image: the last frame of each scene, saved by this node in Flow 1 and loaded by LoadSceneKeyframe in Flow 2. SaveSceneKeyframe is the hand-off point.

It's the pack's answer to a specific annoyance: when you keep scenes in separate workflows, the "first frame" of scene N has to come from somewhere, and that somewhere is usually a PNG on disk. This node makes the save explicit, file-path driven, and - this is the part that surprises people - it's also a signal to the Director.

How it works

Give it an image and a file_path and it saves the first frame of the batch (index 0) as a PNG, overwriting anything already there. Two deliberate details: it first removes a directory that happens to exist at the target path (a quirk where other node packs create phantom folders), then ensures the parent directory exists before writing. And because the pack runs on a "one chunk at a time" cadence, saving the keyframe also flips the global_is_final_chunk flag, marking the scene as finished so the Director's state machine advances. It's a save node that moonlights as a clock tick.

It's not an output node by design - the README notes that was removed deliberately to keep lazy evaluation working, so the node passes the image and file_path straight through to keep the graph connected without forcing extra execution.

Inputs and outputs

  • image (IMAGE) - the frame to save; typically the last frame of your generated scene.
  • file_path (STRING, forceInput) - where to write it. In the split-workflow pattern this comes from the DynamicSceneDirector, which hands you a per-scene path like <output>/<audio_name>_Keyframes/scene_<id>.png.

Outputs: the same image and file_path, passed through so you can keep wiring without breaking the flow.

Installing it

It ships in comfyui-sequential-batcher:

cd ComfyUI/custom_nodes
git clone https://github.com/Meisoftcoltd/comfyui-sequential-batcher

or ComfyUI Manager, search "comfyui-sequential-batcher", restart. Needs Pillow, which the pack's requirements handle.

Common issues

The main gotcha is file-path hygiene: the keyframe is only useful if Flow 2 computes the exact same path, and the pack derives it from the sanitized audio filename - so if the two flows use different audio_filename values, the load silently misses. The paired loader falls back to a black 512x512 tensor when the file is absent, which is a helpful failure signal (black first frame = wrong path). If you're not using the Director, just build the path yourself with the same pattern and you're fine.

Category🔁 Sequential Batcher/Tools

Inputs (2)

NameTypeDefaultDescription
imageIMAGE
file_pathSTRING

Outputs (2)

NameTypeDescription
imageIMAGE
file_pathSTRING