ACB PPP Cleanup Options
Kill the double commas and dead parentheses
- options
Once Prompt PostProcessor has rolled your wildcards, evaluated your conditions and relocated your negatives, the leftover text can look like someone sneezed on a keyboard: , , in the middle of nowhere, an empty () where a conditional branch returned nothing, a BREAK doing nothing. The ACB PPP Cleanup Options node is the settings panel for that tidy-up pass. It emits an options object you feed into the cup_options input of ACB Prompt Post Processor - and like the other options nodes, you only need it when the defaults aren't cutting it.
The switches that matter
It's a flat list of booleans, all on/off, and most defaults are sensible. The ones a beginner actually touches:
- extra_spaces (on) - collapse doubled-up whitespace.
- empty_constructs (on) - delete attention/scheduling/alternation constructs that ended up empty after processing (e.g.
( )or[]). - extra_separators (on) and extra_separators_additional (on) - strip repeated commas and separators, including leading/trailing ones at line ends.
- merge_attention (on) - the clever one. Merges nested attention weights into a single construct, multiplying the values:
((word:1.2):0.9)collapses toward a clean(word:1.08). This is the option that makes send-to-negative output read cleanly. - remove_extranetwork_tags (off) - if you ever want to strip every
<lora:...>tag out of the result, this is the nuclear button.
The rest are refinements - extra_separators_include_eol, around_breaks / breaks_with_eol, around_ands / ands_with_eol, around_extranetwork_tags. One honest warning: BREAK and AND aren't natively supported by ComfyUI, so those options only do anything if you're using a text-encoder node that implements them and you've configured the pack to allow them. On stock ComfyUI they're dead switches.
Wiring it up
Drop the node, flip what you need, connect options → cup_options on the main node:
[ ACB PPP Cleanup Options ] --options--> [ ACB Prompt Post Processor ].cup_options
The cleanup also has a companion toggle on the main node itself: do_cleanup turns the whole pass on or off, and cleanup_variables cleans the output variable values too.
Install
Same pack as everything else. ComfyUI Manager → search "Prompt PostProcessor", or:
cd ComfyUI/custom_nodes
git clone https://github.com/acorderob/sd-webui-prompt-postprocessor
Restart ComfyUI. No model downloads; requirements are lark, numpy, ruamel.yaml, pydantic. MIT, actively maintained.
Common issues
The usual gotcha is being too aggressive. remove_extranetwork_tags on will silently delete every LoRA from the final prompt - great for experiments, a nasty surprise if you forgot it was on. And if your prompts have meaningful commas (tag-style booru prompts are comma soup by design), extra_separators combined with extra_separators_additional can over-prune; when in doubt, leave additional off and check the processed output in a Preview Text node before blaming the model for missing tags.
Inputs (12)
| Name | Type | Default | Description |
|---|---|---|---|
| extra_spacesopt | BOOLEAN | true | Remove extra spaces |
| empty_constructsopt | BOOLEAN | true | Remove empty constructs |
| extra_separatorsopt | BOOLEAN | true | Remove extra separators |
| extra_separators_additionalopt | BOOLEAN | true | Remove extra separators (additional cases) |
| extra_separators_include_eolopt | BOOLEAN | false | Extra separators options also remove EOLs |
| around_breaksopt | BOOLEAN | false | Cleanup around BREAKs |
| breaks_with_eolopt | BOOLEAN | false | Set BREAKs in their own line |
| around_andsopt | BOOLEAN | false | Cleanup around ANDs |
| ands_with_eolopt | BOOLEAN | false | Set ANDs in their own line |
| around_extranetwork_tagsopt | BOOLEAN | false | Clean up around extra network tags |
| merge_attentionopt | BOOLEAN | true | Merge nested attention constructs |
| remove_extranetwork_tagsopt | BOOLEAN | false | Remove extra network tags |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| options | PPP_OPTIONS_CUP | — |