invert

Basic data handling: DictInvert

Creates a new dictionary with keys and values swapped. This node takes a dictionary as input and returns a new dictionary where the keys become values and values become keys. Note that values must be hashable to be used as keys in the new dictionary.

Pack: Basic data handling

custom_nodes.ComfyUI-basic_data_handling

Inputs (1)

NameTypeRequired
input_dictDICTrequired

Outputs (2)

NameType
inverted_dictDICT
successBOOLEAN