Nodes/comfyui_LLM_party/Any to String
ComfyUI Node

Any to String

Force any ComfyUI wire into text you can read

By heshengtao·Created 2 years ago·Updated 7 days ago· 2,321
Any to String
  • any
  • text

Debugging a ComfyUI graph usually means the same thing: you want to know what's actually flowing through a wire, right now, without redesigning the graph to find out. Any to String is the pack's answer - it accepts a connection from basically anything and turns it into a string, which ComfyUI will happily display or let you inspect.

It's one of the smallest nodes in comfyui_LLM_party, and one of the few here that has nothing specifically to do with LLMs - it's a general-purpose adapter you'll reach for constantly once you know it exists.

How it works

The any input accepts a wire of any type - ComfyUI's wildcard * type, which is what lets one input socket accept an INT, a FLOAT, an IMAGE, or a custom type from some other pack. The node converts whatever it received to its string representation and outputs that. Because it's marked as an output node, it also surfaces that value directly in the graph rather than requiring you to route it somewhere else just to see it.

The inputs and outputs that matter

  • any - the only input, typed * so it'll connect to literally anything in your graph.

Output: text (STRING) - the string form of whatever came in.

The honest caveat: for genuinely text-like values (an INT, a FLOAT, a STRING that's already text) you get something readable. For a complex object - an IMAGE tensor, a MODEL, a custom type from another pack - you'll typically get Python's default representation of that object (shape info, a type name, a memory reference) rather than anything meaningful. It's a debugging tool, not a universal "describe this in words" converter.

How to install it

Search comfyui_LLM_party in ComfyUI Manager and install, then restart. Or clone it directly:

cd ComfyUI/custom_nodes
git clone https://github.com/heshengtao/comfyui_LLM_party.git

Run pip install -r requirements.txt from inside the pack's folder using ComfyUI's own Python, then restart again. This node has no dependencies of its own worth mentioning - it's the LLM/embedding/OCR/TTS libraries elsewhere in this large pack's combined requirements.txt that occasionally cause install friction, not this one. The README's requirements_fixed.txt is there if the main install trips over a version conflict.

Common issues & troubleshooting

The output is unreadable garbage for an IMAGE or MODEL input. That's expected, not broken - this node stringifies whatever Python object it receives, and complex objects don't have a meaningful plain-text form. Use it to confirm that data is flowing and roughly what type it is, not to extract content out of a non-text type.

You wanted a value, not a debug view. If what you actually need is a real conversion - a number formatted a specific way, a structured value pulled apart into fields - this node isn't that; it's closer to Python's str() than a serializer. Reach for a type-specific node instead.

Nothing shows up in the UI. Since it's an output node, ComfyUI should render the result inline once the graph runs; if you don't see anything, confirm the node actually executed (check it isn't behind a disabled branch) rather than assuming the node itself is silent.

Category大模型派对(llm_party)/转换器(converter)

Inputs (1)

NameTypeDefaultDescription
any*

Outputs (1)

NameTypeDescription
textSTRING