Nodes/ComfyUI-LogicUtils/Pyobjects/Dict Remove Key
ComfyUI Node

Pyobjects/Dict Remove Key

Delete one key from a dict and keep going

By aria1th·Created 3 years ago·Updated 7 months ago· 116
Pyobjects/Dict Remove Key
  • py_dict
  • DICT
keysome_key

DictSetNode writes a key in; DictRemoveKeyNode is what takes one back out. Give it a dict and a key, and it hands back the dict with that key gone - the direct counterpart to dict.pop() or del dict[key] in plain Python.

It's part of the Dict* node family in ComfyUI-LogicUtils, a data-manipulation pack from GitHub user aria1th - publicly known as AngelBottomless, the trainer behind Illustrious XL, though this data-plumbing side of LogicUtils has nothing to do with that training work directly. These nodes wrap ordinary Python dict operations as ComfyUI graph nodes, aimed at people building programmatic, config-driven, or loop-based workflows rather than a straight generation pipeline. As with the rest of the pack, the documentation is thin - the README itself says "proper documentation is being prepared, however there are too many nodes" - so treat the schema as the ground truth and test edge cases yourself.

How it works

Wire in py_dict and type the key you want gone, and the node returns a DICT with that key removed. This is useful for cleanup steps - stripping out a temporary key you only needed mid-pipeline before dumping the rest of a dict's contents somewhere, for instance with DumpTextJsonlNode or another downstream consumer that shouldn't see internal scratch data.

Like the rest of the Dict* family, this node is flagged as an output node in ComfyUI's execution model - it runs even if its output isn't wired anywhere downstream, which is convenient if you're testing removal behavior in isolation before wiring the rest of a longer chain.

The inputs and outputs that matter

  • py_dict (DICT, required) - the dict to remove a key from.
  • key (STRING, default "some_key") - the key to remove. Type in the actual key, not the placeholder.
  • Output: a single DICT - the dict with that key gone.

How to install it

Through ComfyUI Manager: search ComfyUI-LogicUtils, install, restart. Or manually:

cd ComfyUI/custom_nodes
git clone https://github.com/aria1th/ComfyUI-LogicUtils

Restart ComfyUI. No model files needed - pure Python data handling, nothing to download. The README's opt-in auto-install hook (COMFYUI_LOGICUTILS_AUTO_INSTALL=1, disable with COMFYUI_LOGICUTILS_SKIP_INSTALL=1) is aimed at heavier parts of the pack; this node doesn't need it.

Common issues & troubleshooting

Error, or the dict looks unchanged after this node runs. If the key you typed doesn't exist in py_dict, check for a typo or case mismatch against whatever key was used with DictSetNode earlier - the schema doesn't document graceful no-op behavior for a missing key, so verify with DictKeysNode first if you're not certain the key is actually present.

Removed the wrong key. The key field is free-typed text, not a dropdown pulled from the dict's actual contents, so there's nothing stopping a typo from silently targeting the wrong entry (or an entry that doesn't exist). Cross-check against DictKeysNode's output if you're not confident about the exact key string.

You wanted to just overwrite a value, not delete it. That's DictSetNode, not this node - DictRemoveKeyNode is for removal only, it doesn't accept a replacement value.

CategoryData

Inputs (2)

NameTypeDefaultDescription
py_dictDICT
keySTRINGsome_key

Outputs (1)

NameTypeDescription
DICTDICT