Nodes/Bjornulf_custom_nodes/โœจโžœ๐Ÿ“ Anything to Text
ComfyUI Node

โœจโžœ๐Ÿ“ Anything to Text

Force any value into a STRING, whether that's useful or not

By justUmenยทCreated 2 years agoยทUpdated about a year agoยท 545
โœจโžœ๐Ÿ“ Anything to Text
  • anything
  • text

The author's own description of this node is the most honest one in the whole pack: it converts anything into a STRING, "even though [the result] might be unusable." That's worth taking at face value before you reach for it. This isn't an image captioner or a smart summarizer - it's a raw type coercion that exists to satisfy ComfyUI's strict socket typing, not to make sense of whatever you feed it.

How it works

One wildcard input, one STRING output. Most values flowing through a ComfyUI graph are text-like under the hood even when they're not typed as STRING - a wildcard output from one of Bjornulf's list loopers or variable nodes, for instance, is very often genuinely text that's just not wearing the right type label. For those cases, this node is exactly right: it strips the type mismatch and lets the value flow into a Write Text, Show, or Save node that insists on a real STRING socket.

Where it stops being useful is anything that isn't secretly text to begin with - feed it an IMAGE tensor or a MODEL and you'll get some string back (a Python object representation, most likely), not a description of the image or model. The node does exactly what its name says and nothing smarter.

The inputs and outputs that matter

  • anything (required, wildcard *) - connect whatever you've got.
  • Output text (STRING) - the converted value, useful when the source was text-shaped, potentially meaningless otherwise.

How to install it

ComfyUI Manager โ†’ search Bjornulf_custom_nodes โ†’ install โ†’ restart. Manual:

cd ComfyUI/custom_nodes
git clone https://github.com/justUmen/Bjornulf_custom_nodes
pip install -r Bjornulf_custom_nodes/requirements.txt

No special dependency - pure type conversion, loads independent of the pack's heavier optional pieces.

Common issues & troubleshooting

I fed it an image and got gibberish text. That's expected, not a bug - this node doesn't understand images, it converts whatever type arrives into a string representation of it. If you actually want a text description of an image, you need a captioning node, not this converter. Use this one only when the underlying value was already text-like.

Downstream still complains about the type. Confirm the node consuming the value is wired to this node's text output specifically, not the original wildcard connection left in parallel - easy to miss when you're inserting a converter into an existing chain.

Why would something be wildcard-typed but secretly text already? Several of the pack's own nodes - list loopers, variable setters, some of the Text Generator subsystem's connectors - output a combined type (like GEN_CHARACTER,STRING) so they can plug into either their dedicated matching socket or a plain STRING input. This converter is the manual version of that: force the STRING half out explicitly when a downstream node only accepts a plain string, not the combined type.

Is this the same as the pack's "Text to Anything" node? No, it's the reverse direction. Text to Anything takes a STRING and forces it to masquerade as another type (useful when a node insists on a LIST-like type instead of a plain string); this one takes anything and forces it into a STRING.

CategoryBjornulf

Inputs (1)

NameTypeDefaultDescription
anything*โ€”

Outputs (1)

NameTypeDescription
textSTRINGโ€”