Nodes/Otonx's Custom Nodes/OTX Versatile Multiple Inputs 5
ComfyUI Node

OTX Versatile Multiple Inputs 5

Five mixed-type slots in one node — with a conversion bug you should know about

By budihartono·Created 3 years ago·Updated 2 years ago· 1
OTX Versatile Multiple Inputs 5
    • value_1
    • value_2
    • value_3
    • value_4
    • value_5
    value_1
    valuetype_1
    value_2
    valuetype_2
    value_3
    valuetype_3
    value_4
    valuetype_4
    value_5
    valuetype_5

    OTX Versatile Multiple Inputs 5 is the five-slot version of Otonx's mixed-type input node: each slot is a multiline textbox where you type a value, plus a dropdown to declare whether it's an int, float, or string. The idea is that one node can feed five different data types downstream, replacing a pile of single-type inputs. It's from Otonx's Custom Nodes, a tiny personal pack by Budi Hartono with no real community footprint - and it has a type-conversion bug baked in that you should hear about before you build anything on it.

    How it works (and the bug)

    Mechanically it's simple: type text into value_N, pick a type in valuetype_N, and the node converts and returns each value. That's the design. Here's what the source actually does:

    if valuetype_1 == "INT":
        value_1 = int(value_1)
    elif valuetype_1 == "FLOAT":
        value_1 = float(value_1)
    elif valuetype_1 == "STRING":
        value_1 = str(value_1)
    

    The dropdown choices are registered in the code as lowercase 'int', 'float', 'string', but every comparison checks the uppercase "INT", "FLOAT", "STRING". The strings never match, so none of the conversion branches ever run. Every slot returns exactly what you typed, as a Python string. The dropdown is effectively cosmetic.

    Since the outputs are wildcard (*), ComfyUI happily wires them anywhere - including into inputs that want a real number. And then the failure shows up downstream: a node gets "3.5" as a string where it wanted a FLOAT and either errors or does something surprising. If you use this node for numeric slots, do your own conversion in a converter node afterward, or just don't trust the typed value.

    The inputs and outputs that matter

    Five slots, each with a value_N multiline textbox and a valuetype_N dropdown (int / float / string), plus five wildcard outputs value_1 through value_5. Where this still earns its place today: as a visible, editable block of text values - prompts, tags, small JSON snippets - where the multiline box beats a single-line input. For numbers, the honest recommendation is the pack's own Integer Multiple Inputs nodes, which don't have this problem.

    Installing it

    Zero dependencies, pure Python. Install via ComfyUI Manager (search "Otonx") or clone:

    cd ComfyUI/custom_nodes
    git clone https://github.com/budihartono/comfyui_otonx_nodes
    

    Restart ComfyUI; the node lives under the OtonxPack category.

    Common issues

    • Everything comes out as a string - the case mismatch, not your mistake. Check it once with a debug/Show Text node and you'll believe it.
    • A node later in the chain complains about types - route through an explicit type converter, or replace the numeric slots with typed integer/float nodes.

    Five slots is a reasonable middle ground if the 4-slot version is too small and 6 is overkill - just don't expect the type dropdown to do its job until the author fixes the casing.

    CategoryOtonxPack

    Inputs (10)

    NameTypeDefaultDescription
    value_1STRING
    valuetype_1COMBO3 options: int, float, string
    value_2STRING
    valuetype_2COMBO3 options: int, float, string
    value_3STRING
    valuetype_3COMBO3 options: int, float, string
    value_4STRING
    valuetype_4COMBO3 options: int, float, string
    value_5STRING
    valuetype_5COMBO3 options: int, float, string

    Outputs (5)

    NameTypeDescription
    value_1*
    value_2*
    value_3*
    value_4*
    value_5*