Stable Diffusion WebUI & ComfyUI extension to post-process the prompt, including sending content from the prompt to the negative prompt and wildcards.
The Prompt PostProcessor (PPP), formerly known as "sd-webui-sendtonegative", is an extension designed to process the prompt, possibly after other extensions have modified it. This extension is compatible with:
Currently this extension has these functions:
Note: when used in an A1111 compatible webui, the extension must be loaded after any other extension that modifies the prompt (like another wildcards extension). Usually extensions load by their folder name in alphanumeric order, so if the extensions are not loading in the correct order just rename this extension's folder so the ordering works out. When in doubt, just rename this extension's folder with a "z" in front (for example) so that it is the last one to load, or manually set such folder name when installing it.
If the extension runs before others, like Dynamic Prompts, and the "Process wildcards" is enabled, the wildcards will be processed by PPP and those extensions will not get them. If you disable processing the wildcards, and intend another extension to process them, you should keep the "What to do with remaining wildcards?" option as "ignore".
Notes:
Other than its own commands, it only recognizes regular A1111 prompt formats. So:
[prompt] (prompt) (prompt:weight)
[prompt1|prompt2|...]
[prompt1:prompt2:step]
<kind:model...>
prompt1 BREAK prompt2
prompt1:weight1 AND prompt2:weight2
In SD.Next that means only the A1111 or Full parsers. It will warn you if you use the Compel parser.
Does not recognize tokenizer separators like TE2:
and TE3:
, so sending to negative prompt from those sections of the prompt will not add them in the corresponding section of the negative prompt.
ComfyUI only supports natively the attention using parenthesis, so the ones with the braces will be converted. The other constructs are not natively supported but some custom nodes implement them.
It recognizes wildcards in the __wildcard__
and {choice|choice} formats (and almost everything that Dynamic Prompts supports).
It does not create AND/BREAK constructs when moving content to the negative prompt.
On A1111 compatible webuis:
On SD.Next I recommend you disable the native wildcard processing.
On ComfyUI:
See the syntax documentation.
See the configuration documentation.
MIT
If you have any questions or concerns, please leave an issue, or start a thread in the discussions.