ACB PPP ExtraNetwork Mapping Options
One prompt name for your LoRA in every model family
- options
If you keep several versions of the same LoRA - one for Pony, one for Illustrious, maybe an SDXL base - your prompts end up full of <lora:name_pony:0.8> vs <lora:name_illustrious:0.9> branches. ACB PPP ExtraNetwork Mapping Options is the settings node for the feature that deletes that problem: you give the LoRA a single virtual name, and PPP swaps it for the right real file based on the loaded model. Wire this node's options output into en_options on ACB Prompt Post Processor.
How the mapping works
You define mappings in YAML, either in a folder or inline. A mapping groups the same logical character/style across model families:
lora:
my_character:
- condition: "_is_sd1"
name: "my_character_sd1"
parameters: "0.8"
triggers: ["my_char_trigger"]
- condition: "_is_sdxl"
name: "my_character_xl"
parameters: "0.9"
triggers: ["my_char_trigger", "detailed"]
- condition: "_is_flux"
name: "my_character_flux"
parameters: "1.0"
triggers: ["my_char_trigger"]
Then in the prompt you write <ppp:ext $lora my_character>extra trigger words<ppp:/ext>. PPP evaluates the _is_* conditions (which requires model/modelname set on the main node), picks the matching entry, builds the correct <lora:...:...> tag, and prepends that variant's trigger words. If several conditions match, one is chosen randomly weighted by each entry's weight. If none match, nothing is emitted - the whole tag quietly disappears.
The node itself has just two inputs:
- folders - comma-separated list of folders holding mapping YAML files. Empty falls back to the pack's configured path (recommended: add a
ppp_extranetworkmappingsentry toextra_model_paths.yaml). - definitions - inline YAML mappings, handy when you want the mapping embedded in the workflow so it ships with the graph.
Why you'd bother
Two big wins. First, portability: the same prompt works across models without editing branches - flip from a Pony checkpoint to Illustrious and the mapping picks the right LoRA and the right weight for you. Second, it keeps trigger words with the mapping instead of buried in prompt text, so you can't forget them. The weight in the command and the mapping's parameters multiply when both are numbers, so <ppp:ext $lora my_character 0.75/> scales the mapped value.
Install
Same pack as the main node. ComfyUI Manager → search "Prompt PostProcessor", or:
cd ComfyUI/custom_nodes
git clone https://github.com/acorderob/sd-webui-prompt-postprocessor
Restart. No model downloads; requirements are lark, numpy, ruamel.yaml, pydantic. MIT.
Common issues
The number-one gotcha is the silent no-match: condition typo or missing modelname and the whole LoRA vanishes with no error. Watch the log at debug_level above minimal - it will tell you what mapped and what didn't. Also, since the mapping needs the _is_* system variables populated, this is one of the nodes where skipping model/modelname on the main node genuinely breaks the feature rather than just degrading it. Run tools/check_loras.py from the pack after you update or delete LoRA files; it flags broken references in mappings and wildcards before they bite you mid-generation.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| foldersopt | STRING | Comma separated list of extranetwork mappings folders | |
| definitionsopt | STRING | Extranetwork mappings definitions in yaml format |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| options | PPP_OPTIONS_EN | — |