Catch and Edit Text (IMGNR)
The node that lets you fix an LLM's prompt before it costs you another API call
- STRING
You know the drill. A dynamic prompt node - an LLM, a wildcard loop, an API call - hands you a prompt that's almost right. The car is red, you want blue. The model threw in "halicinated horse" nonsense. Regenerating burns tokens or an API credit, and rerolling doesn't even guarantee you keep the good 90%.
Catch and Edit Text (IMGNR) is the human-in-the-loop patch for exactly that. It sits in your text line, catches whatever string flows through on the first run, shows it in a big editable textbox, and then lets you fix it by hand while optionally stopping the upstream generator from wasting any more resources on the next run. It's from ComfyUI-IMGNR-Utils, a zero-dependency QoL pack by a single Dutch hobbyist (ImagineerNL) who built it to solve his own annoyances - and this is one of the pack's best ideas.
How it works
The node is an output node with a textbox widget that doubles as a latch. On use_input mode it passes the connected text straight through and writes it into the textbox for you to edit. Switch to an edit mode and it outputs the textbox contents instead, ignoring the input signal entirely.
The interesting part is what happens upstream. There are three modes in the action dropdown:
use_input- pass-through. The textbox gets refreshed with whatever the generator just produced. This is your "catch" mode.use_edit_mute_input- soft mute. Uses your edited text and lazily skips evaluating the upstream node where it can. If something else forces that node to run anyway (say you randomized a seed connected to it), it still runs, but the catcher ignores its output.use_edit_block_inputnode- hard block. The JS actively prevents the previous node from executing, full stop. This is the one that genuinely saves you an API call.
Flip use_status_color on and the titlebar tells you which mode you're in at a glance: green for pass-through, olive for soft mute, red for hard block. Nice touch - mode awareness without reading the dropdown.
The inputs that matter
editable_text_widget- the multiline textbox you edit. It ships with an explanatory default, which doubles as a friendly warning: if you switch to an edit mode before your first real run, you'll be outputting that placeholder text. Run once inuse_inputmode first.action- the mode selector above.input_text(optional) - "Connect here." The string from whatever generates your prompt.
There's a single STRING output, ready to feed a CLIP Text Encode. The node is already OUTPUT_NODE, so you don't need a Show Text hanging off it to see what's happening. One more safety net: if execution ever hangs on this node it times out after 10 seconds and gracefully returns the current textbox contents rather than stalling your queue.
Installing it
This pack has zero Python dependencies (dependencies = [] in its pyproject), so there's no dependency hell and no model downloads - genuinely rare in this ecosystem, and it's the pack's whole pitch. Install once and all seven IMGNR nodes come with it:
cd ComfyUI/custom_nodes
git clone https://github.com/ImagineerNL/ComfyUI-IMGNR-Utils
Or use ComfyUI Manager and search "ComfyUI-IMGNR-Utils". Restart ComfyUI, and the node appears under the IMGNR category.
Gotchas
Wire this only into string producers - it doesn't accept arbitrary types. And remember the soft vs. hard mute difference: soft mute is polite, hard block is the one that actually prevents the upstream node from running if something else wants it. Most people pick use_edit_block_inputnode when the upstream is a paid API call and use_edit_mute_input when it's a local sampler that doesn't cost anything extra.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| editable_text_widget | STRING | Catches and shows any text being created by a previous node Enables editing the text for subsequent runs. Mute: mutes connected input node. If inputnode is forced to run, (e.g. randomize seed or other connected output to that node), the input node still runs but the catcher ignores it. Block: actively prevents previous node from running. Use statuscolor toggle to show mode on node header. | — |
| action | COMBO | use_input | Mode Selector |
| use_status_color | BOOLEAN | true | Color Titlebar |
| input_textopt | STRING | Connect here |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |