ComfyUI-KJNodes
Run ComfyUI Easily with InstaSD
Skip the complex setup. InstaSD helps creative professionals build workflows and deploy them to the world:
- One-click deployment
- Any model, any node
- Powerful GPUs for rapid iteration
Available Nodes
SaveImageKJ
Documentation for SaveImageKJ Node
Overview
The SaveImageKJ node is part of the ComfyUI-KJNodes for ComfyUI. This node is designed to save images from within ComfyUI workflows to a specified output directory. It allows users to define filename prefixes and specify output folders for saved images. Additionally, it provides an option to save corresponding captions or textual data alongside images.
Functionality
What This Node Does
The SaveImageKJ node takes images generated within ComfyUI workflows and saves them as files in a user-specified directory. Users can define a filename prefix, enabling organized and descriptive naming of saved images. The node is equipped with the capability to store additional textual data as separate files when required.
How It Might Be Used in ComfyUI Workflows
In complex workflows in ComfyUI, it is often necessary to save outputs at various stages for documentation, further processing, or sharing purposes. The SaveImageKJ node facilitates this by providing:
- The ability to save images created or processed within ComfyUI workflows.
- Options to customize the filenames and manage image storage locations.
- Support for saving corresponding caption files, useful for documenting image annotations or workflow provenance.
Inputs
The SaveImageKJ node accepts the following inputs:
- Images: The primary input consisting of one or more images to be saved. The images are provided as a batch and each image is saved as a separate file.
- Filename Prefix: A string defining the prefix for saved files. This prefix can incorporate formatting elements, such as date and node values, to dynamically name files.
- Output Folder: The directory where the images will be saved. Users can specify absolute or relative paths, providing flexibility in organizing outputs.
Optional Inputs
- Caption File Extension: Specifies the file extension for caption files. This input allows the user to choose how the caption information will be saved, as different file types, such as
.txt, can be specified. - Caption: A string input that can store additional information or annotations related to the image. This caption is saved as a separate text file alongside the image.
Outputs
The output of the SaveImageKJ node is:
- Filename: A string indicating the path and name of the saved image file. This output allows subsequent nodes to access or display the saved images effectively. The actual file paths can contain batch numbers and counters for unique identification.
Special Features or Considerations
- Metadata Support: The node supports saving metadata embedded in the images, such as prompts and additional information generated during the workflow. This feature ensures that all contextual data associated with an image is preserved.
- Dynamic Filename Customization: By allowing filename prefix customization, the node supports an organized and user-friendly naming scheme. Users can leverage dynamic variables in the filename, enhancing the traceability of images back to their workflow origins.
- Output Management: The node checks for directory existence and creates directories if required, avoiding errors due to incorrect paths.
Usage Considerations
When integrating the SaveImageKJ node into ComfyUI workflows, consider the following:
- Ensure that the output directory has the necessary write permissions.
- Utilize the filename prefix effectively to avoid overwriting files and maintain clarity in saved outputs.
- Leverage the caption saving feature for workflows requiring text-based annotations or descriptions alongside images.
For further information and updates on the ComfyUI-KJNodes project, please visit the GitHub repository.