ComfyUI Node

pop random

Removes and returns a random key-value pair from a dictionary. This node takes a dictionary as input, removes a random key-value pair, and returns the modified dictionary along with the removed key and value. If the dictionary is empty, it returns empty values. An optional seed can be provided for reproducible selection.

By StableLlama·Created about a year ago·Updated 25 days ago· 45
pop random
  • input_dict
  • dict
  • key
  • value
  • success
seed0
CategoryBasic/DICT

Inputs (2)

NameTypeDefaultDescription
input_dictDICT
seedoptINT00–18446744073709550000

Outputs (4)

NameTypeDescription
dictDICT
keySTRING
value*
successBOOLEAN