Nodes/ComfyUI Assistant Node/PVL Any To String
ComfyUI Node

PVL Any To String

Turn a bool, an int, and a float into one tidy string

By pvlprk·Created about a year ago·Updated 8 months ago· 1
PVL Any To String
    • string_output
    delimiter,
    bool_input
    int_input
    float_input

    String nodes are the plumbing of ComfyUI - nobody gets excited about them until a workflow breaks because some number won't go into a text field. PVL Any To String is one of those quiet converters from the pvlprk/comfyui-pvl-api-nodes pack: it takes a boolean, an integer, and a float and joins whichever are connected into a single string with a delimiter you choose. Fully local, no API, no key - one of the pack's plain utility nodes.

    The realistic use: you're building a "report" string - "Seed: 12345, CFG: 3.50" - to feed a text-overlay node, a save-name generator, or an API payload that insists on strings. Or you just need a number from one branch formatted into a prompt or a label somewhere else.

    How it works

    Three optional sockets - bool_input, int_input, float_input - are force-input (socket-only, no widget), so you wire them or leave them unconnected. The node skips whatever isn't connected and joins the rest with your delimiter (default ", "). One formatting quirk worth knowing: floats are emitted to four decimal places (3.5 becomes 3.5000), which is great for stable output strings but can look odd in a label.

    Inputs and outputs

    • delimiter (required string widget, default ", ") - the glue between values.
    • bool_input / int_input / float_input - optional sockets.
    • Output: string_output (STRING).

    If you wire all three with defaults, you get something like True, 42, 3.5000.

    Install

    cd ComfyUI/custom_nodes
    git clone https://github.com/pvlprk/comfyui-pvl-api-nodes
    

    Restart ComfyUI. No key, no network, and none of the fal-node dependencies matter for this one.

    Where people get burned

    • Unconnected inputs are simply skipped. That's a feature, but it means the output string changes shape depending on what's wired - if your downstream text depends on a fixed format, always connect the same set.
    • The float formatting is fixed at 4 decimals - there's no precision dial. If you need 3.5 not 3.5000, this isn't the node (or pipe the float through another formatter first).
    • It's a converter, not a full text-formatting tool. For building complex strings from many parts, the pack's string-concat nodes are a better fit.
    CategoryPVL/Converters

    Inputs (4)

    NameTypeDefaultDescription
    delimiterSTRING,
    bool_inputoptBOOLEAN
    int_inputoptINT
    float_inputoptFLOAT

    Outputs (1)

    NameTypeDescription
    string_outputSTRING