PromptEdit
Route positive/negative prompt tweaks from inside your prompt text
- positive_prompt
- negative_prompt
You've got a big wildcard file, or a long list of prompt variations, and half of them really need a matching negative-prompt tweak riding along - this option wants "daylight" kept out of the negative, that one wants an extra exclusion nobody else needs. Keeping two separate lists in lockstep is exactly the kind of busywork that breaks silently the moment you add one more line. PromptEdit exists to kill that: it reads small <edit:...> tags typed directly inside your prompt text and executes them - append text to a prompt, or run a straight regex replace - then hands you back clean positive/negative strings with the tags stripped out.
It ships alongside PromptGenerationConfig in the same pack, and the author (Taremin) also built a Monaco-editor prompt extension for ComfyUI, so this is someone who spends their time on prompt-text tooling specifically, not on generation itself. Don't go in expecting a big install base or a subreddit thread about it - it's a small, quiet utility node, not a community darling. That's not a knock on it: it does one narrow job, in-prompt, and it's genuinely useful once you've got sprawling wildcard files to keep in sync.
How it works
PromptEdit takes two plain strings - positive_prompt and negative_prompt, whatever you'd normally type into a pair of CLIPTextEncode boxes, or whatever a wildcard/dynamic-prompt node hands you. It scans both for two kinds of tag written right there in the text:
<edit:add:prompt=STRING:to={positive|negative}:position={head|tail}>- inserts STRING into positive_prompt or negative_prompt (defaults to negative if you skipto), at the front or the end (defaults to tail).<edit:replace:pattern=REGEX:replace=STRING>- runs a regex substitution, but only on whichever field the tag itself is written in. Put it in the negative box and it only touches negative text; it won't reach across into positive.
Whatever it finds, it executes, strips the tag out of the result, and returns the two cleaned strings.
The inputs and outputs that matter
Both required inputs are plain multiline strings: positive_prompt and negative_prompt - feed them your prompt text, tags and all. The two outputs share the same names, positive_prompt and negative_prompt, and are the processed result: tags gone, additions and replacements applied. Wire those straight into your two CLIPTextEncode nodes and nothing downstream needs to know PromptEdit was ever there.
Installing it
Easiest path is ComfyUI Manager: search comfyui-prompt-config, install, restart. Manual route:
cd ComfyUI/custom_nodes
git clone https://github.com/Taremin/comfyui-prompt-config
Restart ComfyUI afterward. No models, no extra Python dependencies beyond what ComfyUI already ships - it's pure text processing.
Where people get tripped up
The syntax uses : as its own separator, so if the text you're inserting contains a literal colon - a LoRA-style weight like (cyberpunk:1.3), say - you need to escape it as \: inside the prompt= value, or the parser reads it as the start of the next key and your tag falls apart. Same goes for <, >, and =; escape those too, and use \\ for a literal backslash.
Second trap: the default target for add is negative, not positive. Skip the to= argument and your text lands in the negative prompt even if you typed the tag inside your positive box. Say to=positive explicitly if that's what you meant.
Third: replace is scoped to the field it's written in. A <edit:replace:...> tag sitting in your negative prompt never touches your positive prompt, even if the pattern would technically match text there - duplicate the tag in both boxes if you want it applied twice.
And one that has nothing to do with the node and everything to do with what you're running it on: if your checkpoint is one of the 2026-era guidance-distilled models (Z-Image Turbo, Flux 2 Klein distilled, and similar) running at its default CFG of 1, the negative prompt field does nothing at all - there's no unconditional pass left for it to steer. PromptEdit will happily append your text and hand back a perfectly correct negative_prompt string; it just won't change the image, because the sampler never reads it at CFG 1. That's not a PromptEdit bug, it's the model - nudge CFG up a little, or restate the constraint as something positive instead.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| positive_prompt | STRING | — | |
| negative_prompt | STRING | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| positive_prompt | STRING | — |
| negative_prompt | STRING | — |