Save Image With MetaData:
The SaveImageWithMetaData node is designed to save images while embedding detailed metadata within the image files. This node is particularly beneficial for AI artists who want to preserve the context and parameters used during the creation of an image, such as the model details, sampler settings, and other relevant metadata. By embedding this information directly into the image file, it ensures that the creative process is documented and can be referenced or shared easily. The node supports various image formats like PNG and WEBP, and it intelligently handles file naming to avoid collisions, ensuring that each saved image is uniquely identifiable. This functionality is crucial for maintaining an organized workflow and for sharing images with embedded metadata that can be interpreted by others or by different software tools.
Save Image With MetaData Input Parameters:
filename_prefix
The filename_prefix parameter allows you to specify a prefix for the saved image files. This prefix is used to construct the final filename, which helps in organizing and identifying images. It can include placeholders that are replaced with metadata values, ensuring that filenames are informative and unique. There are no strict minimum or maximum values, but it should be a valid string that can be used in file paths.
output_format
The output_format parameter determines the format in which the image will be saved, such as PNG or WEBP. This choice affects the quality and size of the saved image, as well as the type of metadata that can be embedded. The parameter should be set to a valid image format string, with options typically including "png" and "webp".
quality
The quality parameter specifies the quality level for the saved image, particularly relevant for lossy formats like WEBP. It ranges from 0 to 100, where 100 represents the highest quality and largest file size, while lower values reduce quality and file size. This parameter allows you to balance between image fidelity and storage efficiency.
include_batch_num
The include_batch_num parameter is a boolean that determines whether to include a batch number in the filename. This is useful when saving multiple images in a batch, as it helps in distinguishing between different images generated in the same session. The default value is typically false, meaning batch numbers are not included unless specified.
metadata_scope
The metadata_scope parameter defines the extent of metadata to be embedded in the image. Options may include "FULL" for all metadata, "PARAMETERS_ONLY" for just the parameters, or other scopes as defined by the system. This parameter is crucial for controlling the amount of information stored within the image file.
Save Image With MetaData Output Parameters:
last_image_filename
The last_image_filename output parameter provides the filename of the last image saved by the node. This is useful for tracking the output of the node and for referencing the saved image in subsequent processes or for logging purposes. It ensures that you have a record of the exact file name used, which can be important for organization and retrieval.
Save Image With MetaData Usage Tips:
- Use descriptive
filename_prefixvalues with placeholders to automatically generate informative filenames that include metadata details. - Choose the
output_formatbased on your needs for quality and compatibility; use PNG for lossless quality and WEBP for smaller file sizes with acceptable quality. - Adjust the
qualityparameter to find a balance between image fidelity and file size, especially when working with large batches of images. - Set
include_batch_numto true when saving multiple images in a session to avoid filename collisions and maintain order. - Select the appropriate
metadata_scopeto control the amount of metadata embedded, ensuring that essential information is preserved without unnecessary data.
Save Image With MetaData Common Errors and Solutions:
FileExistsError
- Explanation: This error occurs when the node attempts to save an image with a filename that already exists in the target directory.
- Solution: Ensure that
include_batch_numis enabled or modify thefilename_prefixto include unique identifiers to prevent filename collisions.
InvalidFormatError
- Explanation: This error is raised when an unsupported or incorrect
output_formatis specified. - Solution: Verify that the
output_formatis set to a supported format such as "png" or "webp".
MetadataScopeError
- Explanation: This error occurs if an invalid
metadata_scopeis provided. - Solution: Check that the
metadata_scopeis set to a valid option like "FULL" or "PARAMETERS_ONLY" as defined by the system.
