🔓 Xiaoxiao Decrypt (潇潇图片解混淆)
How to unscramble those 潇潇-obfuscated images back into pictures
- image
- image
XiaoxiaoDecrypt (displayed as "🔓 Xiaoxiao Decrypt (潇潇图片解混淆)") is the other half of the obfuscation pair in ComfyUI-FastTool. If you've ever opened a folder of PNGs that look like static noise and wondered who broke your images - that's this family. The encrypt node scrambles pixel positions along a space-filling curve using a password as the shuffle seed; this node applies the inverse permutation and puts the pixels back. Same password, same dimensions, picture restored.
The "解混淆" in the display name is the honest word: this de-obfuscates, it doesn't "decrypt" in the cryptographic sense. The mechanism is a deterministic pixel reorder, so it's fast (no expensive crypto), fully reversible, and utterly dependent on you getting two things right: the password and the image dimensions. There's no key to manage, no nonce, no integrity check - which is also exactly why it can't tell you the password is wrong. Give it the wrong string and it happily produces confident, scrambled-looking static.
When you'd reach for it
Three cases, basically. Someone shared an obfuscated preview (challenge thumbnails, teasers) and you have the password. You encrypted a batch of your own WIPs and want them back. Or you're building a workflow where a generation gets scrambled mid-graph (say, a preview stage) and needs unscrambling before it goes to a SaveImage. The node runs as a standard graph node, so it slots into any of those.
Inputs and outputs
image(optional) orinput_folder(optional) - decrypt whatever's flowing through the graph, or point at a folder of PNGs/JPGs/WebPs for batch mode. Folder mode uses a thread pool (max_workers, default 4) and writesdec_<name>.pngfiles.password- must match the one used to encrypt. Empty works only if the encrypt side also used an empty password (a fixed, password-less shuffle - the worst of all worlds, don't).output_folder(defaultoutput_xiaoxiao) - where the restored PNGs land, relative to your ComfyUI root.strip_metadata(defaulttrue) - on the decrypt side this just controls whether any metadata that survived the obfuscated file is carried into the restored PNG. Since obfuscation normally stripped it, this rarely matters; but if you kept an original with metadata and round-tripped it, note that ComfyUI-style workflow metadata will not come back from a metadata-less file.max_preview(default 4) - the node returns the lastmax_previewrestored images as its output batch.
Output is a single image - the restored batch - plus the files on disk.
Install
Part of ComfyUI-FastTool; one install covers the whole pack:
cd ComfyUI/custom_nodes
git clone https://github.com/Fengxiaoxiao-001/ComfyUI-FastTool.git
Or ComfyUI Manager (search "FastTool"), then restart. No pip dependencies - it's pure numpy/torch/Pillow.
Where people get burned
- Same dimensions, always. The shuffle is derived from the image's width and height at encrypt time. An image encrypted at 1024×1024 will not decrypt correctly at 512×512 - you'll get noise, silently. Resize back to the original before decrypting.
- Wrong password gives no warning. Test with a single image and a known-good password before burning a whole folder through it. The node can't detect a mismatch.
- Lost metadata stays lost. If the obfuscated PNG had its workflow metadata stripped (the default), decrypting won't conjure it back. Keep the originals if you'll ever need the generation settings.
- It's reversible by anyone with the source. The algorithm ships in the pack. Treat this pair as spoiler-prevention, not security - and never base a real password on something you care about.
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 | — |