Nodes/ComfyUI-Info-Prompt-Toolkit/Remove Image Info Extra Keys
ComfyUI Node

Remove Image Info Extra Keys

Scrub the custom keys out of your metadata before you share it

By kinorax·Created 4 months ago·Updated 25 days ago· 2
Remove Image Info Extra Keys
  • image_info
  • image_info
items[]

IPT-RemoveImageInfoExtraKeysV2 is the metadata dustpan. The image-info system this pack (kinorax/ComfyUI-Info-Prompt-Toolkit) builds on stores not just the standard fields - model, prompt, sampler - but a free-form extras dictionary that other nodes keep writing into. Margin settings, Civitai hash lookups, custom tags, whatever a workflow wants to remember. That's great while the image is your working file, and potentially stuff you don't want in a publicly shared one. This node lets you pick specific keys out of extras and delete them from the image_info before a saver writes the metadata.

It's the filter half of the pack's privacy story, and it composes with the encryption half: strip what you don't want at all with this node, encrypt what you want to keep but hide with the encryption-targets pair, and save the rest as public, Civitai-compatible infotext. That exact pipeline - load image → remove extra keys → set encryption targets → save via Referenced Image Saver - is the pack's own "Filter and Encrypt Metadata Before Saving" example.

How it works

The image_info input is optional (leave it unconnected and you get an empty info object). The items input is a JSON list of keys, but you'll rarely touch the raw JSON - the node's frontend renders it as a toggle list editor, so you flip switches for the keys you want removed and they're deleted from extras. If removing keys empties the extras dictionary entirely, the node drops it, keeping the metadata clean rather than carrying an empty shell. The V2 in the name means "the editor version": the pack's earlier Remove Image Info Extra Keys (Deprecated) node took a comma-separated string instead, and this one supersedes it in new workflows.

One subtlety worth knowing: it only touches extras. The main fields - prompt, model, sampler - are out of scope here; the pack has a separate main-field removal node for those, and you'd use the encryption targets for anything you want to keep but hide.

The inputs that matter

  • image_info - the info object to scrub. Optional.
  • items - JSON rows for the key-toggle editor; enabled keys are removed from extras.

One output: image_info, with the selected extra keys gone.

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

Where people get burned

The most common confusion is expecting this to also strip the main fields - it won't; read it as "extra keys" literally. And since removal happens when the node executes (the V2 editor stores enabled/disabled state in the node's widget), a node that's bypassed or not in the executed path means nothing gets scrubbed - make sure it's actually in the chain between your image source and the saver. Match keys exactly; the removal is by exact name after trimming, so a key spelled differently in the editor and in extras sails right past.

CategoryInfo-Prompt-Toolkit/ImageInfo

Inputs (2)

NameTypeDefaultDescription
itemsSTRING[]JSON rows used by the key toggle editor. Enabled keys are removed from image_info.extras.
image_infooptIPT-IMAGEINFO

Outputs (1)

NameTypeDescription
image_infoIPT-IMAGEINFO