🔒 Xiaoxiao Encrypt (潇潇图片混淆)
Xiaoxiao Encrypt is pixel obfuscation, not real encryption — know what you're getting
- image
- image
XiaoxiaoEncrypt (displayed as "🔒 Xiaoxiao Encrypt (潇潇图片混淆)" - the Chinese name literally says image obfuscation, which is the correct word for it) scrambles an image's pixels into what looks like static noise, so a casual viewer can't tell what the picture is. It's from the XiaoXiao family in the ComfyUI-FastTool pack, and its sibling XiaoxiaoDecrypt reverses it with the same password.
Let me be blunt up front, because the lock emoji oversells it: this is not encryption in any security sense. There's no AES, no key derivation, no authenticated cipher. The mechanism is a deterministic pixel shuffle. The code walks the image along a space-filling curve (a Hilbert-style "Gilbert" curve), hashes your password with a tiny rolling hash, and uses that as an offset to permute pixel positions. Decrypt is just the inverse permutation. Anyone who knows the algorithm - and it's open source in the pack - can reverse it by brute-forcing the offset, because the "password" only picks one number out of the image's pixel count. Treat this as hide it from people scrolling past, not hide it from people looking. Don't put anything sensitive behind it, and don't reuse a real password for it.
Where the tool is genuinely useful: you want to show or share a preview of a generation without spoiling it - a challenge/contest thumbnail, a "guess what this is" teaser, a private WIP you don't want thumbnailed on Discord. It's also a nice demonstration of the metadata problem the node is built around, which is worth its own paragraph.
The metadata half is the actually clever part
ComfyUI embeds the entire generation workflow - prompts, model, seed, the whole graph - inside every PNG it saves. The pixels are one payload; the metadata is another, in plaintext. So if you scramble the pixels but leave the workflow attached, your "encrypted" image leaks your full prompt and settings to anyone who drags it back into ComfyUI. That's why strip_metadata defaults to true here - the author knows. The image-io-metadata doc hammers this exact point: the metadata is the payload, not a footnote. If you're obfuscating for secrecy, leave that toggle on.
Inputs and outputs
image(optional) orinput_folder(optional) - you can scramble whatever's flowing through your graph, or point at a folder of PNGs/JPGs/WebPs to batch-process. If both are empty, nothing happens.password- the shuffle seed. Empty string is allowed (it degrades to a fixed, password-less shuffle - don't rely on it), but for the pair to work you must use the same password on both ends.output_folder(defaultoutput_xiaoxiao) - where theenc_*.pngfiles land, relative to your ComfyUI root unless you give an absolute path.strip_metadata(defaulttrue) - discussed above. Keep it on.max_workers/max_preview(defaults 4/4) - folder batches are processed with a thread pool (max_workers), and the node returns the lastmax_previewimages as its output.
Output is a single image (the processed batch, capped at max_preview) - usually you just save it or let the node's own folder output be the deliverable.
Install
Same pack, one install covers it:
cd ComfyUI/custom_nodes
git clone https://github.com/Fengxiaoxiao-001/ComfyUI-FastTool.git
Or ComfyUI Manager, search "FastTool", then restart. No pip dependencies.
Where people get burned
- Wrong password or wrong size = garbage, no error. The scramble is dimension-dependent: an image encrypted at 1024×1024 decrypts correctly only at 1024×1024. There's no integrity check, so a wrong password produces confident-looking static, not an error. Keep the original dimensions.
- It's lossless on the pixels but lossy on the file. Output is saved as PNG, so pixels survive intact - but the workflow metadata is gone if you stripped it. That's the point, but it means you can't recover the generation settings from the obfuscated file later. Keep the original around if you'll need it.
- It reorders pixels, it doesn't redact them. Enough samples or the right tooling can reconstruct the original ordering; treat this as a spoiler-prevention tool, not a vault.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| output_folder | STRING | output_xiaoxiao | — |
| password | STRING | — | |
| strip_metadata | BOOLEAN | true | — |
| max_workers | INT | 41–8 | — |
| max_preview | INT | 41–8 | — |
| imageopt | IMAGE | — | |
| input_folderopt | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |