ComfyUI Node

Save Frame JNK

Grab a single frame out of a video batch without the ceremony

By AljnkΒ·Created about a year agoΒ·Updated 12 months agoΒ· 3
Save Frame JNK
  • image
    β—„output_dirβ–Ί
    β—„batch_nameFrameβ–Ί
    β—„frame_number0β–Ί

    If you've ever wanted to pull one specific frame out of a generated video and work on it, this is the laziest honest way to do it. "Save Frame JNK" saves exactly one image - the first frame in whatever batch you feed it - to an exact path you choose, with sequential numbering you control. That's the whole job, and it does it without the folder juggling that ComfyUI's default output nodes push you into.

    Here's the mechanism, because it's simpler than the name suggests. You feed it an image tensor (a video is just a batch of frames), give it an output_dir, and it writes batch_name_<number>.png - where the number is zero-padded to seven digits and comes from your frame_number input. Frame_0000123.png, that style. The node only saves the first image in the batch (image[0]), so it's not built for saving whole sequences; it's built for saving one frame. To move through a video, you change frame_number and re-run, which is exactly the workflow the pack's README describes: extract frames, process them, reassemble.

    Why reach for this over the stock SaveImage? Two reasons. First, the path is completely yours - output_dir is a full filesystem path, not ComfyUI's /output folder. Want a frame to land in D:/projects/clip_003/candidates/? Put that in and it goes there, creating the directory if it doesn't exist. Second, the numbering is deterministic and controlled: you say which frame number it is, not the node. That makes it scriptable - you can run the same graph, nudge frame_number, and build up a contact sheet one save at a time.

    The inputs are few enough that you'll set all of them:

    • output_dir - the folder. Full path, mind you; a bare name won't resolve relative to anything useful.
    • batch_name - the filename prefix, default "Frame".
    • frame_number - the number in the filename. Not the frame index in your video; it's literally the digits you want in the file.

    There are no outputs at all - this is a pure output node, you just wire the image in and let it write.

    Install: ComfyUI Manager β†’ search "JNK" β†’ Install, then restart. Or:

    cd ComfyUI/custom_nodes/
    git clone https://github.com/Aljnk/ComfyUI-JNK-Tiny-Nodes.git
    

    Then restart. No extra Python deps beyond what ComfyUI already has - the pack's requirements list opencv/pygame/google-genai, but a plain PNG save uses none of them.

    Gotchas: it's always PNG, no format option - that's a feature for frames (lossless) and a mild annoyance if you wanted WebP. It overwrites silently: same batch_name and frame_number twice and the second run clobbers the first, no warning. And the "first frame only" behavior surprises people who feed it a whole video expecting a batch of files - for that job the pack's sibling "Save Video Images JNK" is the right node. This one is for the times you want one deliberate frame, saved where you want it, named the way you want it.

    CategoryπŸ”§ JNK

    Inputs (4)

    NameTypeDefaultDescription
    imageIMAGEβ€”
    output_dirSTRINGβ€”
    batch_nameSTRINGFrameβ€”
    frame_numberINT00–9999999999β€”

    Outputs (0)

    No outputs