Nodes/Rathius_ComfyNodes/Ricky's Prompt Mixer (5-Input)
ComfyUI Node

Ricky's Prompt Mixer (5-Input)

Ricky's Prompt Mixer — combine 5 prompt fragments without the dangling commas

By Rathius-Saranoth·Created 10 months ago·Updated 9 months ago· 0
Ricky's Prompt Mixer (5-Input)
    • mixed_text
    separator,
    text_1
    text_2
    text_3
    text_4
    text_5

    Once you build prompts from parts - a base prompt loaded from one file, a character description from another, a stack of style tags from a third - you hit a classic annoyance: when one fragment is empty, a naive concatenator hands you , , or trailing commas that quietly pollute your output. SimpleTextMixer exists to fix exactly that. It takes up to five text inputs, joins them with a separator you choose, and silently drops anything that's empty. The name "Ricky's Prompt Mixer (5-Input)" is accurate about both the person and the cap.

    It's the second node in the small Rathius_ComfyNodes pack, alongside LoadTextFile_Rathius. The two are designed to be used together: load prompt fragments from files, mix them here, feed the result into a CLIP Text Encode. Like its sibling, it's pure Python with zero external dependencies - no requirements.txt, no models, nothing to download. It's a hobby pack, so don't expect an active issue tracker or rapid updates; the code is short enough that it mostly just works.

    How it works

    The mechanism is deliberately simple. The node collects its five inputs into a list, filters out any string that's empty or only whitespace, then joins what's left with your separator and returns it as a single string. Nothing clever - which is the point. It's the kind of glue node you could write yourself in ten minutes and never want to again.

    The inputs and outputs that matter

    • separator (required) - the string inserted between fragments. Default is ", ", which is right for SD-style tag lists. Set it to "\n" for line breaks or " " for plain spaces.
    • text_1 through text_5 (optional) - the fragments to combine. Here's the catch that trips people up: all five are marked forceInput, meaning they're wire-only ports. You can't type a fragment directly into this node; every input has to come from something upstream. If you want to hand-type a segment, feed it from a plain text node first.

    The single output is mixed_text (STRING). Wire it into the positive or negative prompt of a CLIP Text Encode, or into anything else that wants a string.

    Installing it

    Same pack, same story: ComfyUI Manager → search Rathius_ComfyNodes → install → restart. Or manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Rathius-Saranoth/Rathius_ComfyNodes
    # restart ComfyUI
    

    No dependencies beyond what ComfyUI already ships. You'll find it under Ricky Tools in the node menu - not the same RathiusNodes/Utils category as the pack's other node. The pack's naming is a little all over the place; that's the hobby-pack tax.

    Where people get burned

    • The inputs are all wire-only. The most common complaint pattern is expecting to type into text_1. You can't - drag in a text node (or one of the pack's file loaders) and wire it in.
    • Five is a hard cap. Need six fragments? Chain two mixers: feed the first one's mixed_text into the second's text_1.
    • All-empty input returns an empty string. The empty-filtering is convenient, but it means a mixer with nothing wired to it won't error - it just emits "". As a negative prompt that's harmless; as a positive prompt you'll get whatever the model does with no instruction, which is rarely what you wanted.

    If your prompts come from files and fragments, pairing this with LoadTextFile_Rathius gives you a tidy prompt-building section with no copy-paste and no comma rot.

    CategoryRicky Tools

    Inputs (6)

    NameTypeDefaultDescription
    separatorSTRING,
    text_1optSTRING
    text_2optSTRING
    text_3optSTRING
    text_4optSTRING
    text_5optSTRING

    Outputs (1)

    NameTypeDescription
    mixed_textSTRING