Nodes/comfyui_stealth_pnginfo/Save Image (Stealth)
ComfyUI Node

Save Image (Stealth)

Tattoo your workflow into the pixels so nobody can strip it

By catboxanon·Created 2 years ago·Updated about a year ago· 4
Save Image (Stealth)
  • images
  • images
filename_prefixComfyUI-Stealth
modealpha
compressedtrue
only_stealthfalse

ComfyUI already tucks your entire workflow into the output PNG as metadata. That's the whole "workflow included" culture - drag the image back in and the graph rebuilds itself. The problem this node solves: some platforms strip that metadata when you post. Save Image (Stealth) answers by not putting your workflow in the metadata at all. It hides it in the image's pixels, where exif-strippers can't find it.

The honest history first

This is a ComfyUI fork of an AUTOMATIC1111 extension from 2023, built for one specific villain: Discord was silently deleting the PNG tEXt chunks that carry prompts and workflows. Post a gen to a server, and poof, the recipe vanished. Stealth PNG Info made the data survive by writing it into the least-significant bits of the image itself.

Then Discord stopped stripping metadata - and the original author archived the repo. So here's the real take: you probably don't need this day to day. But if you post to image hosts, compression services, or Discord servers that still mangle metadata, or you want a copy of a workflow that survives any exif-scrubbing tool, this is the trick nobody else pulls off.

How it works

The node subclasses ComfyUI's built-in Save Image, so by default it writes a perfectly normal PNG with the usual prompt and parameters chunks. Then it goes further: it serializes the workflow JSON into a bitstream and hides it in pixel values.

  • alpha mode (default) adds an opaque alpha channel and stores 1 bit per pixel in the alpha channel's LSB.
  • rgb mode spreads 3 bits per pixel across the red, green, and blue LSBs - a ±1 color change your eyes will never catch, but triple the capacity.

The payload starts with a signature (stealth_pnginfo / stealth_pngcomp / stealth_rgbinfo / stealth_rgbcomp), then a length, then the data, gzip-compressed if you leave compressed on. The bundled frontend script intercepts PNG drag-drops, reads the bits back, decompresses, and loads the graph - same drag-to-restore muscle memory as normal ComfyUI, just with the data somewhere much harder to lose. PNG only, by the way: JPEG's lossy compression destroys LSBs in one pass.

The inputs that matter

  • images - what you're saving.
  • filename_prefix - default ComfyUI-Stealth; supports formatting like %date:yyyy-MM-dd% or %Empty Latent Image.width%.
  • mode - alpha or rgb. Switch to rgb if your image is small; a tiny thumbnail may not hold the whole workflow at 1 bit per pixel.
  • compressed - on by default (gzip). Leave it.
  • only_stealth - off by default, and that's the setting you want. Turn it on and the normal tEXt chunks vanish too, meaning Civitai, prompt readers, and every other tool sees nothing. Stealth-only is for when you want the metadata to exist only for people who know to look. Otherwise you get both: visible metadata for the ecosystem, hidden metadata for hostile platforms.

Installing

No models, no Python dependencies beyond what ComfyUI already ships - the browser side bundles its own gzip decoder. Easiest route is ComfyUI Manager: search comfyui_stealth_pnginfo and hit install. Or the manual way:

cd ComfyUI/custom_nodes
git clone https://github.com/catboxanon/comfyui_stealth_pnginfo

Then restart ComfyUI. You'll find Save Image (Stealth) in the image category.

Gotchas worth knowing

  • Output gains an alpha channel in alpha mode - harmless, but some viewers show the transparency layer.
  • Dragging in an image that wasn't saved by this node just falls back to normal ComfyUI handling, so nothing breaks.
  • If a stealth image won't load its workflow on drop, check it wasn't re-encoded by a lossy or resizing tool along the way - any pixel rewrite kills the bits.

It's a niche tool for a narrowing problem. But when your host of choice eats metadata for breakfast, it's the difference between sharing a workflow and sharing a pretty picture.

Categoryimage

Inputs (5)

NameTypeDefaultDescription
imagesIMAGEThe images to save.
filename_prefixSTRINGComfyUI-StealthThe 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.
modeCOMBOalpha2 options: alpha, rgb
compressedBOOLEANtrueCompress the metadata using gzip.
only_stealthBOOLEANfalseOnly save stealth metadata (no PNG tEXt chunks)

Outputs (1)

NameTypeDescription
imagesIMAGE