Node Label (Oli)
Read the title of the node behind any wire
- node
- node
- label
Node Label (Oli) does one small thing and does it well: it passes any value through unchanged, and on a second output hands you the title of the upstream node that value came from. Set depth to hop further up the graph. That's the whole node, and it earns its place because titles are the cheapest form of metadata a workflow has.
How it works
ComfyUI stores each node's title in the workflow graph. This node reads that graph (via the same extra_pnginfo every node receives), finds the connection feeding its node input, and returns the title - your custom title if you set one, otherwise the node's default display name. depth controls how far it climbs: 1 is the direct parent, 2 the grandparent, up to 10.
Two behaviors worth knowing:
- Muted nodes are skipped. If the direct parent is muted, traversal hops over it rather than reporting a dead title.
- When several nodes feed the target level - say a Make-List-style node with multiple inputs - the labels cycle one per execution, so a series of runs walks through each contributor. Nice touch if you're watching which branch fed the list this time.
Inputs and outputs
- depth - hops to travel upstream (1 default, max 10).
- node - anything; passed through untouched.
Outputs: node (the exact input value, so it slots into a wire without changing anything) and label (the title string). The classic use is self-documenting workflows: route a branch through this node and read label into a text display or a filename, so your saved outputs say which model or prompt branch produced them without you having to remember.
Install & gotchas
cd ComfyUI/custom_nodes
git clone https://github.com/magicoli/comfyui-oli-prompt-tools
…or ComfyUI Manager → Oli Prompt Tools, then restart. No dependencies.
It re-executes every queue - that's how the label stays fresh as the graph changes - so don't be surprised it's uncached. And it depends on the graph info being present; in the UI it always is, so the only place label can come back empty is scripting or API execution without workflow data.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| depth | INT | 11–10 | — |
| nodeopt | * | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| node | * | — |
| label | STRING | — |