Skip to content
Node packReviewedExternal
Open source

ComfyUI-Image-Saver

Save images with Civitai-compatible generation metadata in ComfyUI

Maintainer@alexopusDgrade

Package profile

Status
Reviewed
Publisher
@alexopus
Source
GitHub
Stars
189
Linked pipes
2

README

[!] Forked from https://github.com/giriss/comfy-image-saver, which seems to be inactive since a while.

Save image with generation metadata in ComfyUI

Allows you to save images with their generation metadata. Includes the metadata compatible with Civitai geninfo auto-detection. Works with PNG, JPG and WEBP. For PNG stores both the full workflow in comfy format, plus a1111-style parameters. For JPEG/WEBP only the a1111-style parameters are stored. Includes hashes of Models, LoRAs and embeddings for proper resource linking on civitai.

You can find example workflows in the examples directory.

You can also add LoRAs to the prompt in <lora:name:weight> format, which would be translated into hashes and stored together with the metadata. For this it is recommended to use ImpactWildcardEncode from the fantastic ComfyUI-Impact-Pack. It will allow you to convert the LoRAs directly to proper conditioning without having to worry about avoiding/concatenating lora strings, which have no effect in standard conditioning nodes. Here is an example: workflow

This would have civitai autodetect all of the resources (assuming the model/lora/embedding hashes match): image

How to install?

Method 1: Manager (Recommended)

If you have ComfyUI-Manager, you can simply search "ComfyUI Image Saver" and install these custom nodes.

Method 2: Easy

If you don't have ComfyUI-Manager, then:

  • Using CLI, go to the ComfyUI folder
  • cd custom_nodes
  • git clone [email protected]:alexopus/ComfyUI-Image-Saver.git
  • cd ComfyUI-Image-Saver
  • pip install -r requirements.txt
  • Start/restart ComfyUI

Customization of file/folder names

You can use following placeholders:

  • %date
  • %time – format taken from time_format
  • %time_format<format> – custom datetime format using Python strftime codes
  • %model – full name of model file
  • %basemodelname – name of model (without file extension)
  • %seed
  • %counter
  • %counter<padding> – zero-padded counter (e.g. %counter<03> with counter 1 becomes 001)
  • %sampler_name
  • %scheduler
  • %steps
  • %cfg
  • %denoise

Example:

filename valueResult file name
%time-%basemodelname-%cfg-%steps-%sampler_name-%scheduler-%seed2023-11-16-131331-Anything-v4.5-pruned-mergedVae-7.0-25-dpm_2-normal-1_01.png
%time_format<%Y%m%d_%H%M%S>-%seed20231116_131331-1.png
%time_format<%B %d, %Y> %basemodelnameNovember 16, 2023 Anything-v4.5.png
img_%time_format<%Y-%m-%d>_%seedimg_2023-11-16_1.png

Common strftime format codes for %time_format<format>:

CodeMeaningExample
%YYear (4-digit)2023
%yYear (2-digit)23
%mMonth (01-12)11
%BMonth name (full)November
%bMonth name (short)Nov
%dDay (01-31)16
%HHour 24h13
%IHour 12h01
%MMinute13
%SSecond31
%pAM/PMPM
%AWeekday (full)Thursday
%aWeekday (short)Thu
%FYYYY-MM-DD2023-11-16
%THH:MM:SS13:13:31

Optional: Pipe Integration (Advanced Orchestration)

For orchestrating complicated workflows—such as projects involving dozens of character scenarios each with multiple scenes—the standard wiring can become dense. To help manage this, an optional Pipe system is available.

The pipe system bundles all metadata and image saver settings into a single connection, allowing you to pass them through a workflow and branch them efficiently.

When Should I Need Pipe?

In

Nodes in this pack

31 nodes
  • Any to String (Image Saver)
  • Cfg Literal (Image Saver)
  • Checkpoint Loader with Name (Image Saver)
  • Civitai Hash Fetcher (Image Saver)
  • Conditioning Concat Optional (Image Saver)
  • Edit Image Saver Pipe
  • Empty Latent (Image Saver)
  • Float Literal (Image Saver)
  • Image Saver
  • Image Saver (From Pipe)
  • Image Saver Metadata
  • Image Saver Simple
  • Input Parameters (Image Saver)
  • Int Literal (Image Saver)
  • Make Image Saver Metadata Config
  • Make Image Saver Pipe
  • Make Image Saver Simple Config
  • Random Artist Picker (Image Saver)
  • Random Character Picker (Image Saver)
  • Random Tag Picker (Image Saver)
  • RandomShapeGenerator
  • Read Image Saver Pipe
  • Sampler Selector (Image Saver)
  • Scheduler Selector (Eff.) (Image Saver)
  • Scheduler Selector (Image Saver)
  • Scheduler Selector (inspire) (Image Saver)
  • Seed Generator (Image Saver)
  • String Literal (Image Saver)
  • UNet loader with Name (Image Saver)
  • Width/Height Literal (Image Saver)
  • Workflow Input Value (Image Saver)

