Nodes/ComfyUI-Info-Prompt-Toolkit/Image Info Encryption Targets
ComfyUI Node

Image Info Encryption Targets

Choose what stays secret in the metadata you share

By kinorax·Created 4 months ago·Updated 25 days ago· 2
Image Info Encryption Targets
    • encryption_targets
    modelfalse
    refinerfalse
    detailerfalse
    lora_stackfalse
    clipfalse
    vaefalse
    positivefalse
    negativefalse
    stepsfalse
    samplerfalse
    schedulerfalse
    cfgfalse
    seedfalse
    width_x_heightfalse
    extra_keys[]

    This is the node that gives the Info-Prompt-Toolkit pack its reason to exist. ComfyUI's sharing culture runs on metadata: the workflow - prompt, model, seed, everything - is embedded in the output PNG, and dragging the image back reconstructs the whole generation. That's a feature right up until you want to post an image without the world seeing exactly how you prompted it. IPT-ImageInfoEncryptionTargets is your "what stays private" form: you tick the fields you don't want public, and the pack encrypts just those before the metadata is written, while keeping everything else in normal, A1111/Civitai-compatible infotext that still round-trips through Civitai and other tools.

    This is the declaration node. It doesn't encrypt anything itself - it builds a list of targets. You then hand that list to IPT-SetImageInfoEncryptionTargets, which attaches it to your image_info, and the saver nodes (Image Saver, Referenced Image Saver, Video Saver) do the actual encrypting when they write the file.

    How it works

    Every input here is a boolean flag for one field of image_info: model, refiner, detailer, lora_stack, clip, vae, positive, negative, steps, sampler, scheduler, cfg, seed, and width_x_height (encrypts width and height together). Tick one and that field gets moved into the encrypted payload at save time instead of the public infotext. The last input, extra_keys, is a JSON list for image_info.extras - custom keys that aren't one of the fixed fields - and the node's frontend gives you a toggle editor for it rather than making you type JSON by hand.

    The encryption itself is AES-256-GCM with a key you configure in ComfyUI Settings → Info-Prompt-Toolkit → Metadata Encryption. The default is a device-derived key, so it mostly "just works" on your own machine, but you can set a custom key and an optional fallback decryption key. Public fields stay plaintext and compatible with Civitai's metadata parser; the encrypted ones go into a private metadata area only the pack's reader nodes can restore.

    The inputs that matter

    • The 14 field toggles - positive and negative are the ones most people tick first; they're the most identifying content in the metadata.
    • extra_keys - JSON rows for extras to encrypt (toggle editor in the UI).
    • lora_stack and model - tick these if you don't want people seeing which LoRAs or checkpoint you used.

    One output: encryption_targets, wired into IPT-SetImageInfoEncryptionTargets.

    Installing it

    Part of the IPT pack:

    cd ComfyUI/custom_nodes
    git clone https://github.com/kinorax/comfyui-info-prompt-toolkit.git
    cd comfyui-info-prompt-toolkit
    pip install -r requirements.txt
    

    Restart ComfyUI (or use ComfyUI Manager, "ComfyUI-Info-Prompt-Toolkit"). The cryptography package in requirements is what powers the AES encryption, and the install pulls it in.

    Where people get burned

    The big one: your encrypted fields are only as recoverable as your key. The device-derived default is tied to this machine, so a file saved on one PC won't have its hidden fields restored on another - and if you set a custom key and lose it, those fields are gone forever. That's the design working as intended (that's the point of encryption), but back up the key if you care about recovering settings later. Second: encryption hides fields from other tools, but it doesn't make the image's pixels anonymous - the prompt may be locked away while the LoRA stack is still public if you didn't tick it. Third: the reader side needs the pack installed to unlock anything, so an encrypted image shared with someone who doesn't run IPT is an image with permanently missing metadata to them.

    CategoryInfo-Prompt-Toolkit/ImageInfo

    Inputs (15)

    NameTypeDefaultDescription
    modelBOOLEANfalseIf true, save image_info.model in the encrypted metadata area.
    refinerBOOLEANfalseIf true, save image_info.refiner in the encrypted metadata area.
    detailerBOOLEANfalseIf true, save image_info.detailer in the encrypted metadata area.
    lora_stackBOOLEANfalseIf true, save image_info.lora_stack in the encrypted metadata area.
    clipBOOLEANfalseIf true, save image_info.clip in the encrypted metadata area.
    vaeBOOLEANfalseIf true, save image_info.vae in the encrypted metadata area.
    positiveBOOLEANfalseIf true, save image_info.positive in the encrypted metadata area.
    negativeBOOLEANfalseIf true, save image_info.negative in the encrypted metadata area.
    stepsBOOLEANfalseIf true, save image_info.steps in the encrypted metadata area.
    samplerBOOLEANfalseIf true, save image_info.sampler in the encrypted metadata area.
    schedulerBOOLEANfalseIf true, save image_info.scheduler in the encrypted metadata area.
    cfgBOOLEANfalseIf true, save image_info.cfg in the encrypted metadata area.
    seedBOOLEANfalseIf true, save image_info.seed in the encrypted metadata area.
    width_x_heightBOOLEANfalseIf true, save image_info.width and image_info.height in the encrypted metadata area.
    extra_keysSTRING[]JSON rows used by the extra key toggle editor. Enabled keys in image_info.extras are encrypted.

    Outputs (1)

    NameTypeDescription
    encryption_targetsIPT-ImageInfoEncryptionTargets