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

Remove Image Info Extra Keys (Deprecated)

Scrub the Custom Keys From image_info Before It Goes Anywhere

By kinorax·Created 5 months ago·Updated about a month ago· 2
Remove Image Info Extra Keys (Deprecated)
  • image_info
  • image_info
key

The image_info bundle in this pack has a extras dictionary - a catch-all for custom keys that don't fit the fixed fields. Nodes stuff things in there all the time: your own bookkeeping, intermediate values, secrets you don't want in shared files. When that image_info gets serialized into saved metadata or sent downstream, everything in extras goes with it unless you take it out. IPT-RemoveImageInfoExtraKeys is the filter: give it a comma-separated list of keys and it deletes exactly those keys from image_info.extras, passing everything else through untouched.

It's the companion to the pack's Remove Image Info Main Fields (which scrubs the fixed fields like model and prompt). Together they're the "what actually lands in the metadata" control room. If you're saving images to share, or writing metadata that will be parsed by other tools, deciding what's not in the file is a real job - and this is the node for the extras half of it.

How it works

The key input is a comma-separated list; each item is trimmed and matched exactly against the keys of image_info.extras. Matching keys are removed, the rest of the bundle is returned as a new image_info. Exact matching means model won't touch a key named my_model - there's no prefix or fuzzy logic, which is a feature when you're scrubbing with precision. An unconnected or empty image_info input just passes through.

Inputs and outputs

  • image_info (optional, IPT-IMAGEINFO) - the bundle to filter.
  • key (optional, STRING, labelled "remove") - comma-separated extras keys to delete.
  • image_info (output) - the filtered bundle.

Installing it

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, or ComfyUI Manager → "ComfyUI-Info-Prompt-Toolkit". ComfyUI 0.17.0+. No models.

Common issues

The pack also ships a newer V2 of this idea (Remove Image Info Extra Keys without the deprecated tag, using a key-toggle editor fed by JSON) - if you're starting fresh and want a nicer UI for the same job, that's the one to reach for; this class is the original. The real trap with any extras scrubbing is forgetting it exists: extras is where things accumulate, and a shared image can quietly leak internal keys you never meant to publish. Run this before the saver, not after, because once the metadata is written, the removal doesn't retroactively happen. For anything you care about sharing cleanly, one of these nodes before Image Saver is cheap insurance.

CategoryInfo-Prompt-Toolkit/ImageInfo

Inputs (2)

NameTypeDefaultDescription
image_infooptIPT-IMAGEINFO
keyoptSTRINGComma-separated keys in image_info.extras to remove. Matches exact keys after trimming each item.

Outputs (1)

NameTypeDescription
image_infoIPT-IMAGEINFO