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

Set Image Info Encryption Targets

The tiny node that pins your encryption plan onto the metadata

By kinorax·Created 4 months ago·Updated 25 days ago· 2
Set Image Info Encryption Targets
  • image_info
  • encryption_targets
  • image_info

IPT-SetImageInfoEncryptionTargets is the glue between "what do I want to encrypt" and "actually encrypt it." On its own it does almost nothing - which is exactly what a good plumbing node should do. It takes the encryption plan produced by IPT-ImageInfoEncryptionTargets and stamps it onto your image_info object, so that when a saver node later writes the file, it knows which fields to lock away in the encrypted metadata area and which to leave as public A1111/Civitai-compatible infotext.

It ships in kinorax/ComfyUI-Info-Prompt-Toolkit, whose entire premise is selectively-encrypted metadata: keep the generation data reusable, hide the parts you don't want shared. The workflow for a privacy-conscious save goes: build or load an image_info → choose your secret fields with the targets node → run them through this node → feed the result to Image Saver (or Referenced Image Saver, if you're re-saving an existing file). That chain is literally the pack's own "Filter and Encrypt Metadata Before Saving" example workflow.

How it works

Both inputs are optional. Give it an image_info and an encryption_targets, and it merges the targets into the image_info object under the pack's internal encryption-targets key. Give it only the image_info, and any previously attached targets are stripped - which makes this the node you drop in when you explicitly want no encryption. Give it only the targets, and you get a bare image_info that carries the plan. If neither is connected, you get an empty image_info out.

The value that matters downstream is the output image_info: it's the same object, now carrying the encryption plan. Savers read that plan at write time, and the pack's reader nodes read it (with your key) to restore the hidden fields when you load the image later. Nothing is encrypted at this step - this node is paperwork, not crypto.

The inputs that matter

  • image_info - the generation data to annotate. Optional.
  • encryption_targets - the plan from IPT-ImageInfoEncryptionTargets. Optional.

One output: image_info, carrying the plan (or stripped of it, if you passed no targets).

Installing it

Part of the IPT pack - install once:

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 install via ComfyUI Manager ("ComfyUI-Info-Prompt-Toolkit"). No model downloads.

Where people get burned

Because both inputs are optional and the node never errors, it's easy to wire it backwards - targets into image_info, image_info into encryption_targets - and get a silent pass-through that saves nothing. If your saver writes a file and the metadata comes out fully plaintext, check the wiring here first. And remember the ordering: this node only attaches a plan; if you forget the targets node upstream, the plan is empty and everything stays public. It's a two-node job, and both halves have to be present for the encryption story to work.

CategoryInfo-Prompt-Toolkit/ImageInfo

Inputs (2)

NameTypeDefaultDescription
image_infooptIPT-IMAGEINFO
encryption_targetsoptIPT-ImageInfoEncryptionTargets

Outputs (1)

NameTypeDescription
image_infoIPT-IMAGEINFO