Nodes/Boyonodes/Boyo Paired Saver
ComfyUI Node

Boyo Paired Saver

Save each image next to its prompt as a numbered pair — your dataset starts here

By DragonDiffusionbyBoyo·Created 2 years ago·Updated 26 days ago· 16
Boyo Paired Saver
  • image
    enhanced_prompt
    folder_namebatch_output
    filename_prefixgenerated

    Most save nodes write an image and call it a day. Boyo Paired Saver writes an image and its prompt text as a numbered pair into a folder, which is exactly the file layout that training-data pipelines expect: a set of images, each with a same-named .txt sitting next to it holding the caption. If you've ever assembled a dataset for LoRA training or a ControlNet job by hand, copying prompts into notepad files one at a time, you know why this node exists. It kills that entire chore.

    The "paired" in the name is doing real work here - it's not just an image saver, it's an image + caption writer. The enhanced_prompt input is a string, and whatever flows into it gets saved verbatim as the sidecar text file. This is the output node of a dataset-building workflow: generate, prompt, pair, repeat.

    How it works

    It saves into ComfyUI/output/<folder_name>/, creating the folder if needed. Filenames are filename_prefix + a zero-padded sequence number - generated001.png and generated001.txt, then generated002, and so on. The clever bit is how it picks the starting number: it scans the folder for existing files with your prefix, finds the highest number, and continues from there. So re-running or restarting doesn't overwrite previous batches, and adding images to an existing dataset just extends it instead of clobbering it. That's a small detail that saves real pain when a training run needs a few dozen more images.

    The sequence counter is tracked per folder_name + filename_prefix combination, so you can run multiple distinct datasets through one workflow without their counters colliding.

    Inputs

    • image - the image to save. First frame of the batch is what lands on disk.
    • enhanced_prompt - the caption. Wire this from your prompt-enrichment chain or a text node. Saved as name.txt.
    • folder_name (default batch_output) - subfolder under ComfyUI's output directory.
    • filename_prefix (default generated) - the filename stem.

    No outputs - it's a terminal output node. It's meant to be the last thing in the chain.

    Installation

    Part of Boyonodes, zero extra dependencies:

    cd ComfyUI/custom_nodes && git clone https://github.com/DragonDiffusionbyBoyo/Boyonodes
    

    restart, find it in the Boyonodes category.

    Using it well

    This node is half of the pack's dataset recipe. The other half is Boyo Image Grab: if you're building an editing dataset, you can point Image Grab at a folder of source images, run an editing pass, and have Paired Saver record each edit next to its prompt - building a training set as a byproduct of normal work. The author built this pair for exactly that, and it's the most coherent story in the whole pack.

    One honest note: it saves the first frame of the image batch as PNG, which is the right call for training data but means it's not a general-purpose video or multi-image saver. If you need that, it's the wrong tool. For image+prompt pairs destined for a trainer, it's quietly excellent - the "continue from the highest number" behavior alone beats any manual numbering you were doing.

    CategoryBoyonodes

    Inputs (4)

    NameTypeDefaultDescription
    imageIMAGE
    enhanced_promptSTRING
    folder_nameSTRINGbatch_output
    filename_prefixSTRINGgenerated

    Outputs (0)

    No outputs