CLIP Text Encode edit+
A CLIP encode that lets you edit the prompt before it's encoded
- clip
- conditioning
- text
Here's the honest description: CLIP Text Encode edit+ is not a metadata node at all. It's a smarter CLIPTextEncode, and it's the one node in the Model and Prompt from Metadata pack that doesn't read anything from a PNG. What it does is fix a workflow annoyance: you've got a prompt coming in from somewhere - say the positive_text output of the pack's Model-Prompt from Metadata node - and you want to tweak it before it gets encoded, without rewriting the whole prompt. This node gives you four modes and a live edit box for exactly that.
How it works
The trick is that the prompt is passed in as plain text, not already encoded, so you can mangle it before the node calls clip.tokenize / encode_from_tokens. It works in four modes, selectable from the mode dropdown:
- RAW - uses
text1exactly as received. Pointless if you're not editing, useful when you want the original untouched. - EDIT - uses the text in the
text_editbox instead. This box pre-fills with whatever's connected totext1when you first hook it up, so "tweak one tag" is genuinely one gesture. - front - inserts
text2(or the EDIT text iftext2isn't connected) beforetext1, joined with a comma. - back - same, but appended after
text1.
The text output returns the final string it actually encoded, which makes debugging trivial - wire it to a text display and you'll see exactly what the model got. That's the feature I reach for when results look wrong: it separates "my prompt is bad" from "my encoding is broken."
Inputs and outputs that matter
clip- required, in from your checkpoint or LoRA chain.mode- the four-way switch above.text_edit- the editable textarea, pre-filled on first connection.text1/text2- optional STRING inputs.text1is the main prompt; it does not need to be connected in EDIT mode, which is handy when you're starting from a blank slate.text2is the front/back insert.
Outputs: conditioning (wire to your KSampler) and text (the final string).
Why you'd actually use this
The intended flow, per the README: connect positive_text from Model-Prompt from Metadata to text1, and negative_text to a second instance of this node. Then you can keep the original intact (RAW), doctor it (EDIT), or - my favorite - use back to append a few quality tags like masterpiece, best quality without disturbing the source prompt, so the original text stays pristine for comparison. One light caveat from the docs: when text2 is connected, the EDIT textarea goes dim and is ignored in front/back mode. It's the classic footgun - you've connected text2, edited the box, and your changes vanish. If that happens, unplug text2 or switch to EDIT mode.
Installing it
Identical to the rest of the pack: ComfyUI Manager → search "Model and Prompt from Metadata", or
cd ComfyUI/custom_nodes
git clone https://github.com/ketle-man/model-and-prompt-from-metadata
restart, done. The pack has zero Python dependencies and no models to download - it's a thin JS + Python layer over ComfyUI's own APIs. You don't need the rest of the pack to use this node, but if you're here, you probably want the metadata loaders it ships with anyway. They complement each other: those get the prompts out, this one lets you edit them before they hit the sampler.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| clip | CLIP | — | |
| text_edit | STRING | — | |
| mode | COMBO | 4 options: RAW, EDIT, front, back | |
| text1opt | STRING | — | |
| text2opt | STRING | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| conditioning | CONDITIONING | — |
| text | STRING | — |