Steganography: Embed String in Alpha
Embed String in Alpha — hide text in a PNG's alpha channel
- image
- image_out
Steganography is the art of hiding data inside something that doesn't look like it's hiding anything - as opposed to encryption, which hides data behind something that obviously is hidden. This node does the classic image version: it tucks a text string into an image's alpha channel, in a way that leaves the picture looking identical to the naked eye.
The mechanism, going by the name and the well-worn technique it almost certainly implements, is least-significant-bit encoding: the alpha channel's low-order bits get overwritten with your encoded text. Those bits contribute so little to the final transparency value that the change is imperceptible - but they're also, by definition, the first thing any lossy processing step destroys. This isn't a huyl3-cpu invention; image steganography nodes are a small, recurring category across the ComfyUI ecosystem (a separate community pack called HIDEAGEM did much the same thing - password-protected file-hiding in images - back in 2023) but this specific implementation has zero public footprint I could find: no threads, no mentions, nothing.
The inputs and outputs that matter
Just two inputs:
- image - an IMAGE to hide data in.
- data_string - the text to embed, default
"secret-data".
One output: image_out - the same image, visually unchanged, with your string encoded into its alpha channel.
That's the whole node. No password, no key, no encryption - anyone who runs the matching steg_alpha_extract node on your output gets the string back out. Treat this as obfuscation, not security.
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 ComfyUI. This node isn't documented in the pack's README (which covers one unrelated video node), but there's nothing exotic about its dependencies - basic pixel manipulation, almost certainly via Pillow/NumPy, both of which ship with any working ComfyUI install already.
Common issues & troubleshooting
The one thing that actually matters here: everything after this node has to preserve the image losslessly, alpha channel included, or the hidden data is gone.
- Save as PNG, not JPEG. JPEG doesn't carry an alpha channel at all, and its lossy compression would mangle low-order bits even if it did.
- Don't resize. Any interpolation between this node and wherever you read the data back scrambles the encoded bits.
- Watch for accidental RGBA-to-RGB flattening. Some SaveImage configurations or downstream nodes strip the alpha channel entirely without telling you - if
steg_alpha_extractcomes back empty, this is the first thing to check. - Don't route it through social media or any re-compression step. Most platforms strip metadata and re-encode uploads, which is exactly the kind of lossy round-trip that destroys LSB-encoded data.
Given the fragility, this is best used for things that stay inside your own pipeline - watermarking a generated PNG with the prompt or workflow name that made it, tagging batch outputs with an index, that kind of thing - rather than anything meant to survive a trip through the wider internet.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| data_string | STRING | secret-data | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image_out | IMAGE | — |