ComfyUI Node

Prompt Line

Prompt Line is two prompts welded together with a comma

By D33MO·Created 2 months ago·Updated 7 days ago· 0
Prompt Line
    • prompt
    ◄prompt►
    ◄prompt_in—►

    What you're actually getting

    Two fields and one wire. prompt is an ordinary single-line text widget you type into. prompt_in is an optional input socket. Whatever arrives upstream on prompt_in is placed first, your typed text goes after it, and the two are glued together with , . The single output is a STRING called prompt, which goes into a CLIP Text Encode.text like any other text.

    The thing people get wrong on first contact: it is not an override and it is not a loop. The README is explicit that the joined result does not overwrite the input box, and reading the source confirms the node is a pure function - no state, no second output. It's a value node with a join in the middle. If you've used core's PrimitiveStringMultiline, think of that plus a socket.

    Two details from the actual code that the name doesn't tell you. First, the join is tidier than string concatenation: each fragment has surrounding whitespace and commas stripped before they're combined, and empty fragments are dropped entirely. So pasting a chunk that ends in a stray comma won't hand you ,,, and if you deliberately paste something starting with a comma, that comma is eaten. Second, unlike the pack's Prompt Warehouse node, this one does not append a trailing comma to its output - it's a clean joiner, nothing more.

    Why you'd reach for it

    ComfyUI's plumbing layer exists for exactly one reason: a value you need in several places should have one authoritative source instead of being retyped into four widgets and silently drifting out of sync in one of them. That's what the core primitives do for a seed or a resolution, and it's the honest framing for Prompt Line too - except the value here is a text fragment.

    The realistic uses are the boring ones. A style block ("shot on 35mm film, shallow depth of field, muted palette") you want in front of every prompt without re-typing it; a constant negative prompt; or a small chain of these feeding one encoder so you can A/B a modifier by muting a node instead of editing a paragraph. The one I'd actually defend is the middle case: keep your experimental bit in the node's own box and let prompt_in carry the part you're not changing, so you can wipe and retype the experiment without touching the base.

    The inputs and output

    • prompt (STRING, required) - single-line widget. Long prompts scroll sideways; if that annoys you, the pack's Prompt Multiline node is the identical thing with a textarea.
    • prompt_in (STRING, optional, force-input) - upstream text, placed ahead of the widget text.
    • Output: prompt (STRING).

    One widget flag worth knowing about, straight from the source: the prompt box is marked dynamicPrompts: False. That switches off the frontend's dynamic-prompt expansion for this node - the {red|blue} and __wildcard__ syntax. If your workflow leans on that, keep using a plain CLIP Text Encode for those inputs.

    Install

    Same pack, no Python dependencies of its own (there's no requirements.txt in the repo - it only uses what ComfyUI already ships). Either search Prompt Warehouse in ComfyUI Manager, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/D33MO/ComfyUI-Prompt-Warehouse.git
    

    Restart ComfyUI and refresh the browser tab. The nodes land under the Prompt Warehouse category.

    Gotchas worth knowing up front

    Order surprises people. Upstream first, your box second. If your trigger words have to come first in the prompt, they go in the upstream fragment, not the box.

    Wiring a widget often needs a right-click first. CLIP Text Encode.text ships as a widget. Right-click it and choose Convert widget to input before you can plug anything into it - the README calls this out, and it's the most common "why won't the wire connect" moment with any text node.

    Both fields empty is not an error. You get an empty string, the encoder tokenizes nothing, and the graph carries on. If a generation suddenly ignores part of your prompt, check whether the upstream node is muted rather than assuming the join failed.

    Wildcards don't expand here - that dynamicPrompts: False flag above. It's not a bug, it's the author disabling a frontend feature on a widget they manage themselves.

    CategoryPrompt Warehouse

    Inputs (2)

    NameTypeDefaultDescription
    promptSTRING—
    prompt_inoptSTRING—

    Outputs (1)

    NameTypeDescription
    promptSTRING—