Save Image 🔒:
SaveImageCryptIO, displayed as “Save Image 🔒,” encodes generated images, encrypts the encoded data, and saves each image as an .encrypted file in ComfyUI’s output directory. This lets you keep the saved image data encrypted rather than leaving an ordinary image file on disk. It is a workflow-ending save node: its execution reports saved-file information to the interface, but it does not provide an image socket for connecting to another node. The source shows that encoding happens before encryption; it does not specify how the encrypted files are later decrypted.
Save Image 🔒 Input Parameters:
images
The images to encode, encrypt, and save. Connect an image or image batch from an earlier node; each image in the batch is written to a separate encrypted file. The node uses the first image to establish its save path and converts each image to an 8-bit image before encoding, so the saved result follows this conversion rather than retaining the original image tensor’s precision. This input is required and has no default value or stated minimum or maximum.
filename_prefix
The starting text used to construct saved filenames. The node passes it to ComfyUI’s save-path helper, then adds a numbered counter and a suffix identifying the encoded format before .encrypted. If the resolved filename contains %batch_num%, that placeholder is replaced with the image’s position in the batch, starting at 0. This required string input defaults to ComfyUI; no length limit is specified.
format
The image format used to encode each image before encryption. The available options are PNG, JPG, WEBP, and AVIF; the execution method uses PNG by default. The chosen format appears in the encrypted filename, such as .png.encrypted. PNG encoding can include workflow metadata when that metadata is available; for the other choices, the shown encoding path passes the quality setting to the image encoder. Because the final file is encrypted, it is not a directly viewable image of the selected format.
quality
The quality value passed to the image encoder when format is JPG, WEBP, or AVIF. It defaults to 95 and accepts integers from 1 to 100 in steps of 1. This setting is not passed to PNG encoding, so changing it does not affect the shown PNG save path. Its effect on appearance and file size depends on the selected format and the available encoder.
auto_download
A boolean setting labeled “Automatically download decrypted image in browser.” It defaults to False and can be set to True or False. In the provided execution code, this value is not used: changing it does not alter the shown encryption, file-writing, or returned interface data. Do not rely on this setting alone to produce a browser download.
Save Image 🔒 Output Parameters:
This node has no declared output parameters or connectable output sockets. On successful execution, it writes encrypted files and returns interface data describing each saved file, including its filename, output subfolder, and output type; it does not return an image or encrypted data through a node socket.
Save Image 🔒 Usage Tips:
- Connect a valid image batch to
imagesand place the node at the end of your workflow. Check ComfyUI’s output directory for one.encryptedfile per image. - Use a descriptive
filename_prefixto distinguish runs. For batches, you can include%batch_num%in the prefix to make each image’s batch position visible in its filename. - Choose
PNGwhen you want the shown save path to include available prompt or extra PNG metadata. Thequalitycontrol does not apply to PNG. - For
JPG,WEBP, orAVIF, adjustqualityif the encoded image does not meet your needs. Confirm the result with a compatible decryption workflow; the encrypted file cannot be assessed by opening it as an ordinary image. - Leave
auto_downloadoff unless you have independently verified browser-download behavior in your installation, since the provided execution method does not use this setting.
Save Image 🔒 Common Errors and Solutions:
IndexError: index 0 is out of bounds or IndexError: list index out of range
- Explanation: The node reads the first image to determine the save path. An empty image batch can cause an index error; the exact wording depends on how the images were supplied.
- Solution: Check that the upstream node produced at least one image, then rerun the workflow.
PermissionError: [Errno 13] Permission denied
- Explanation: The node could not write the encrypted file to the selected output location.
- Solution: Check that ComfyUI can write to its output directory. Choose a filename prefix that resolves to a writable location, and check whether another program or file permission is blocking the save.
OSError: [Errno 28] No space left on device
- Explanation: The drive containing ComfyUI’s output directory does not have enough free space to finish writing the encrypted file.
- Solution: Free space on that drive or move ComfyUI’s output location to a drive with sufficient space, then retry.
ValueError or OSError while saving the selected format
- Explanation: Image encoding can fail if the installed Pillow environment does not support the selected format or cannot encode the image as supplied. The exact message depends on the encoder and installation.
- Solution: Try
PNGfirst. If that works, check format support in your Pillow installation before usingJPG,WEBP, orAVIF.
ModuleNotFoundError or ImportError for a CryptIO utility
- Explanation: The node imports encryption utilities from its package; a missing package file or dependency can prevent the node from loading.
- Solution: Check that the CryptIO extension is installed completely and that its required dependencies are available in the Python environment running ComfyUI. Restart ComfyUI after correcting the installation.
No browser download after setting auto_download to True
- Explanation: The provided execution method accepts this setting but does not act on it, so the absence of a download is consistent with the shown code.
- Solution: Look for the
.encryptedfile in ComfyUI’s output directory. Use a separately verified decryption and download method if you need a viewable image in your browser.
