ComfyUI  >  Nodes  >  Crystools >  🪛 Save image with extra metadata

ComfyUI Node: 🪛 Save image with extra metadata

Class Name

Save image with extra metadata [Crystools]

Category
crystools 🪛/Image
Author
Crystian (Account age: 4118 days)
Extension
Crystools
Latest Updated
6/20/2024
Github Stars
0.5K

How to Install Crystools

Install this extension via the ComfyUI Manager by searching for  Crystools
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter Crystools in the search bar
After installation, click the  Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Cloud for ready-to-use ComfyUI environment

  • Free trial available
  • High-speed GPU machines
  • 200+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 50+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

🪛 Save image with extra metadata Description

Save images with embedded metadata for AI artists, supporting PNG and JPEG formats with robust error handling.

Save image with extra metadata [Crystools]:

The Save image with extra metadata [Crystools] node is designed to save images while embedding additional metadata into the image file. This node is particularly useful for AI artists who want to preserve detailed information about their creative process, such as prompts and other custom metadata, directly within the image file. By doing so, it ensures that all relevant data is stored in a single file, making it easier to manage and share. The node supports both PNG and JPEG formats, handling metadata differently based on the image type. It also provides robust error handling to ensure that metadata is correctly parsed and embedded, even if the input data is not perfectly formatted.

Save image with extra metadata [Crystools] Input Parameters:

image

This parameter represents the image to be saved. It can be in various formats, such as PNG or JPEG. The image is the primary input, and its content will be preserved while additional metadata is embedded.

filename_prefix

This parameter specifies the prefix for the filename under which the image will be saved. It helps in organizing and identifying saved images by providing a custom naming convention.

prompt

This parameter contains the prompt or description associated with the image. If provided, it will be embedded into the image metadata, allowing you to retain the context or inspiration behind the image.

extra_pnginfo

This parameter is a dictionary containing additional metadata to be embedded into the image. It can include any custom information you want to store within the image file. If not provided, no extra metadata will be added.

with_workflow

This boolean parameter determines whether the workflow information should be included in the metadata. If set to True, the workflow details will be copied and embedded into the image metadata.

metadata_extra

This parameter allows you to provide extra metadata in JSON format. It can include any additional information you want to embed into the image. If the JSON is not correctly formatted, it will be stored as a string.

Save image with extra metadata [Crystools] Output Parameters:

result

This parameter contains the metadata extracted from the saved image. It includes all the embedded information, such as prompts and custom metadata, allowing you to verify that the data has been correctly saved.

ui

This parameter provides a dictionary with UI-related information, including the saved image details. It helps in displaying the saved image and its metadata within the user interface.

Save image with extra metadata [Crystools] Usage Tips:

  • Ensure that the metadata_extra parameter is correctly formatted in JSON to avoid errors during parsing.
  • Use the filename_prefix parameter to organize your saved images systematically, making it easier to locate and manage them later.
  • Set the with_workflow parameter to True if you want to retain detailed workflow information within the image metadata, which can be useful for complex projects.

Save image with extra metadata [Crystools] Common Errors and Solutions:

Error parsing metadata_extra (it will send as string)

  • Explanation: This error occurs when the metadata_extra parameter is not correctly formatted in JSON.
  • Solution: Ensure that the metadata_extra parameter is a valid JSON string. Use online JSON validators to check the format before inputting it into the node.

Source: Empty on CImageSaveWithExtraMetadata

  • Explanation: This error indicates that the input image is None or not provided.
  • Solution: Verify that the image parameter is correctly set and that the image file exists and is accessible.

Error parsing metadataFromImg 'workflow'

  • Explanation: This error occurs when the workflow metadata in the image is not correctly formatted.
  • Solution: Ensure that the workflow metadata is correctly formatted in JSON. If the error persists, check the source of the workflow metadata for any inconsistencies.

Error parsing metadataFromImg 'prompt'

  • Explanation: This error indicates that the prompt metadata in the image is not correctly formatted.
  • Solution: Verify that the prompt metadata is a valid JSON string. Correct any formatting issues before embedding it into the image.

🪛 Save image with extra metadata Related Nodes

Go back to the extension to check out more related nodes.
Crystools
RunComfy

© Copyright 2024 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals.