ComfyUI Node

Text to Any

The node that lies about its type, and why that's useful

By 1hew·Created about a year ago·Updated 8 days ago· 33
Text to Any
    • any
    text

    The name is nearly the whole description: Text to Any takes a string and passes it through unchanged, but labels the output as type any instead of STRING. In ComfyUI's graph that little lie matters, because the editor only lets you connect an output to an input when the types line up. Re-typing your text as wildcard means you can plug it into inputs that a normal string node can't reach.

    The most common target is COMBO (dropdown) inputs. A lot of nodes render their options as a fixed list, and those inputs won't accept a plain STRING wire. Feed them through Text to Any and the connection snaps on. Same story for any node whose input is declared * - the "accepts anything" type - and for workflows where you want to drive a selector from a text file, a prior node's output, or just a prompt you can type in the box. It's also handy when you're testing: swap the dropdown for a text box and batch through a hundred candidate values without touching the UI each time.

    Before you reach for it, the honest caveat. The ecosystem has real feelings about wildcard outputs - the KB tracks the "Please Stop using the Anything Anywhere extension" backlash, and the core objection applies here too: a node that lies about its type can mask wiring mistakes until something silently does nothing. Text to Any is far more narrow than Anything Anywhere (it only emits any, it doesn't route arbitrary types around), but it inherits the same rule of thumb: know why the target input won't take a normal string before you bypass it. And if the target is a fixed COMBO list, feeding it a value that isn't one of the listed options usually just fails to select - the node downstream decides what happens, and it often means "defaults, no error."

    What it is under the hood

    A passthrough. The source is three lines of real logic: coerce the input to a string (if a list comes in, it takes the first item), return it as any. No API calls, no key, no model, no settings. It cannot turn text into a number or an image - the type is wildcard, but the payload is still a string, and any node that actually needs an INT will reject it at execution time. Think of it as changing the cable, not the signal.

    Inputs and output

    • text (STRING, multiline) - the string to pass through. Only one input, default empty.
    • Output: any (*) - the same string, re-typed as wildcard. Wire it into the COMBO or any input you're targeting.

    Installing it

    It's part of ComfyUI 1hewNodes, the utility pack from developer wangyihe1127. Install the pack and you get this node plus a couple hundred siblings for image/mask/video/text processing. ComfyUI Manager: search "ComfyUI-1hewNodes". Manual route:

    cd ComfyUI/custom_nodes
    git clone https://github.com/1hew/ComfyUI-1hewNodes
    

    Restart ComfyUI afterward. The whole pack runs on ComfyUI's newer comfy_api.latest node API, so it needs a recent ComfyUI; on an old build the nodes may not register.

    Troubleshooting

    The failure mode to expect is "nothing happens": the node executes fine, the string goes through, and the downstream node just ignores or defaults a value it doesn't recognize. Double-check that the target actually accepts any - if it's a hard-typed input like INT, the graph editor may still let the wire connect (that's the wildcard working), and then execution throws a type error you'll have to hunt for. If a dropdown resets to its default every run, your text isn't matching any of its enumerated options. None of this is a bug in the node - it's the price of the type lie, and now you know what to look for.

    Category1hewNodes/conversion

    Inputs (1)

    NameTypeDefaultDescription
    textSTRING

    Outputs (1)

    NameTypeDescription
    any*