Nodes/ComfyUI-FastImageSequence/Save Image Sequence (Fast 16-bit)
ComfyUI Node

Save Image Sequence (Fast 16-bit)

Tired of waiting for frame dumps? This saves them in parallel

By dreevelle·Created 2 months ago·Updated 11 days ago· 2
Save Image Sequence (Fast 16-bit)
  • images
    filename_prefixComfyUI
    bit_depth16-bit
    metadatafirst_frame
    threads0

    The built-in Save Image (Advanced) node has a dirty secret: when you feed it a big batch, it encodes every frame one at a time, and almost all of that time goes into single-threaded zlib PNG compression. For a video workflow that's dumping 500 frames, that's several minutes of staring at a progress bar doing nothing useful. Save Image Sequence (Fast 16-bit) is a drop-in replacement that encodes the whole batch in parallel instead. Same pixels, same bytes on disk, same file size - just much faster.

    It's the node you reach for the moment your workflow stops being "one pretty image" and becomes "a sequence." Video pipelines, frame dumps for interpolation, batch-generated animation passes - anywhere Save Image (Advanced) turns your GPU time into a CPU bottleneck.

    How it works

    The mechanism is simple and the source backs it up. The node hands each frame in the batch to a ThreadPoolExecutor, and each worker encodes its frame with PyAV's PNG codec. Here's the trick: PyAV releases the Python GIL while zlib crunches, so the threads genuinely run in parallel and encoding scales with your CPU cores instead of crawling along one frame at a time. The author measured a 16-core machine at 457 frames of noisy 1080p 16-bit content: ~170 seconds serial, ~27 seconds with the default 8 threads, ~20 seconds flat-out. Not a minor win - a 6x one.

    The output is byte-identical to Save Image (Advanced) for the same input. This node copies the PNG encode path from ComfyUI core rather than importing it, so it also won't silently break when a core update shuffles internals around.

    Files land in your ComfyUI/output folder as prefix_00000.png, prefix_00001.png, and so on, reusing ComfyUI's standard save-image naming (counter, subfolder support, all of it).

    The inputs that matter

    There are five inputs total; you'll touch about three:

    • images - the whole IMAGE batch. Wire the entire sequence into this one node. Don't split a batch across two save nodes to work around something; they'd collide on the sequential file numbering.
    • filename_prefix - default ComfyUI. Supports the usual tokens like %date:yyyy-MM-dd% or %Empty Latent Image.width%.
    • bit_depth - 16-bit (default) or 8-bit. This writes true 16-bit PNGs, IHDR depth 16 and all. One gotcha: Pillow silently downsamples 16-bit color PNGs to 8-bit when it reads them, so a PIL.Image.open(...).mode check will report RGB even though the file on disk is genuinely 16-bit. Don't panic.
    • metadata (advanced) - first_frame (default), all, or none. This is the clever bit: ComfyUI embeds your whole workflow in PNG metadata, which is how "drag the image back in" reconstruction works. By default this node embeds it in only the first frame, so the sequence stays recoverable without bloating every file. all is built-in behavior; none gives you clean files.
    • threads (advanced) - 0 (auto = min(8, CPU count)). There's no point going above your core count; the benchmark flattens out at ~20s no matter how high you go.

    Installation

    Via ComfyUI Manager (search "FastImageSequence"), or by hand:

    cd ComfyUI/custom_nodes
    git clone https://github.com/dreevelle/ComfyUI-FastImageSequence.git
    

    Then restart ComfyUI. No model downloads, and no extra dependencies - av, numpy, and torch all ship with ComfyUI already.

    Common issues

    • Batch split across two save nodes - you get colliding/overlapping file numbers. Let this one node own the whole sequence.
    • "Why is there no node in my menu?" - this pack is written against ComfyUI's newer V3 schema API, so it has no legacy NODE_CLASS_MAPPINGS dict. That's normal, not broken; it registers through comfy_entrypoint(). Make sure you're on a recent ComfyUI.
    • 16-bit looks 8-bit to your scripts - that's Pillow, not the node. The file is genuinely 16-bit.

    For the overhead it adds (a thread pool and one metadata decision), it's a remarkably boring node - and boring is exactly what you want from a saver.

    Categoryimage

    Inputs (5)

    NameTypeDefaultDescription
    imagesIMAGEThe images to save.
    filename_prefixSTRINGComfyUIThe prefix for the file to save. May include formatting tokens such as %date:yyyy-MM-dd% or %Empty Latent Image.width%.
    bit_depthCOMBO16-bitPNG bit depth per channel.
    metadataCOMBOfirst_frameWhere to embed the prompt/workflow: 'first_frame' — only the first image (recover the workflow from the sequence without bloating every frame). 'all' — every image (built-in behavior). 'none' — no metadata.
    threadsINT00–64Encoder threads. 0 = auto (min(8, CPU count)).

    Outputs (0)

    No outputs