ComfyUI Node

Prompt Combiner

Merge two to four prompts — the one node that doesn't need Ollama

By Limbicnation·Created 9 months ago·Updated 2 months ago· 10
Prompt Combiner
    • combined_prompt
    prompt_1
    modeblend
    prompt_2
    prompt_3
    prompt_4
    weight_11.0
    weight_21.0
    weight_31.0
    weight_41.0
    separator,

    Most of this pack is about delegating prompt writing to a local LLM. Prompt Combiner is the exception - it's pure string manipulation, zero LLM calls, works even when Ollama is down. You give it two to four prompt strings and it merges them into one, with weights. The classic use: take a character/subject prompt from one source, a style prompt from another, and blend them into a single line to feed your text encoder.

    How it works

    There are three modes, and the difference between them is the whole node:

    • concat - dumb and reliable. Joins the prompts with a separator (default ", "). separator is an input, so you can use " ", a newline, or anything else. This is what you want when you don't want the node thinking for you.
    • blend - weight-aware. Each weight is mapped to ComfyUI-style emphasis markers: ≥1.5 gets double parens ((text)), ≥1.2 gets (text), ≤0.5 gets square brackets [text], everything else plain. Higher weight = more emphasis, comma-joined.
    • weighted_average - the smarter sibling of blend. Instead of hard thresholds it normalizes each weight against the average of all weights, then maps the ratio to triple/double/single parens or brackets. Two prompts at 1.0 and 2.0 means the second one gets emphasized relative to the first, not absolutely.

    Weights run 0–2 (default 1). weight_1 applies to prompt_1 and so on; only filled prompts are used, so you can safely leave prompt_3 and prompt_4 empty.

    The honest caveat about the emphasis markers

    Here's where you need to know what era of model you're targeting. (text) and [text] are SDXL-era attention tricks: on the SD 1.5/SDXL lineage (including Illustrious, Pony, anime models), those markers genuinely steer emphasis and blend strength. But on the newer LLM-encoded models - Flux, Z-Image, Anima - the encoder discards parenthesis weights entirely; your prompt is treated as a plain instruction. So on those models, blend and weighted_average are doing a lot of nothing: they're still the fastest way to combine text, but the weighting has no teeth. concat behaves identically and obviously on every model. If you're on an LLM-encoded pipeline, concat is usually the mode you actually want.

    Inputs and outputs

    • prompt_1 (required) + mode (required).
    • prompt_2prompt_4 (optional), weight_1weight_4 (0–2), separator (default ", ").

    Single output: combined_prompt (STRING), which you wire into your text encoder or straight into the Prompt Refiner to clean up the seam between two prompts.

    Install

    Same as the rest of the pack - Manager search "Prompt Generator", or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Limbicnation/ComfyUI-PromptGenerator.git
    cd ComfyUI-PromptGenerator
    pip install -r requirements.txt
    

    Under text/generationPrompt Combiner. Because it never touches Ollama, this is also the pack node that works in a minimal test workflow or on a machine without Ollama installed at all.

    The only failure modes worth knowing: all-empty prompts returns an error string (it needs at least prompt_1), and a single filled prompt is passed through untouched - which is correct behavior, not a bug.

    Categorytext/generation

    Inputs (10)

    NameTypeDefaultDescription
    prompt_1STRING
    modeCOMBOblend3 options: blend, concat, weighted_average
    prompt_2optSTRING
    prompt_3optSTRING
    prompt_4optSTRING
    weight_1optFLOAT1.00–2
    weight_2optFLOAT1.00–2
    weight_3optFLOAT1.00–2
    weight_4optFLOAT1.00–2
    separatoroptSTRING,

    Outputs (1)

    NameTypeDescription
    combined_promptSTRING