sd-webui-prompt-postprocessor

sd-webui-prompt-postprocessor
★ 50

提示词后处理负面提示通配符批量处理
sd-webui-prompt-postprocessor 用于对输入提示词进行后处理,支持将提示内容转移至负面提示、处理并注入通配符,便于批量化与规范化提示管理。
💡 在生成前自动将关键词或敏感项移入负面提示并应用通配符规则。
🍴 4 Forks💻 Python🔄 2026-03-15
📦
网盘下载
复制链接后前往夸克网盘下载
https://pan.quark.cn/s/af9fbf81e746
📦 requirements.txt
lark
numpy
pyyaml
📄 README

Prompt PostProcessor for Stable Diffusion WebUI and ComfyUI

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:

  • ComfyUI
  • AUTOMATIC1111 Stable Diffusion WebUI
  • Forge
  • reForge
  • …and probably other forks
  • Currently this extension has these functions:

  • Sending parts of the prompt to the negative prompt. This allows for useful tricks when using wildcards since you can add negative content from choices made in the positive prompt.
  • Set and modify local variables.
  • Filter content based on the loaded SD model or a variable.
  • Process wildcards. Compatible with Dynamic Prompts formats. Can also detect invalid wildcards and act as you choose.
  • Map extranetworks (LoRAs) depending on conditions (like the loaded model variant).
  • Clean up the prompt and negative prompt.
  • 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:
  • Attention: [prompt] (prompt) (prompt:weight)
  • Alternation: [prompt1|prompt2|...]
  • Scheduling: [prompt1:prompt2:step]
  • Extra networks:
  • BREAK: prompt1 BREAK prompt2
  • Composable Diffusion: 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.
  • Installation

    On *A1111* compatible webuis:

  • Go to Extensions > Install from URL
  • Paste in the URL for extension’s git repository text field
  • Click the Install button
  • Restart the webui
  • On *SD.Next* I recommend you to disable the native wildcard processing and use the old UI.

    On *ComfyUI*:

  • Go to Manager > Custom Nodes Manager
  • Search for “Prompt PostProcessor” and install or click Install via Git URL and enter
  • Restart
  • Usage

    See the syntax documentation.

    Configuration

    See the configuration documentation.

    License

    MIT

    Contact

    If you have any questions or concerns, please leave an issue, or start a thread in the discussions.