Skip to content
Node packVerifiedExternal
Open source

comfyui_image_metadata_extension

Custom node for ComfyUI. It adds additional metadata for saved images, ensuring compatibility with the Civitai website.

Maintainer@edelvardenBgrade

Package profile

Status
Verified
Publisher
@edelvarden
Source
GitHub
Stars
88

README

ComfyUI Image Metadata Extension

node-preview

Custom node for ComfyUI. It adds additional metadata for saved images, ensuring compatibility with the Civitai website.

This is a fork of nkchocoai/ComfyUI-SaveImageWithMetaData.

Key differences:

  • Simplified the node by removing unnecessary fields for general use.

  • Included metadata for LoRa weights.

  • The subdirectory_name field allows you to specify a custom name or use mask values to create a subdirectory for saved images. For example, using the mask %date:yyyy-MM% (formatting options) will create a directory named with the current year and month (e.g., 2024-10), organizing your images by the date they were generated.

  • The output_format defines the saved image format:

    • png, jpg, webp – saves in the specified format.
    • png_with_json, jpg_with_json, webp_with_json – saves in the chosen format and writes workflow metadata to a JSON file with the same name.
  • The quality option has the following levels:

    • max / lossless WebP – 100%
    • high – 80%
    • medium – 60%
    • low – 30%

    (Lower quality, smaller file size. PNG images ignore this setting.)

  • The metadata_scope option controls metadata inclusion:

    • full – default metadata with additional metadata.
    • default – same as the SaveImage node.
    • parameters_only – only A1111-style metadata.
    • workflow_only – workflow metadata only.
    • none – no metadata.

Installation

Recommended Installation

Use the ComfyUI-Manager to install.

comfyui_image_metadata_extension

Manual Installation

  1. Navigate to the custom_nodes directory inside your ComfyUI folder.
  2. Clone this repository:
 git clone https://github.com/edelvarden/comfyui_image_metadata_extension.git

Usage

Basic usage looks like (workflow.json):

workflow-preview

Lora strings are automatically added to the prompt area, allowing the Civitai website to understand the weights you used. Other metadata is also successfully included.

website-preview

Formatting Options

  • The filename_prefix and subdirectory_name support the following options:
KeyInformation to be Replaced
%seed%Seed value
%width%Image width
%height%Image height
%pprompt%Positive prompt
%pprompt:[n]%First n characters of positive prompt
%nprompt%Negative prompt
%nprompt:[n]%First n characters of negative prompt
%model%Checkpoint name
%model:[n]%First n characters of checkpoint name
%date%Date of generation (yyyyMMddhhmmss)
%date:[format]%Date of generation
  • See the following table for the identifiers specified by [format] in %date:[format]%:
IdentifierDescription
yyyyYear
MMMonth
ddDay
hhHour
mmMinute
ssSecond

Supported Nodes and Extensions

  • Comfy Core Nodes:

    • modules/defs/samplers.py
    • modules/defs/captures.py
  • Third-Party Nodes:

    • modules/defs/ext/

[!TIP]
If you encounter errors with the "full" metadata sc

Nodes in this pack

1 node
  • {base_name}

Related resources

28 connections
Used byKlein_4b Essentials — v1.0Used byZ-Image Base & Turbo Pro Grade Workflow I2I/T2I (Low or High VRAM) — V8.0 upgrades + Qwen advUsed byLonecat's Illustrious/Pony/SDXL WIldcard Workflow — v2.0 Professional GradeUsed byZ Image Turbo Workflow by Stable_Yogi🔥 — Zimage Turbo v3Used byZ-Image Base & Turbo Pro Grade Workflow I2I/T2I (Low or High VRAM) — V2.0Used byZ-Image Base & Turbo Pro Grade Workflow I2I/T2I (Low or High VRAM) — V3.0 Cnet Seed VR2Used byZ-Image Base & Turbo Pro Grade Workflow I2I/T2I (Low or High VRAM) — v1.2Used byZ-Image Base & Turbo Pro Grade Workflow I2I/T2I (Low or High VRAM) — v4.0.1 InpaintUsed byIllustrious/ Pony/ SDXL SFW & NSFW Pro Grade Workflow (Low and high VRAM) — V2.0 Pro UpgradesUsed byZ-Image Base & Turbo Pro Grade Workflow I2I/T2I (Low or High VRAM) — v1.0Used byZ Image Turbo Workflow by Stable_Yogi🔥 — ZImage Turbo V3.1Used byQWEN Image Edit I2I, T2I, Edit Plus, Upscale, Seed VR2, Post Process — v1.0Used byIllustrious/ Pony/ SDXL SFW & NSFW Pro Grade Workflow (Low and high VRAM) — v5.0 Realism OverhaulUsed byIllustrious/ Pony/ SDXL SFW & NSFW Pro Grade Workflow (Low and high VRAM) — v1.0Used byZImage Turbo Essentials workflow — v1.0Used byIllustrious/ Pony/ SDXL Pro Grade Workflow (Low or High VRAM) — v7.1 multi characterUsed byIllustrious/ Pony/ SDXL Pro Grade Workflow (Low or High VRAM) — v2.ohUsed byIllustrious/ Pony/ SDXL Pro Grade Workflow (Low or High VRAM) — v4.0 Prompt enhanceUsed byZ-Image Base & Turbo Pro Grade Workflow I2I/T2I (Low or High VRAM) — V4.1.4 seed var enhanceUsed byIllustrious/ Pony/ SDXL Pro Grade Workflow (Low or High VRAM) — V3.0 Pro GradeUsed byIllustrious/ Pony/ SDXL Pro Grade Workflow (Low or High VRAM) — v5.0 UpgradesUsed byZ-Image Base & Turbo Pro Grade Workflow I2I/T2I (Low or High VRAM) — V5.3 CKPT option addedUsed byIllustrious/ Pony/ SDXL SFW & NSFW Pro Grade Workflow (Low and high VRAM) — v3.1 upgradesUsed byZ-Image Base & Turbo Pro Grade Workflow I2I/T2I (Low or High VRAM) — V6.2 Z-Image BaseUsed byA1111 To Comfyui workflow (My version) — v1.0Used bySimple 4in1 Prompt Modes For ZImageTurbo Workflow — v1.0Used byZ-Image Base & Turbo Pro Grade Workflow I2I/T2I (Low or High VRAM) — v6.3 GGUF & Better promptUsed byZ-Image Base & Turbo Pro Grade Workflow I2I/T2I (Low or High VRAM) — v2.1 CNET

Sources

2 sources
GitHubSourceVersion 0fbd59eed23268d46ac43c110246a7dcaa09295b
github.com/edelvarden/comfyui_image_metadata_extension

Verified Oct 20

Source excerpts

1 excerpt

Source context: Repo edelvarden/comfyui_image_metadata_extension