Visit ComfyUI Online for ready-to-use ComfyUI environment
Conditionally save images based on specified criteria using Save Image If True node, optimizing workflow for AI artists.
The Save Image If True node is designed to conditionally save an image based on a specified condition. This node is particularly useful when you want to automate the saving process only under certain circumstances, thereby optimizing your workflow and storage management. When the save condition is met, the node utilizes the SaveImagesMikey class to handle the image saving process, ensuring that your images are stored with the desired filename prefix and additional metadata if provided. This functionality is essential for AI artists who need to manage large volumes of generated images efficiently, saving only those that meet specific criteria.
This parameter accepts the image that you want to conditionally save. The image should be in a format recognized by the node, typically an IMAGE type. This is the primary input that the node will evaluate based on the save condition.
The save_condition parameter is an integer that determines whether the image should be saved. It accepts values of 0 or 1, with 0 meaning the image will not be saved and 1 meaning the image will be saved. The default value is 0. This parameter is crucial for controlling the conditional saving logic.
This parameter allows you to specify a prefix for the filename under which the image will be saved. It accepts a string value, and the default is an empty string. This is useful for organizing saved images with a consistent naming convention, making it easier to identify and manage them later.
This hidden parameter can be used to pass a prompt associated with the image. It is not required for the basic functionality of the node but can be useful for adding context or metadata to the saved image.
This hidden parameter allows you to include additional PNG metadata when saving the image. Like the prompt, it is not required for the basic functionality but can be useful for embedding extra information within the saved image file.
This node does not produce any direct output parameters. Instead, its primary function is to save the image to a specified location if the save condition is met. If the condition is not met, it returns a dictionary with empty filename and subfolder values, indicating that no image was saved.
<filename>
© Copyright 2024 RunComfy. All Rights Reserved.