Nodes/Mikey Nodes/Text 2 Inputs Or 3rd Option Instead (Mikey)
ComfyUI Node

Text 2 Inputs Or 3rd Option Instead (Mikey)

Text 2 Inputs Or 3rd Option Instead (Mikey) — ComfyUI Node

By bash-j·Created 3 years ago·Updated 10 months ago· 188
Text 2 Inputs Or 3rd Option Instead (Mikey)
    • text_a
    • text_b
    text_aText A
    text_bText B
    text_cText C
    use_text_c_for_bothfalse

    The name is clunky but it tells you exactly what the node does, which is more than you can say for most. This is a two-way switch for text: normally it just passes your text_a and text_b straight through to two separate outputs, but flip one toggle and both outputs get overridden by a third string instead.

    Why you'd want this

    Picture a graph where text_a and text_b feed your positive and negative CLIP Text Encode nodes, wired up through a chain of other processing nodes upstream. Now you want to quickly test what happens if you swap in one shared override prompt for both - a debug string, a "just show me a plain image" fallback, a quick sanity check that your sampler settings aren't the problem. Without this node, that means unplugging two wires and plugging in something else, then plugging them back when you're done. With it, you flip use_text_c_for_both and both downstream outputs switch to text_c - no rewiring, and it's trivially reversible.

    It's a small node, but it's the kind of thing that saves real time in a workflow you're actively iterating on, where you're constantly asking "is this the prompt's fault or something else's."

    Inputs and outputs

    • text_a, text_b - your two normal text values, each multiline, each defaulting to placeholder text ("Text A" / "Text B") until you fill them in.
    • text_c - the override text, only used when the toggle below is on.
    • use_text_c_for_both - false (default) passes text_a and text_b through unchanged; true routes text_c to both outputs instead, ignoring text_a and text_b entirely.

    Outputs are just text_a and text_b - same names as the inputs, which makes it easy to drop this node in the middle of an existing wire without renaming anything downstream.

    Installing it

    Through ComfyUI Manager, search "Mikey Nodes." Or manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/bash-j/mikey_nodes
    

    Restart ComfyUI. No dependencies or downloads specific to this node - it's pure logic, no models involved.

    Things to watch for

    The most common way to get confused by this node is forgetting it's in the graph at all - you edit text_a or text_b, requeue, and nothing changes, because use_text_c_for_both got left on from an earlier test. If your outputs seem stuck no matter what you type into the "real" fields, check that toggle first before you start suspecting something further downstream.

    Also worth knowing: it only overrides both outputs at once, or neither. There's no option to override just one side while leaving the other on its normal input - if you need that kind of asymmetric control, you'll need a plain switch node from elsewhere in your node set, or just unplug the one wire you actually want to change.

    CategoryMikey/Text

    Inputs (4)

    NameTypeDefaultDescription
    text_aSTRINGText A
    text_bSTRINGText B
    text_cSTRINGText C
    use_text_c_for_bothCOMBOfalse2 options: true, false

    Outputs (2)

    NameTypeDescription
    text_aSTRING
    text_bSTRING