Nodes/Comal Clipboard Bridge/Clipboard Text Receiver Comal
ComfyUI Node

Clipboard Text Receiver Comal

Copy Text, Have It Land in a ComfyUI Node Automatically

By comal0731·Created 2 months ago·Updated 28 days ago· 0
Clipboard Text Receiver Comal
  • options
  • STRING
current_text
listenfalse
history_json[]
history_index0

Every ComfyUI user has a workflow where the prompt changes constantly - you're testing batches, swapping tags, pasting a style description from a doc, and every time you have to click into a text box, select everything, and paste. The Clipboard Text Receiver ("Clipboard Text Receiver Comal" on the canvas) removes the clicking: you copy text anywhere on your machine, and it appears in the node's text field and flows out its STRING output. Copy → run. That's the whole pitch.

It's the text half of the comal-node_clipboard-bridge pack, and it's the classic "tiny utility that saves you a thousand mouse clicks" node. No models, no API keys - just a background watcher plus a browser extension.

How it works

At startup the pack launches a daemon thread that polls your OS clipboard every half second. When it spots genuinely new text (it hashes the contents so duplicates don't re-fire - an important fix, because the Windows clipboard sequence number increments whenever any program touches the clipboard), it sends a clipboard.text event to the browser. The node's extension then checks: is listen on? Is this copy allowed by the global options? If yes, it writes the text into the current_text field and pushes the result to history.

The Python combine() function just passes current_text straight through to the output. That looks suspiciously lazy, and it is - on purpose. All the real decision-making happens in the browser, so the node behaves like a live text source you can wire anywhere.

The inputs that matter

  • listen - the ON/OFF switch. Default OFF; flip to "Listening" or nothing will ever arrive.
  • current_text - the live text, editable like any text box. When you're not actively pasting, you can just type here.
  • options (optional) - wire this to a Clipboard Text Options node if you want text combined as Append, Replace, or Fixed+New instead of a straight replace. Leave it empty for plain replace-everything behavior.
  • history_json / history_index - hidden bookkeeping for the ◀ Undo / Redo ▶ buttons, which walk back through your last 10 pasted texts.

The STRING output plugs into anything that eats text: CLIP Text Encode for prompts, a text save node, a filename builder - anywhere you'd normally drag a primitive string.

Installing it

ComfyUI Manager → Install via Git URLhttps://github.com/comal0731/comal-node_clipboard-bridge, or:

cd ComfyUI/custom_nodes
git clone https://github.com/comal0731/comal-node_clipboard-bridge
cd comal-node_clipboard-bridge
pip install -r requirements.txt

Restart ComfyUI, then hard-refresh the browser (Ctrl+Shift+R) - this extension does a lot of its work client-side and a stale cache is a common reason for "it loads but does nothing." Dependencies are just pillow and pyperclip.

Where people get burned

  • listen resets to OFF. On every page reload (and by default on ComfyUI restart) all listen switches get forced off unless you've disabled that in Global Options. It's a safety feature, but it means "it worked yesterday" is a real, common symptom.
  • The 2-second internal-copy window. The extension treats any Ctrl+C inside the ComfyUI page as a potential internal copy and blocks it for ~2 seconds unless "Allow Comfy Text" is on. If you copy a node, then immediately test-paste, it looks broken. Copy from another app instead.
  • Windows-first. The image path is Windows-centric and the README is upfront that some detection may not work on macOS/Linux. Text via pyperclip is the more reliable part, but don't be shocked if it's flaky off Windows.
  • It stores text in the workflow. Because the value lives in a widget, the current text gets baked into the workflow JSON. Fine for sharing, just know your prompt travels with the file (the same embedding quirk that lets ComfyUI workflows live inside PNGs).

For prompt-iteration workflows this node is a small quality-of-life win. It won't change your results - it just stops making you play whack-a-mole with text boxes between every test.

Categoryclipboard_bridge

Inputs (5)

NameTypeDefaultDescription
current_textSTRING
listenBOOLEANfalse
history_jsonSTRING[]
history_indexINT0
optionsoptCLIP_OPT

Outputs (1)

NameTypeDescription
STRINGSTRING