Nodes/ComfyUI-JNodes/Remove Metadata Key
ComfyUI Node

Remove Metadata Key

Strip a key out of your image metadata before it saves

By JaredTherriault·Created 3 years ago·Updated about a month ago· 91
Remove Metadata Key
    • BOOLEAN
    key

    When you save a generation, a pile of metadata rides along inside the file - prompts, seeds, settings, sometimes things you'd rather not broadcast. JNodes_RemoveMetaDataKey deletes one named key from that metadata before it gets written. Think of it as the eraser in JNodes' little family of png_info nodes, which all poke at the A1111-style metadata block that image parsers (and sites like Civitai) know how to read.

    The reason you'd reach for it: maybe your workflow injected a key you don't want in the shipped file - an absolute path that leaks your folder structure, a seed you want to keep private, a scratch note, or a parameter some other node added automatically. Rather than restructuring the graph, you drop this node in and name the key to remove. It's surgical: one key, gone.

    How it works

    JNodes maintains a metadata dictionary during a run - the same one the Set...InMetaData and AddOrSetMetaDataKey nodes write into. This node removes the entry matching the key you give it, so that when a downstream save node embeds metadata into the file, that key isn't there. Because it mutates shared metadata state rather than transforming pixels, graph order matters: it has to run before the save happens for the deletion to take effect.

    The inputs and outputs

    There's exactly one input and one output:

    • key (STRING) - the exact name of the metadata key to remove. This matches A1111-style png_info conventions, so it's case-sensitive and should be the literal key name (for example the same name a companion node used when it set the value).
    • BOOLEAN output - a success signal. This is an output node, so it acts as a side-effect terminal; the boolean exists mainly so you can chain it or gate other logic on whether the removal ran.

    That's the whole surface. It's deliberately minimal.

    How to install it

    Via ComfyUI Manager: Install Custom Nodes, search "JNodes", install, restart. Or by hand:

    cd ComfyUI/custom_nodes
    git clone https://github.com/JaredTherriault/ComfyUI-JNodes
    pip install -r ComfyUI-JNodes/requirements.txt
    

    then restart ComfyUI. No model downloads. It arrives as part of the full JNodes suite alongside its sibling metadata nodes.

    Common issues & troubleshooting

    Nothing gets removed - check the key name. The most common miss is a spelling or casing mismatch. The key must match exactly what's in the metadata; "Seed" and "seed" are different strings. If you're not sure of the exact name, look at what your image parser shows for an existing save, or trace which node set the value in the first place.

    Order in the graph is everything. Because this node edits metadata that the save node later reads, it needs to execute before the save. If the key still shows up in your file, the removal probably ran after (or in parallel with) the save. Wire it so it's clearly upstream of the save step.

    It's an output node, which surprises people. You don't get a modified-image pin out of it - you get a BOOLEAN. The actual effect lands in the shared metadata state, not in a value you pass along. If you expected it to transform an image, you're looking at the wrong tool; this only touches metadata.

    It only removes A1111-style keys, not ComfyUI's embedded workflow. ComfyUI also stashes the full workflow JSON in the file. This node targets the A1111-style png_info dictionary, so if your goal is stripping the workflow entirely, that's a different setting on the save node (turn off save workflow), not this node.

    Categorysd

    Inputs (1)

    NameTypeDefaultDescription
    keySTRING

    Outputs (1)

    NameTypeDescription
    BOOLEANBOOLEAN