Nodes/ComfyUI-ShellAgent-Plugin/Save Image (ShellAgent Plugin)
ComfyUI Node

Save Image (ShellAgent Plugin)

Stock Save Image, plus a name and a lock

By myshell-ai·Created 2 years ago·Updated 4 months ago· 45
Save Image (ShellAgent Plugin)
  • images
  • images
output_nameoutput_image
filename_prefixComfyUI
encryptfalse

Save Image (ShellAgent Plugin) is the stock ComfyUI Save Image node wearing a different hat. It does everything the built-in one does - writes your IMAGE to the output directory as a PNG, embeds the workflow in the file's metadata - and adds two ShellAgent-specific extras: an output_name that names this result for the parent app, and an encrypt toggle that XOR-scrambles the file on disk so nobody can casually open it.

If you've been using ComfyUI for more than a week, the saving half needs no introduction. The question is only when you'd pick this over the built-in node.

How it works

Under the hood it literally subclasses ComfyUI's SaveImage - same save_images call, same output folder, same PNG metadata. On top of that it calls a validate() method that reports the output's schema to ShellAgent: a single image string (output_name) that the app renders and can return to the user. If you're running the workflow standalone, it saves a file exactly like the stock node and the extra fields are inert.

The encrypt toggle is the real divergence. When on, after saving, the node re-reads the file and XORs it with the pack's fixed key (ShellAgentSecretKey2024!, hardcoded in the source). Result: a PNG that no image viewer can open. The pack's Input Image node can decrypt it back if you also toggle that node's encrypt - handy for passing protected intermediates between workflows, but mostly this exists so an app can hand the user a file that only the backend can read.

Inputs that matter

  • images - the tensor to save. Straight from your VAE Decode or any image output.
  • filename_prefix - same as the stock node, including the formatting tokens like %date:yyyy-MM-dd% or %Empty Latent Image.width%. Defaults to ComfyUI.
  • output_name - the name this result carries back to ShellAgent. Default output_image. Make it unique if you save several images.
  • encrypt - off unless you specifically want an unviewable file.

The single images output is a pass-through of what you saved, so you can chain the node mid-graph and still feed a preview downstream.

Installing it

Same one-pack install as everything in this family:

cd ComfyUI/custom_nodes
git clone https://github.com/myshell-ai/ComfyUI-ShellAgent-Plugin

restart, or grab ComfyUI-ShellAgent-Plugin from ComfyUI Manager. No model downloads; the install does pull in opencv-python, pillow_heif and the rest of the pack's requirements.

Common issues

  • "I can't open the file I saved!" encrypt was left on. Either turn it off or decrypt with the pack's Input Image node (with encrypt enabled) - the XOR key is symmetric and shared across the pack.
  • Where did my image go? Standard ComfyUI behavior - check ComfyUI/output/, same place the stock node writes. Subfolders follow filename_prefix.
  • Two saves, same name? Colliding filename_prefix values get a counter suffix, same as stock behavior.
  • The app doesn't show my image. Check output_name - a duplicate name across two save nodes confuses the app's schema.

It's the plural-friendly sibling Save Images that reports an array to the app; this one reports a single image. Pick this for the common "the workflow made one picture" case.

Categoryshellagent

Inputs (4)

NameTypeDefaultDescription
imagesIMAGEThe images to save.
output_nameSTRINGoutput_image
filename_prefixSTRINGComfyUIThe prefix for the file to save. This may include formatting information such as %date:yyyy-MM-dd% or %Empty Latent Image.width% to include values from nodes.
encryptBOOLEANfalseIf enabled, the saved image will be encrypted and cannot be viewed directly. Use the same key to decrypt elsewhere.

Outputs (1)

NameTypeDescription
imagesIMAGE