EncryptMaster — Stego Capacity Estimator
How much can you actually hide in that image? This node does the math first
- image
- capacity_bytes
- capacity_chars
- report
Before you hide anything in an image, you need to know how much room it has. That's this node's entire job: it takes an image and a bit depth, and tells you the maximum number of bytes and characters it can hold via the pack's LSB steganography. It's pure arithmetic - no crypto, no secret - but it's the node that saves you from the pack's most annoying failure mode.
That failure mode is real. Stego Embed Text, the node you'll feed the message into, silently returns your original image unchanged if the message is too big - no error, no warning, just an image with nothing hidden in it. If you don't check capacity first, you can spend a whole session embedding and extracting, wondering why the text comes back empty, when the message never fit in the first place. Run this estimator first and you skip that entire adventure.
How it works
Least-significant-bit steganography overwrites the lowest bit (or two) of each color channel with your payload. So the raw capacity is straightforward:
capacity_bytes = width × height × 3 × bits_per_channel / 8
A 1024×1024 image at 1 bit per channel holds about 393 KB of payload; at 2 bits per channel, double that. The node then subtracts 40 bytes for the stego header (magic bytes, salt, nonce, payload length) that Stego Embed Text prepends, and reports the usable number. The capacity_chars output is that byte count treated as characters - fine for plain text, and the report itself warns that special characters and emoji eat more bytes in UTF-8.
Inputs and outputs that matter
Only two inputs, which is why this is a quick drop-in node:
image(IMAGE) - the image you plan to use as a carrier. Size is everything; a big 1216×1600 image has far more room than a 512×512 thumb.bits_per_channel-1(subtle, harder to notice, half the space) or2(double capacity, slightly more visible noise in flat areas).
Outputs are capacity_bytes (INT), capacity_chars (INT), and a report (STRING) that lays out the full math in a readable summary.
Installing it
This is one of nine nodes in the ComfyUI EncryptMaster pack - install the pack once, get them all. ComfyUI Manager can usually find it by searching "ComfyUI EncryptMaster"; if not:
cd ComfyUI/custom_nodes
git clone https://github.com/orion4d/Comfyui_EncryptMaster
Then install the actual dependencies (the repo has no requirements.txt; this is the README's list, and it matches what the code imports):
pip install cryptography pillow numpy
Restart ComfyUI and it appears under "EncryptMaster". No models, no GPU.
The honest caveat
Capacity is the raw bit budget, not a promise. An encrypted payload - which is what this pack always embeds - is ciphertext plus a 40-byte header, so it's effectively incompressible and takes the full space it claims. And the moment you re-encode the carrier as JPEG or let a social platform touch it, the LSBs you wrote are gone regardless of how much headroom you had. Capacity math is a necessary check, not a guarantee: check it, then save your result as PNG or TIFF, always.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| bits_per_channel | COMBO | 1 | 2 options: 1, 2 |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| capacity_bytes | INT | — |
| capacity_chars | INT | — |
| report | STRING | — |