Cowboy Node Title
Turn a node's name into data
- any_input
- title
Here's a tiny node that solves a genuinely weird problem: ComfyUI doesn't give you easy access to a node's own name as a string you can use in a workflow. Cowboy Node Title is one input, one output, and the entire trick is that you connect any output of any node and it returns that node's title - the custom title you set if there is one, otherwise the node's display name. That's it. And it's useful in ways that only make sense once you've been bitten.
The mechanics are frontend-adjacent: the node reads the title from the linked node in the graph (the source's docstring even says "Connect any output of the node whose title you want"). It's a STRING output, so it plugs into anything that takes text.
Why this exists
Three real uses:
- Filename and reporting data. You're building an auto-naming scheme and you want the prompt builder's custom title baked into filenames ("portraits/Neo-Retro Style/0001.png"). Instead of hardcoding a label that drifts out of sync when you rename the node, wire Cowboy Node Title off it and the filename follows the rename automatically.
- Logging and showAnything-style reporting. When you're dumping a workflow state to a text report, printing which node produced a value beats printing the socket name. Connect the title node off each source and your report reads like a person wrote it.
- Dynamic graphs. In a workflow where nodes get swapped in and out (a switch feeding different generators), the title reflects what actually ran - the custom title is the "what am I looking at" label, and now it's data.
The one behavior to internalize: it prefers the custom title. If you haven't set one, you get the node's display name (which for ComfyUI nodes is often different from the class name - "KSampler" vs whatever the internal class is called). So if you're relying on this for parsing, set a custom title on the source node and the output becomes stable and human-readable. Also note the input is typed as * (any type), so you can grab it off an IMAGE output, a STRING output, whatever - the title is per-node, not per-socket, so which output you tap doesn't change the result.
There are no settings, no gotchas beyond "custom title wins." It ships in TrentNodes: ComfyUI Manager (search "Trent Nodes"), or clone + pip install -r requirements.txt. It's one of those pack filler nodes that looks useless on the page and then saves you from hardcoding a label you'll forget to update.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| any_input | * | Connect any output of the node whose title you want. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| title | STRING | The connected node's title. |