ComfyUI-PromptEditor Introduction
ComfyUI-PromptEditor adds a Prompt Editor node to ComfyUI for writing, viewing, and reusing text prompts. It is useful when you sometimes write prompts yourself and sometimes receive them from another node, such as a local or cloud-based language model.
The editor behaves like a normal multiline text field. You can select text, copy and paste, undo changes, search, and use your browser’s spelling suggestions. You can also switch between your own prompt and a connected text source without disconnecting its cable.
Find the node under utils/text. Its prompt output can connect to nodes that accept a STRING, such as a CLIP text-encoding node.
How ComfyUI-PromptEditor Works
Think of the node as a prompt-writing desk with two possible sources:
- MANUAL: The prompt you edit locally is sent through the
promptoutput. - LLM: The
STRINGarriving at the node’stextinput is sent through thepromptoutput.
“LLM” is the label on the switch, but the input does not have to come from an AI language model. Any upstream node that produces a STRING can supply the text.
To try a basic workflow:
- Add Prompt Editor to your graph.
- Type a prompt in the editor.
- Connect its
promptoutput to a node that accepts text. - Optionally, connect another node’s
STRINGoutput to Prompt Editor’stextinput. - Queue the graph. When the connected node finishes and Prompt Editor executes, its text appears in the editor.
The connected text updates when the node executes and its input resolves. The editor does not assume that every language-model node can display text token by token as it is generated.
The text on screen versus the text sent to your graph
The editor can show an older prompt without making that prompt active. Looking at history does not change your graph’s output. The footer tells you both what you are viewing and whether the output is MANUAL or LLM.
The node keeps track of three related pieces of text:
| Text | What it means |
|---|---|
| Current | The prompt that was last active, whether typed manually or received from the connected input |
| Last manual | The last prompt you typed or made current with Use as current |
| Last LLM | The last resolved STRING received from the connected input |
For example, suppose you type A, then connect a text-producing node that returns B and later C. If you unplug it or switch to MANUAL, C remains on screen and becomes editable, but your last manual prompt is still A. Once you edit C into D, the current prompt and last manual prompt become D; the last LLM prompt remains C.
ComfyUI-PromptEditor Features
Switch between manual and connected prompts
The MANUAL / LLM control is at the left of the toolbar. Switching modes changes which text the node outputs, but leaves the cable connected.
| Control appearance | What it means |
|---|---|
| MANUAL, no light | No text input is connected. You are editing the prompt that will run. |
| MANUAL, hollow green dot | A text input is connected, but your local prompt will run. |
| LLM, filled green light | The connected STRING will run. Its live text is read-only in the editor. |
Connecting a text input switches the node to LLM mode; the light pulses when new text arrives. Unplugging switches it to MANUAL and keeps the last connected text visible. You can then edit that text locally. Opening a history view does not change the mode.
Find and replace
Use Find or press Ctrl+F to search the text currently on screen. The search bar shows a match count, such as 3 / 12, and lets you move to the next or previous result. You can turn on Case to match capitalization or Word to match whole words. Press Enter for the next match, Shift+Enter for the previous one, or Esc to close Find. Searching never changes the prompt.
Use Find & Replace or press Ctrl+H to replace one match or all matches. Replacing is available only when the displayed text is editable: your current MANUAL prompt or a history copy you have unlocked. You can search live LLM text, but cannot replace it while that view is read-only.
Copy, paste, and text files
Copy copies exactly the text displayed, including line breaks. This also works while you are viewing history, so check the footer if you need to copy the prompt that will actually run.
| Action | Result |
|---|---|
| Click Paste | Replace the displayed text with clipboard text |
| Shift+click Paste | Append clipboard text to the end |
| Press Ctrl+V while the editor is focused | Insert text at the cursor |
Drop a .txt file onto the editor | Replace the displayed text with the file’s contents |
Paste is disabled when you are viewing locked live LLM text or read-only history. The Paste button uses your browser’s clipboard permissions:
- Chrome and Chromium: Allow clipboard access for your ComfyUI site when prompted. After permission is granted, the button can paste with one click.
- Firefox: Click the node’s Paste button, wait for Firefox’s separate Paste confirmation to become available, then click it. Firefox does not provide a persistent clipboard-read permission for websites.
- Any browser: Focus the editor and use Ctrl+V for a normal paste at the cursor.
The Paste button inserts clipboard text; it ignores screenshot file paths.
Review and reuse previous prompts
Last Manual Input shows the last prompt you typed. Last LLM Input shows the last text received through the connected input. Each button is unavailable until a value of that type has been stored. You can view only one history copy at a time.
History opens read-only. Double-click the editor while viewing history to unlock and edit that stored copy. These edits affect the history copy, not the live graph output. Leaving the history view locks it again.
To send a history copy through the graph, click Use as current. This appears only while viewing history. It makes the displayed text the live MANUAL prompt, updates Last Manual to match, and leaves the input cable connected. Until you click it, history is only a preview.
Click the active history button again to return to the live prompt. Esc closes Find first; when Find is closed, it leaves history.
Check the footer
The left side of the footer distinguishes the view from the output. For example:
Editing current · Output is MANUALViewing last manual · Output is LLMViewing current LLM · Output is LLM
The right side counts the words and characters in the text on screen, for example 12 words · 80 chars. When you are browsing history, that count describes the history copy you are viewing.
Keyboard and editing behavior
| Shortcut | Action |
|---|---|
| Ctrl+F | Open Find |
| Ctrl+H | Open Find & Replace |
| Ctrl+Shift+V | Paste by replacing the displayed text |
| Enter / Shift+Enter in Find | Go to the next / previous match |
| Esc | Close Find first, then leave history |
The editor also supports familiar text-field actions such as Ctrl+A, Ctrl+C, Ctrl+X, Ctrl+V, Ctrl+Z, and Home/End, along with native English spelling suggestions. It does not automatically trim or rewrite your prompt.
Keep prompts with your workflow
The workflow saves the current prompt, Last Manual, Last LLM, and the MANUAL/LLM mode. Temporary interface details, including the Find query, an open Find bar, history’s unlocked state, and brief “Copied” or “Pasted” messages, are not saved.
Troubleshooting ComfyUI-PromptEditor
The prompt I see is not the prompt my graph uses
- Read the left side of the footer to check both what you are viewing and the current output mode.
- If you are viewing Last Manual or Last LLM, remember that history is only a preview.
- To run that historical text, click Use as current. The node will switch to MANUAL while keeping any cable connected.
I cannot edit or replace the text
- Check whether the control says LLM. Live connected text is read-only; click the mode control to switch to MANUAL if you want to edit locally.
- If you are viewing Last Manual or Last LLM, double-click the editor to unlock that history copy.
- Remember that editing unlocked history does not change the graph output. Click Use as current when you are ready to use it.
The Paste button does not paste
- Make sure the displayed text is editable. Paste is unavailable in locked LLM and read-only history views.
- In Chrome or Chromium, allow clipboard access for your ComfyUI site when prompted.
- In Firefox, complete the browser’s separate Paste confirmation after clicking the node’s button.
- Alternatively, focus the editor and press Ctrl+V to paste at the cursor.
My connected prompt has not appeared yet
Queue the graph and wait for the upstream STRING to resolve and Prompt Editor to execute. The editor updates at that point; it does not promise token-by-token display from every text-producing node.
Frequently asked questions
Does switching to MANUAL disconnect my text node?
No. The cable stays connected. The switch controls whether the node outputs your local prompt or the connected STRING.
Do I need a cloud language model?
No. The text input accepts any upstream STRING, including text from another local node.
Will viewing or editing an old prompt change my next result?
No. History remains separate from the live output until you click Use as current.
What happens when I unplug the connected input?
The node switches to MANUAL and keeps the last connected text visible, ready for you to edit.
Does the node automatically clean up my prompt?
No. It does not automatically trim or rewrite the text.
Learn More about ComfyUI-PromptEditor
- Compatibility information lists the supported ComfyUI environment. The extension requires ComfyUI 0.34 or later and uses the V3 node API.
- Screenshot of the Prompt Editor node shows the editor and its controls.
- MIT license provides the extension’s license terms.
