Key Value
Tag a value with a name before it gets lost in the graph
- value
- *
ComfyUI wires don't carry names. Once you've got a handful of same-typed values threading through a busy part of a graph, it's genuinely easy to lose track of which one is which - especially once you're inspecting things with a debug node or collecting several of them into a single array. JN_KeyValue's whole job is attaching a short text label to a value so you (or whatever reads it downstream) can tell them apart.
It's part of JNComfy (jn-jairo/jn_comfyui), the one-person pack this node lives in alongside a wide spread of audio, face-restoration, and sampling tools. There's no real community footprint around JNComfy anywhere - it's a personal toolkit that happens to be public, not a pack with a following, so what's written here and in the README is genuinely the whole picture.
How it works
Be honest about what this node does and doesn't do: it takes value and hands it straight back out, unchanged, on a single generic output. The key field - plain text - doesn't transform anything or wrap the value in a new data structure; it's there for bookkeeping. When you're staring at a JN_Dump log line, or you've fed several JN_KeyValue outputs into an array via the pack's multi-input pattern, the key is what lets you tell which entry came from where, without having to trace the wire back through the graph by eye every time.
Because value is typed generically (thanks to the same "Easy generic inputs" patch documented in the README that lets nodes like this one accept anything), you can tag literally anything with it - a number, a string, an image, another JN array. The key field doesn't care about the type either.
The inputs and outputs that matter
value(required, any type) - what you're tagging. Passed through unchanged.key(required, text, defaults to empty) - a label, for your own reference.- Output: a single value - the same thing you put in.
Installing it
ComfyUI Manager: search "JNComfy". Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/jn-jairo/jn_comfyui
Restart. No models, no extra dependencies.
Common issues & troubleshooting
You expected a combined "key: value" object out the other side. That's not what happens - the output is exactly the value you fed in, with no new structure wrapped around it. If you need an actual key-value pairing to persist downstream, you'll have to carry the key separately (a second wire, a title on a JN_Dump next to it) rather than expecting this node to produce a dictionary-like object.
It looks like a no-op. For a single value in isolation, it basically is - the payoff only shows up once you've got several of these feeding the same downstream node (an array, a dump, a debug pass) and the labels are the only thing telling them apart. If you're using it on a graph with exactly one value in play, you probably don't need it yet.
Mixed types in an array of tagged values. Since value accepts anything, nothing stops you from tagging a string next to a tagged image and feeding both into the same array-consuming node - that'll work mechanically but whatever reads the array afterward still needs to know what to do with mixed types; JN_KeyValue itself doesn't enforce consistency.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| value | * | — | |
| key | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| * | * | — |