Related resources

40 connections
Used byComfyUI beginner friendly Z-Image Base (or Z-Image Base GGUF) Text-to-Image with LORAs Workflow by Sarcastic TOFU — Z-ImageBase_Txt2Img_v1.0Used byいつも使っているワークフロー / MyDailyDriverWorkflow — v1.3Used byZ-Image Split-Sigma Workflow: ZiB to ZiT — v4.0Used by【HiDream】IMG to IMG — v1.0Used byComfyUI beginner friendly Flux.2 Klein 9B GGUF Simple Flawless Fast Headswap Workflows by Sarcastic TOFU — Flux2k_9B_GGUF_SWAP_v1Used byGladas' Workflow for Krea 2 Turbo — v1 — v8Used by【HiDream】INPAINT — v1.0Used byGladas' Workflow for Anima — v2 — v3Used byAnima Image to Image Inpaint & Outpaint & Upscale [Anima Edit Lora & Extend Image Lora + Inpaint Lora + ControlNet etc.] — v1.1Used byIllustrious/ Pony/ SDXL Pro Grade Workflow (Low or High VRAM) — V8.1 Region Prompt UltraUsed byA1111 To Comfyui workflow (My version) — v2.0Used byDual-Checkpoint TIPO-Enhanced SDXL Image Generation — v1.0Used byKrea 2 Pro Grade w/ Image Edit, Style Transfer, Controlnet, Multi-reference, SAM3 Detailers, & Low VRAM options — v1.1 added rebalanceUsed byKrea2 ID Edit Character Dataset Creator w/ tagger & optional RTX50xx attention fix — v3.0.1 2nd ref & UpgradesUsed byTxt2Img _ Base + Refiner _ ComfyUI _ SDXL ILLU NOOBAI PONY SD1.5 ETC _ Crix — v3.0Used byFlux2 Klein 9b/4b simple workflow (TXT2IMG, IMG2IMG, Edit, Inpaint, Outpaint, metadata export for Civitai, SeedVR2) — v1.9Used byZ-image turbo TXT2IMG, IMG2IMG, inpaint, outpaint, onlymasked inpaint, controlnet, lora manager, caption, adetailer, SeedVR2. — v1.3Used bySimple SDXL workflow with upscaling RTX | SVR2 — RTX v1.0Used bySimple ComfyUi DMD2 workflow — v1.0Used byComfyUI beginner friendly Magic WAN Image v2 GGUF Text-to-Image Workflow (With LORAs) by Sarcastic TOFU — MagicWanImagev2_T2I_v1.0Used byComfyUI beginner friendly SDXL 1.0 Seamless Fast Inpaint Workflow (With LORAs) by SarcasticTOFU [[Very Fast]] — SDXL_Image_Inpaint_v1.0Used byJibs double Turbo ZIB to ZIT Workflow — v1.0Used byUltra photo-realistic workflow | refiner, upscaling, FaceDetailer (+index elements), inpainting, controlnet, Civitai Metadata (NOOBAI-XL/ILLUSTRIOUS/SDXL) ComfyUi — v5.5Used byAnima Workflow — v1.0Used byEazy Illustrious - Workflow for ComfyUI — v0.2Used byAnima Image to Image Inpaint & Outpaint & Upscale [Anima Edit Lora & Extend Image Lora + Inpaint Lora + ControlNet etc.] — v1.1Used byTxt2Img Base XL _ Crix _ SDXL NOOBAI ILLUSTRIOUS PONY — v1.0Used byModern Easy SDXL (2026 Base for Flux & Z-Image) — v1.0Used byConsistent face 3x3 generator (discontinued) — v1.2Used byIllustrious/ Pony/ SDXL SFW & NSFW Pro Grade Workflow (Low and high VRAM) — V8.1 upgradesUsed byZ-IMAGE-TURBO + Wildcard and Color Settings — v1.0Used by【Z-IMG】IMG to IMG — v1.1Used byZ-image turbo TXT2IMG, IMG2IMG, inpaint, outpaint, onlymasked inpaint, controlnet, lora manager, caption, adetailer, SeedVR2. — v2.2Used byKrea 2 T2I with Metadata — v1.0Used byFLUX Modular WF (discontinued) — v6.0_GGUFUsed byComfyUI Image Workflows — V16Used byComfyUI Image Workflows — V17Used byComfyUI Image Workflows — V9.0Used byZ-image turbo TXT2IMG, IMG2IMG, inpaint, outpaint, onlymasked inpaint, controlnet, lora manager, caption, adetailer, SeedVR2. — v2.0Used byComfyUI beginner friendly WAN 2.1 GGUF Outpaint Workflow (With LORAs) by SarcasticTOFU — WAN_SmLORA_Outpaint_v1.0

Sources

3 sources

Source excerpts

1 excerpt

Source context: Repo alexopus/ComfyUI-Image-Saver