Mememage Unlock
Decrypt a record's private fields — with a serious caveat attached
- record
- unlocked
Mememage Unlock decrypts a record's private fields. You encoded a record with some fields encrypted - via password_file or the MEMEMAGE_PASSWORD env var on the Encode node - and this is the node that brings them back to plaintext on the graph. Simple enough. But read the tooltip twice, because the warning isn't decoration: this node is for round-trip checks only. Unlocking here brings the plaintext back onto the graph, where it can land in previews and - unless ComfyUI runs with --disable-metadata - in the saved PNG's metadata. You just re-exposed what you encrypted.
Inputs and outputs
record(required) - the locked record, from Load / Find / Fetch Record, or from Encode.password_file(optional) - path to a file holding the passphrase, or setMEMEMAGE_PASSWORD. Same rule as Encode: the password comes from file/env only, never a widget, so it can't ride the graph into PNG metadata. Use the 📁 button to pick the file.
Outputs:
record- the record, with private fields decrypted and merged back in when the password worked.unlocked- boolean.Truewhen the private fields are readable in the output.Falsewhen there's no password, a wrong password, a corrupt envelope, or no encrypted fields to unlock (a record with noencrypted_fieldspasses through withunlocked = True, since there's nothing to unlock).
It never crashes on a wrong password - you just get unlocked = False and the record unchanged. That's deliberate; it keeps the graph alive so you can branch on the flag.
The context that makes the warning real
The encryption model here is worth understanding before you trust it. On Encode, listing field names in private encrypts just those; empty private with a password set encrypts everything - and encrypting anything automatically seals the embedded workflow (comfy_prompt), because the graph's widget values are those fields' plaintext. The .json record is safe on its own: encrypted_fields is ciphertext, and the password never gets written into it.
What the record encryption cannot reach is ComfyUI's own PNG metadata. ComfyUI's stock SaveImage bakes the whole graph into every PNG as text chunks (our image-io-metadata doc covers this in depth), so a secret typed into a widget rides along in the clear. That's why the README's guidance is: for actually viewing private records, use the decoder web app - it decrypts in the browser and forgets the password. Use this node to confirm your own encryption round-trips, not to consume private data.
Installing it
Part of mememage-comfy - one install for everything. ComfyUI Manager → search "Mememage" → Install → restart, or:
cd ComfyUI/custom_nodes
git clone https://github.com/sememtac/mememage-comfy
<ComfyUI-python> -m pip install mememage
Encryption needs the optional crypto library: pip install "mememage[encrypt]" (or pip install cryptography into ComfyUI's Python). Restart; it's under Mememage/Records.
Common issues
unlockedstays False with a record you're sure about. Check the password path - the resolution order ispassword_file→ env var, and a wrong password just returnsFalse, so a typo'd file path and a wrong passphrase look identical. Check the backend log.- "I unlocked it and now the save has it in plaintext." That's the documented risk. If you must work with plaintext on the graph, run ComfyUI with
--disable-metadata, or save through Mememage Save Record (which writes metadata-free PNGs). - Record with no encrypted fields returns
unlocked = True. That's "nothing to unlock," not proof of decryption. Fine for branching, but don't read it as a security guarantee.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| record | STRING | — | |
| password_fileopt | STRING | Path to a file holding the passphrase (or set MEMEMAGE_PASSWORD). Use the 📁 button. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| record | STRING | — |
| unlocked | BOOLEAN | — |