Nodes/ComfyUI CoolB Nodes/CB Textbox ⚡️
ComfyUI Node

CB Textbox ⚡️

The string you can actually look at mid-graph

By CoolBreeze164·Created 29 days ago·Updated 21 days ago· 2
CB Textbox ⚡️
  • passthrough
  • text
◄text►

What it is, in one sentence

A text box that holds a string, shows you what it's holding after the run, and can be fed by literally anything.

You reach for it for two reasons. First, inspection: when you want to see what a node actually emitted - a filename template, a joined prompt, the output of some LLM node - without leaving the canvas. Second, as the string source for a graph that otherwise has none: a place to park your prompt so it feeds five CLIP Text Encodes from one socket instead of being retyped five times. That's the classic "one value, many consumers" plumbing pattern, and this is the pack's version of it.

It's an improved take on the textbox from ComfyUI-Chibi-Nodes, and the improvement is the second socket.

The mechanic worth understanding

text is an ordinary multiline STRING widget. passthrough is optional and typed *, the wildcard that accepts any connection. The rule is simple and the node's own tooltip states it: if something is connected to passthrough, its value replaces the widget and gets str()-ed.

So the interesting case is the cast-anything-to-string move. Wire an AUDIO, a latent, a list, a dict - you get the stringified version, and you get it on the canvas, because a small JS extension (js/textbox.js) hooks the node's executed callback and writes the returned text back into the widget. That's why the node is declared an output node: ComfyUI always runs output nodes, and this one has to run for the display to update.

There's one edge case hiding in that logic. The check is if passthrough is not None. If an upstream node legitimately outputs Python None - and plenty do, as a deliberate "leave this unconnected at runtime" signal - the passthrough is ignored and the widget text is what comes out. Same thing if you leave the socket empty.

Inputs and outputs

  • text - multiline STRING, the default value.
  • passthrough - optional *, and the tooltip means it: any input type will connect here, and the connected value overwrites the widget.
  • text output - a plain STRING, which is the one you wire into a prompt encoder or a file writer.

Installing it

Manager → Custom Nodes Manager → search ComfyUI CoolB Nodes → Install → restart. Manual:

cd ComfyUI/custom_nodes
git clone https://github.com/CoolBreeze164/ComfyUI-CoolB-Nodes

Because the on-canvas display comes from a JavaScript file in the pack's js/ directory, this is one of those nodes where you should hard-refresh your browser tab after installing or updating - browsers are happy to serve you the old frontend bundle. No Python dependencies, no models.

Common issues

The box rewrites itself every run. That's the design, not corruption. When passthrough is connected, the widget is overwritten with the incoming value and the JS writes it back to the node. Your typed text isn't lost from the graph - but it will be trivially easy to lose track of, so if the wording matters, keep it somewhere it won't get rewritten.

The display never updates. The value still flows downstream fine - the JS shim is cosmetic. If the widget stays stale, check the browser console, hard-refresh, and be aware that third-party JS extensions that poke at LiteGraph internals are exactly what ComfyUI's Nodes 2.0 frontend rewrite broke for other packs. Keeping the legacy canvas on is the standard workaround while that shakeout continues.

You wired something in and got the widget text instead. Either the connection isn't actually live, or the upstream value is None. Nothing warns you; the fallback is silent by design.

It runs on every queue even when nothing needs it. Output nodes always run - that's how ComfyUI's backwards caching works out. Harmless here, but it means an error in whatever feeds passthrough will surface on every run, not just the ones where you cared about the output.

CategoryCoolB Nodes ⚡️

Inputs (2)

NameTypeDefaultDescription
textSTRING—
passthroughopt*Can accept any input. The connected value will overwrite the widget and be converted to a string.

Outputs (1)

NameTypeDescription
textSTRING—