Nodes/comfyui-jk-easy-nodes/JK Anything to string
ComfyUI Node

JK Anything to string

Force any wire into text

By kostenickj·Created 2 years ago·Updated 2 years ago· 8
JK Anything to string
  • input
  • STRING

ComfyUI's type system is mostly strict - a LATENT socket only takes LATENT, an INT only takes INT - except for the wildcard * type, which accepts a connection from anything. This node uses that: it takes a * input, meaning you can plug literally any wire into it - an INT, a FLOAT, a MODEL, a whole SEGS object, whatever's on hand - and it converts whatever comes out the other end to a plain STRING.

That's the entire node, and it's a genuinely handy escape hatch. Debugging a graph usually comes down to "what value is actually flowing through this wire right now," and a lot of preview/text-display nodes only accept STRING input. Rather than hunting for a type-specific converter for every value you want to inspect, you route it through this one node and it just becomes text.

The inputs and outputs that matter

One input: input, typed * - wire in anything. One output: STRING - the text representation of whatever you connected. There's no configuration here; there's nothing to tune.

The obvious pairing is a text-preview node - TextPreview, Show Text, or similar - downstream, so you can actually see the value while your workflow runs. It also pairs naturally with this pack's own string-logic nodes: JKStringEquals, JKStringEmpty, and their Not counterparts all expect STRING input, so if the value you want to gate a branch on started life as something else - a seed, a boolean, a widget from another pack - run it through JK Anything to String first.

Installing it

Bundled with the rest of kostenickj/jk-comfyui-helpers - no separate install path, already present on comfy.icu, or cd ComfyUI/custom_nodes && git clone https://github.com/kostenickj/jk-comfyui-helpers.git and restart if you're self-hosting. Nothing about this node needs a model file or an extra dependency; it's pure Python. As with the rest of this pack, it's a small personal toolkit with essentially no public discussion around it - the README and the node's own behavior are what you have to go on, not a community thread.

Common issues

There genuinely isn't much to trip on here - it's a one-line conversion. The one thing worth knowing: how a complex object (a MODEL, a SEGS, a full context bundle) gets stringified depends on Python's default string representation for that object, which is often just a memory address or a class name rather than anything human-readable. This node is great for confirming that a value is flowing and roughly what kind of thing it is; it's not going to give you a meaningful printout of, say, a model's internal weights. For genuinely useful debug output, stick to stringifying simple values - numbers, short text, booleans - where you actually get something legible back.

CategoryJK Comfy Helpers/Util

Inputs (1)

NameTypeDefaultDescription
input*

Outputs (1)

NameTypeDescription
STRINGSTRING