Nodes//Nougan LM Studio Prompt Box πŸ’¬
ComfyUI Node

Nougan LM Studio Prompt Box πŸ’¬

A live, editable reader for whatever your local LLM just said

By WinnouganΒ·Created 2 months agoΒ·Updated about a month agoΒ· 4
Nougan LM Studio Prompt Box πŸ’¬
    • PROMPT_OUT
    β—„textβ–Ί
    β—„modeAPPENDβ–Ί
    β—„separator β–Ί
    β—„prompt_inβ€”β–Ί

    The companion to NouganLMStudio: while the chat node streams the LLM's answer out of RESPONSE, this box hangs off the PROMPT output and gives you an editable, resizable pane for what's about to fly to the model - or what just came back. It's the "let me fix this before it's a prompt" and "let me read this without squinting at a tiny widget" node in one.

    How it works

    The core is four text-combination modes, which is the entire conceptual surface:

    • APPEND - incoming text first, then your local text, joined by the separator.
    • PREPEND - your local text first, then incoming.
    • REPLACE (local wins) - local text if you've typed any, else incoming.
    • PASSTHROUGH (incoming wins) - incoming if present, else local.

    You wire the main node's PROMPT into prompt_in, set a mode, and PROMPT_OUT is the result - which you can feed back into the LM Studio node's prompt_override to loop LLM output back into the next call. The doc's suggested "live reader trick": wire RESPONSE β†’ prompt_in with mode PASSTHROUGH, and the box becomes an on-node reader for whatever the LLM says.

    There's a live output pane with a LINKED/LOCAL chip, character count, and one-click copy, and both panes drag-resize with sizes persisting in the workflow.

    The inputs that matter

    • text - your local, editable text.
    • mode - the four-way combiner above.
    • separator - what goes between the two texts in APPEND/PREPEND (default is a blank line).
    • prompt_in - the incoming STRING, normally the LM Studio node's PROMPT (or any STRING).

    Output: PROMPT_OUT, a single STRING.

    Installing

    Same suite install as the main node - Manager search Nougan, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Winnougan/Nougan_Nodes
    # restart ComfyUI
    

    No extra dependencies; it's pure text plumbing.

    Where people get burned

    The modes trip everyone up once, and the names read more dramatic than they are: REPLACE and PASSTHROUGH differ only in which side wins when both are present. If output looks like nothing changed, check you're not in PASSTHROUGH with an incoming prompt - that's "incoming wins," so your edits are silently ignored. Also, separator defaults to a blank line, which is right for natural language but wrong if you're assembling a tag-style prompt (set it to , ). It's an output node, so like its sibling it can terminate a graph - convenient when the whole point of the run is to eyeball the LLM's text.

    CategoryNougan Suite

    Inputs (4)

    NameTypeDefaultDescription
    textSTRINGβ€”
    modeCOMBOAPPEND4 options: APPEND, PREPEND, REPLACE (local wins), PASSTHROUGH (incoming wins)
    separatorSTRING β€”
    prompt_inoptSTRINGWire the LM Studio node's PROMPT output here.

    Outputs (1)

    NameTypeDescription
    PROMPT_OUTSTRINGβ€”