Nodes/comfyui-huyl2-nodes/Steganography: Extract String From Alpha
ComfyUI Node

Steganography: Extract String From Alpha

Extract String From Alpha — read back what steg_alpha_embed hid

By huyl3-cpu·Created 9 months ago·Updated 4 months ago· 1
Steganography: Extract String From Alpha
  • image
  • data_string

The read half of steg_alpha_embed. Feed it an image whose alpha channel has text hidden in its low-order bits, and it reads that text back out. If nothing touched the image between embedding and here - no resize, no lossy re-save, no accidental flattening to RGB - this hands you back exactly what went in.

How it works

It's almost certainly reversing the same least-significant-bit trick the embed node uses: pull the low-order bits out of each alpha value across the image and decode them back into text. There's no password or key involved on either end of this pack's implementation, so this is a plain reversal, not a cryptographic unlock - anyone with steg_alpha_extract and your image can read whatever's hidden in it.

The inputs and outputs that matter

  • image - the IMAGE to check, presumably an output of steg_alpha_embed (or anything else using the same alpha-LSB scheme).

One output: data_string - the recovered text.

Installing it

ComfyUI Manager: search comfyui-huyl2-nodes, install, restart. By hand:

cd ComfyUI/custom_nodes
git clone https://github.com/huyl3-cpu/comfyui-sortlist

restart. Not documented in the pack's README, but no unusual dependencies - basic image/array manipulation that any working ComfyUI install already has the libraries for.

Common issues & troubleshooting

Empty or garbage output is almost always a round-trip problem, not a bug in this node. Work backward through the chain between embed and here:

  • Was the intermediate file saved as PNG, not JPEG or WebP? Lossy formats destroy the encoded bits, and JPEG doesn't even carry an alpha channel to begin with.
  • Was the image resized or re-encoded at any point? Any interpolation shuffles the low-order bits this scheme depends on.
  • Does the file still have an alpha channel? Some save/load paths in ComfyUI silently flatten RGBA down to RGB - if that happened, there's nothing left to read.

If you're trying to decode something that wasn't produced by this exact pack's steg_alpha_embed, this node likely won't help - steganography schemes aren't interoperable by default, and there's no indication in the schema that this one follows any standard beyond its own paired embed node. For images with data hidden in RGB channels instead of alpha (a more common technique generally), see this pack's steg_rgb_extract - though note that node has no matching embed counterpart shipped in this pack either, so you'd need an external tool to have written the data in the first place.

One more thing worth knowing before you build anything around this pair: there's no key or password involved on either end. steg_alpha_embed doesn't take one, and this node doesn't ask for one either - it just scans the alpha channel and decodes whatever it finds. That means this extract node will also happily attempt to decode alpha channels that were never touched by steg_alpha_embed at all, and it has no way of telling you "there's nothing hidden here" versus "there was something here and it got corrupted" - both cases just come back as garbage or an empty string. If you need to distinguish those two situations reliably, you'll want to embed a known marker string first and check for it, rather than trusting a blank result to mean anything specific.

Categorycustom/steganography

Inputs (1)

NameTypeDefaultDescription
imageIMAGE

Outputs (1)

NameTypeDescription
data_stringSTRING