ComfyUI Node

Save Image

Saves images under ComfyUI/output with folder and file names built from prompt values. Keys: any widget name (`sampler_name`, `cfg`, `ckpt_name`; the highest-numbered node wins), `13.cfg` for node 13, `ckpt_path` / `lora_path` / `control_net_path` for the model's folder, `resolution`, strftime formats (`%F` = 2024-05-22, `%H-%M-%S`), `'fixed text'`, and `/sub`, `./sub` or `../sub` to step into a folder. Prompt and workflow are embedded in every format except BMP: PNG text chunks, otherwise EXIF `Make` (prompt) and `ImageDescription` (workflow). ComfyUI loads PNG and WebP back.

By 0xBeycan·Created 3 days ago·Updated a day ago· 0
Save Image
  • images
    ◄filename_prefixComfyUI►
    ◄filename_keyssampler_name, cfg, steps, %F %H-%M-%S►
    ◄foldername_prefix►
    ◄foldername_keysckpt_name►
    ◄delimiter-►
    ◄save_job_datadisabled►
    ◄job_data_per_imagefalse►
    ◄job_custom_text►
    ◄save_metadatatrue►
    ◄counter_digits4►
    ◄counter_positionlast►
    ◄one_counter_per_foldertrue►
    ◄image_previewtrue►
    ◄output_ext.webp►
    ◄quality90►
    ◄named_keysfalse►
    ◄positive_text_opt—►
    ◄negative_text_opt—►
    CategoryBCNodes/image

    Inputs (19)

    NameTypeDefaultDescription
    imagesIMAGE—
    filename_prefixSTRINGComfyUIFixed string the file name starts with
    filename_keysSTRINGsampler_name, cfg, steps, %F %H-%M-%SComma separated keys appended to the file name, in this order. Any widget name of any node works (`sampler_name, scheduler, cfg, denoise`, `ckpt_name`, `vae_name`, `model_name`); `13.cfg` picks node 13; `resolution` is WxH; `%F %H-%M-%S` is a strftime format; `'text'` is a fixed string; `/sub` starts a subfolder.
    foldername_prefixSTRINGFixed string the subfolder name starts with
    foldername_keysSTRINGckpt_nameSame rules as filename_keys; `/` or `../` make nested subfolders
    delimiterSTRING-One character placed between the parts; `/` makes subfolders
    save_job_dataCOMBOdisabledAppend an entry per job to jobs.json in the subfolder: prompt texts, basic data, sampler settings, loaded models
    job_data_per_imageBOOLEANfalseOne <image>.json per image instead of jobs.json
    job_custom_textSTRINGFree text saved with the job data
    save_metadataBOOLEANtrueEmbed prompt and workflow in the image (PNG text chunks, EXIF for the other formats)
    counter_digitsINT40–8Digits of the image counter: 3 gives image_001.png. Continues from the highest counter in the subfolder; 0 disables it
    counter_positionCOMBOlastimage_001.png or 001_image.png
    one_counter_per_folderBOOLEANtrueUnused
    image_previewBOOLEANtrueList the saved images in the queue / history gallery. They are never drawn under the node
    output_extCOMBO.webpFile format; AVIF and JXL appear when their Pillow plugins are installed
    qualityINT900–100Encoder quality for JPEG / JXL / WebP / AVIF / JPEG 2000 (100 = lossless for WebP / AVIF / JXL); PNG maps it to compression level 0-9
    named_keysBOOLEANfalsePrefix each value with its key: prefix-seed=123456-cfg=5.0-0001.webp
    positive_text_optoptSTRINGSaved as positive_prompt in the job data
    negative_text_optoptSTRINGSaved as negative_prompt in the job data

    Outputs (0)

    No outputs