Nodes/ComfyUI_Mira/Convert Numeral to String
ComfyUI Node

Convert Numeral to String

Convert Numeral to String (NumeralToString, ComfyUI_Mira)

By mirabarukaso·Created 2 years ago·Updated 5 days ago· 206
Convert Numeral to String
  • numeral
  • Result (STRING)

Convert Numeral to String does exactly what it says: it takes a number - integer or float - and gives you back the same value as a STRING. Unglamorous, and genuinely necessary more often than you'd think, because ComfyUI is strict about types and plenty of nodes want text where you've only got a number.

It's a Numeral node in ComfyUI_Mira, mirabarukaso's utility pack. The usual reason you reach for it: you want to fold a number into a text field - a prompt, a filename, a metadata note, a ShowText display - and the target only accepts STRING. A seed, a step count, a computed value from one of Mira's arithmetic nodes: run it through this and it's now text you can concatenate or embed.

How it works

There's no configuration. The single input is wildcard-typed (*), so it accepts an INT or a FLOAT (or anything that stringifies), and the node converts it to its string form and outputs that. A float comes out looking like a float, an integer like an integer. That wildcard input is why it's flexible - you don't need a separate int-to-string and float-to-string node, this one covers both.

Inputs and outputs that matter

  • numeral - the number to convert. Wildcard-typed, so wire an integer or a float straight in.

The output is Result (STRING) - the value as text, ready for any node that takes a string. In practice you'll wire it into a text combiner, a filename field, or a ShowText node so a computed number can travel alongside your prompt text instead of getting stuck as an isolated numeric value the rest of the graph can't read.

Installing it

ComfyUI Manager: search ComfyUI_Mira in the Custom Nodes Manager, Install, restart. Manual: cd ComfyUI/custom_nodes && git clone https://github.com/mirabarukaso/ComfyUI_Mira.git, then restart ComfyUI. If the pack errors on load, run pip install -r requirements.txt in its folder and restart. No models involved.

Common issues

The main thing to expect is formatting you don't control. This is a straight conversion, so a float that carries floating-point baggage (say 0.30000000000000004) will stringify with that baggage - the node isn't rounding or formatting for you. If you need a specific number of decimal places in, for example, a filename, be aware the raw string is what you get, and reach for a rounding/arithmetic step upstream if the exact text matters.

Otherwise there's essentially nothing to trip on. It's the kind of tiny type-bridge node you install once, forget about, and are quietly glad exists the day a node refuses your number because it wanted a string. If you're building filenames or embedding generation settings into saved images, it pairs naturally with Mira's arithmetic and name-carrying nodes.

CategoryMira/Numeral

Inputs (1)

NameTypeDefaultDescription
numeral*0

Outputs (1)

NameTypeDescription
Result (STRING)STRING