Nodes/spin256-comfyui/String Selector
ComfyUI Node

String Selector

Ten text presets behind one integer

By Spin256·Created 10 months ago·Updated 10 months ago· 0
String Selector
    • STRING
    index0
    str_0
    str_1
    str_2
    str_3
    str_4
    str_5
    str_6
    str_7
    str_8
    str_9

    You've got a few prompts you actually use - the portrait one, the landscape one, the one that starts with "cinematic still of a moss-covered". Retyping them, or dragging them back in from a text file, is pure waste. Spin256StringSelector is a tiny preset switcher for exactly that: ten string slots, one index dial, the chosen text comes out the other side.

    Mechanically it's the simplest of the three nodes in the spin256-comfyui pack. You get ten STRING inputs, str_0 through str_9, plus an index dial (0 to 9). The node clamps the index into range and returns whichever slot it lands on. That's it - no parsing, no concatenation, no transforms. What you typed is what comes out, byte for byte.

    Which is both the appeal and the catch. Because there are no defaults - every slot starts empty - dialing to a slot you never filled gives you an empty string out. Downstream nodes will happily accept it, and you'll be staring at a blank prompt wondering where your text went. Fill a slot before you flip to it.

    The inputs that matter:

    • index - the dial. INT, 0 to 9.
    • str_0 … str_9 - your text presets.

    Output is a single STRING, and this is where you need one ComfyUI fact straight: the prompt box on a standard CLIPTextEncode node is a widget, not an input port, so you can't just plug this into it. Right-click the prompt widget → Convert to input, and then the STRING output wires right in. Otherwise, feed it into any node that takes a STRING input - filename prefixes on Save Image, text-to-value utilities, packs that expose prompt text as a real input.

    The genuinely nice use is the same one as the pack's other two nodes: wire one index number into all three selectors and a single dial becomes a full profile switcher - prompt, seed, and resolution changing together. Ten positions, three things switching at once, zero typing.

    Installing it is installing the whole pack, and the pack is about as light as they come:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Spin256/spin256-comfyui
    

    Restart ComfyUI and the nodes land under the Spin256 category. Or ComfyUI Manager → Install Custom Nodes, search "spin256". No pip requirements, no model downloads, no API key - it's pure Python with no dependencies, and the entire pack is just this string selector, an int selector, and a size selector.

    The honest take: if you're already running a big utility pack like rgthree-comfy, its Power Prompt or any-switch-style nodes cover this ground with more polish. But this one is zero-dependency, zero-config, and dead reliable for the narrow job of "give me one of these ten strings." It won't change your life, but it will stop you retyping your favorite prompt for the hundredth time.

    CategorySpin256

    Inputs (11)

    NameTypeDefaultDescription
    indexINT00–9
    str_0STRING
    str_1STRING
    str_2STRING
    str_3STRING
    str_4STRING
    str_5STRING
    str_6STRING
    str_7STRING
    str_8STRING
    str_9STRING

    Outputs (1)

    NameTypeDescription
    STRINGSTRING