Nodes/ComfyUI Ino Nodes/Ino Cast Any To String
ComfyUI Node

Ino Cast Any To String

Cast anything to a string — the glue that stops type-mismatch whack-a-mole

By nobandegani·Created about a year ago·Updated 2 months ago· 6
Ino Cast Any To String
  • input_any
  • string

ComfyUI is a typed graph, and typed graphs have a special kind of annoying: the node produces exactly what you need but the port types don't match, so the wire snaps back and the workflow won't run. Ino Cast Any To String is the bridge. It takes any input value and converts it to a string - numbers, floats, whatever your upstream node hands you. This is the honest version of casting: it actually converts.

There are two flavors of "cast" in this pack and the difference matters. Ino Cast Any To Model and Cast Any To Clip are cosmetic pass-throughs (they relabel the port type but return the value unchanged). This one is a real conversion - it runs str(input_any) - so an int of 3 becomes the string "3", a float becomes "3.5", and you can plug the result into a text node, a filename builder, or a Save Text. If the value is already a string, it just passes through.

When you'd use it

  • Getting a number to show up in a display or log node.
  • Feeding computed values into prompt/text assembly.
  • Turning a model's abs_path or a message string into something a text node can show you.

Because the input is typed * (any), this is the node you reach for when nothing else will connect. It's part of the Ino CastHelper family precisely because these connection puzzles are the most common graph-level annoyance in ComfyUI.

Inputs and outputs

  • input_any (*) - anything. Accepts any type the graph throws at it.
  • string (STRING) - the converted result.

No options, no formatting knobs. If you need zero-padding or specific number formatting, convert first, then format with a string utility node.

Installing it

Part of ComfyUI-InoNodes (Inoland). ComfyUI Manager → search "ComfyUI Ino Nodes" → install → restart. Manual:

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

Restart after. Requires inopyutils (auto-installed) and a current ComfyUI on the V3-style node API. No keys or downloads.

Common issues

The string conversion is Python's default, so a float like 3.0 becomes "3.0" (with the decimal), not "3" - if that surprises you, cast the float to int first. And remember this converts; it doesn't fix values that are None or uninitialized (disabled nodes sometimes pass those through), in which case you'll get "None" in your text and need to guard upstream. Otherwise it's as reliable as str() itself.

CategoryInoCastHelper

Inputs (1)

NameTypeDefaultDescription
input_any*

Outputs (1)

NameTypeDescription
stringSTRING