Visit ComfyUI Online for ready-to-use ComfyUI environment
Save batches of latent representations to disk for AI artists using generative models, supporting .npy and .npz formats with folder organization and seed value inclusion.
The SaveLatentBatch| Save Latent Batch 🍌 node is designed to save batches of latent representations to disk, providing a convenient way to store and manage these data structures for later use. This node is particularly useful for AI artists who work with generative models and need to save intermediate latent states for further processing or analysis. By saving latents in either .npy or .npz formats, this node ensures that the data is preserved in a format that is easy to reload and manipulate. The node also allows you to specify a folder for saving the files, ensuring that your data is organized and easily accessible. Additionally, the node supports the inclusion of a seed value in the filenames, which can be useful for tracking and reproducing specific results.
This parameter expects a batch of latent representations, typically generated by a generative model. The latents are saved to disk in the specified format. The latents should be provided in a dictionary format with a key "samples" containing the actual latent data.
This parameter specifies the folder where the latent files will be saved. It is a string value, and if the folder does not exist, it will be created. The default value is an empty string, which means the files will be saved in the current directory.
This parameter determines the file format for saving the latents. You can choose between "npy" and "npz". The default value is "npy". The "npy" format saves the latent data as a single array, while the "npz" format can save multiple arrays and additional metadata.
This parameter is an integer value used to generate filenames for the saved latents. It helps in tracking and reproducing specific results. The seed value is included in the filenames, followed by an index. The default value is 0, and it can range from 0 to 0xffffffffffffffff.
This node does not produce any output parameters. Its primary function is to save the provided latents to disk.
folder parameter is correct and accessible to avoid any file saving issues.seed parameter to generate unique filenames, which can help in organizing and tracking your saved latents.npy or npz) based on your needs. Use npy for simple arrays and npz if you need to save additional metadata.PermissionError: [Errno 13] Permission deniedFileNotFoundError: [Errno 2] No such file or directoryValueError: Invalid file extensionextension parameter.extension parameter is set to either "npy" or "npz". These are the only supported formats.TypeError: 'NoneType' object is not subscriptablelatents parameter is not provided or is in an incorrect format.latents parameter is a dictionary with a key "samples" containing the latent data. Verify that the data structure is correct before passing it to the node.RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Playground, enabling artists to harness the latest AI tools to create incredible art.