✧ Private Encrypt Save Image
Save a PNG as an encrypted blob nobody can read without your token
- images
PrivateEncryptSaveImage is the "✧ Private Encrypt Save Image" node from the ComfyUI-Spellcaster pack, and it's the flip side of PrivateDecryptLoadImage: instead of loading an encrypted image, it saves one. It replaces ComfyUI's SaveImage in the same private add-on flow - the Spellcaster client's workflow rewriter substitutes it in so that generated images never exist on the server's disk as readable PNGs. Where the pack's SpellcasterOutput strips metadata for privacy, this one goes further: the file is encrypted at rest, so even someone with full access to your server's output folder gets useless ciphertext.
How it works
The incoming IMAGE tensor is encoded to PNG in memory, wrapped in a V1W AEAD envelope (ChaCha20-Poly1305, key derived via HKDF from the shared auth token), and then base64-encoded. From there it takes one of two paths:
- return_inline = false (default) - writes the envelope to your output folder as a
.v1wfile. The plaintext PNG never touches disk. Even if the workflow's privacy-cleanup step somehow fails, the file on disk is already unreadable without the token. - return_inline = true - doesn't write anything; embeds the encrypted blob in the workflow result so the client can pull it back over the API without any disk involvement at all.
Auth token resolution matches the decrypt node: ~/.spellcaster/auth_token, then SPELLCASTER_PRIVATE_AUTH_TOKEN, then a pack-local .auth_token - same token the client uses, so the keys line up.
Inputs
- images - the IMAGE tensor to encrypt (from a VAEDecode or anything upstream).
- filename_prefix - default
private_enc; becomes the base of the saved.v1wfilenames. - return_inline - boolean, default false; choose inline delivery over disk writes.
That's it. It's an output node, so no outputs to wire - it terminates the graph like SaveImage does.
Install
It ships with the whole pack:
cd ComfyUI/custom_nodes
git clone https://github.com/laboratoiresonore/ComfyUI-Spellcaster.git
or search "Spellcaster" in ComfyUI Manager, then restart. No extra pip dependencies beyond what ComfyUI already has.
Troubleshooting
The token errors are the same as the decrypt node - if you see "auth token not found" it means the shared secret isn't in any of the three lookup locations, and the fix is client-side setup, not the node. Two things people get confused by on the way out: the saved files are .v1w, not .png - you can't preview them, that's the point - and a .v1w file is useless without the matching token, so losing the token means losing the images. If that's a problem for you, this node is the wrong tool for your use case. It's a niche, deliberate-privacy tool, not a general save node; reach for it when "delete the file" isn't enough protection.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| filename_prefix | STRING | private_enc | — |
| return_inlineopt | BOOLEAN | false | — |
Outputs (0)
No outputs