Chick Restore Image
Getting your pixels back out of a carrier
- chick_image
- images
What it's for
Chick Restore Image is the decoder half of Chick Hide. Feed it a carrier - one of those chick pictures with a payload in the low bits - plus the password you encoded with, and it gives you back a normal IMAGE batch you can preview, save, upscale, or drop back into a pipeline.
The obvious use is a round-trip check: hide something, save the carrier, load it again, confirm you got exactly what you put in. The less obvious one is receipt. If someone hands you a carrier, this is how you get the file out without leaving ComfyUI. Whether the file is your image matters here, and that's the part people trip over - see below.
It pairs with Chick Hide and Chick Private Save, and it's the only one of the three that's genuinely required in a loop: Hide makes the carrier, Private Save keeps the password out of the PNG metadata, Restore reads it back.
How it decodes
The carrier stores more than you'd expect. There's a four-byte header length up front, then a binary header with a flag for "password protected", a 32-byte password check, a 16-byte salt, the file extension, and the payload length. The bits themselves sit in the low bits of the RGB channels, most-significant bit first.
Two details make this node easy to live with. First, you don't have to tell it the LSB width - it tries 2, 6 and 8 in turn and keeps the one that parses, so a carrier made at compress=8 restores without you changing anything. Second, when a carrier is password-protected the node verifies a stored check hash before decoding the payload, so a wrong password fails cleanly instead of handing you garbage bytes.
The one real limitation is what can come back out. Restoration only produces IMAGE data from a PNG payload, because the payload gets decoded and turned into a tensor. If the carrier was built to hold an MP4 or a WAV - a multi-frame batch, or anything with audio connected - this node refuses with a message telling you to use the local result viewer for video and audio. That's the bundled receiver:
cd ComfyUI/custom_nodes/ComfyUI-ChickTools
python tools/local_callback_server.py --port 8765 \
--carrier-dir /path/to/ComfyUI/output/ChickTools \
--password your-password
Open http://127.0.0.1:8765/, start the listener, and it scans that directory for new carriers, decodes them, and shows PNG, MP4 or WAV inline with the right player. The password stays local; it isn't displayed or written back into the media.
Inputs and output
Two inputs, one output, no options to get wrong.
chick_image(IMAGE) - the carrier. Normally a LoadImage reading the PNG out ofComfyUI/input/.password(STRING) - whatever you encoded with. Blank only works on an unprotected carrier.
Output is images (IMAGE), a normal batch. Wire it into PreviewImage to eyeball the result, or SaveImage/Chick Private Save to keep it.
Installing it
Nothing special beyond the pack itself - no models, no extra pip step past the shared requirements. Manager route: search ChickTools. Manual route:
cd ComfyUI/custom_nodes
git clone https://github.com/chookg/ComfyUI-ChickTools.git
cd ComfyUI-ChickTools
python -m pip install -r requirements.txt
Run that with ComfyUI's Python interpreter and restart. The dependencies are requests, urllib3, numpy, Pillow and imageio-ffmpeg; restore itself only needs numpy and Pillow, so if the decoder is all you came for, you're not the one paying for the video tooling.
Where it goes wrong
By far the most common failure isn't the node - it's the carrier. The payload lives in bits that a re-encoder overwrites, so a carrier that went through Reddit, a CDN, a screenshot, or an image editor round-trip decodes to nothing. The error is a [CHICK_RESTORE_ERROR] saying the decode failed, and there's no recovery: unlike a PNG's embedded workflow, the pixels that got rebuilt don't remember what was underneath them. Always hand over the original bytes.
The rest are self-explaining. Empty password on a protected carrier gets "password is required"; a typo gets "password is incorrect" rather than silent corruption. Restoring a batch whose frames came out at different sizes or channel counts is rejected, so a mixed batch won't quietly half-load. And if you get the video/audio message, you connected a carrier this node fundamentally can't unpack - use the local result viewer rather than hunting for a setting, because there isn't one on the node. RGBA payloads come back with their alpha channel intact; RGB ones come back as RGB.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| chick_image | IMAGE | — | |
| password | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |