ACB PPP Select Variable
Pull one variable out of the prompt and feed it to a detailer
- variables
- value
The ACB PPP Select Variable node is the output side of Prompt PostProcessor's variable system. The main node returns a PPP_DICT of every variable your prompt set; this node reaches into that dictionary and hands you back one value. It exists because of a genuinely clever ComfyUI pattern: build a variable inside the prompt, then reuse that exact text somewhere else in the graph.
The trick it enables
Say your prompt is a full scene with a few slots filled by wildcards:
__quality__, 1girl, ${head:__eyes__, __hair__, __expression__}, __body__, ...
The ${head:...} construct sets a variable called head to whatever those wildcards rolled. Wire the main node's variables output into this node, set name to head, and the value output gives you the resolved description - which you can feed straight into a detailer node's prompt for a face fix. The detailer only sees the head description, the main sampler sees the whole scene, and neither prompt gets cluttered with content that doesn't apply to it. That's the pattern the pack's own docs recommend, and it's the cleanest reason to install this node.
Inputs and behavior
- variables (required) - the
PPP_DICTfrom the main node's output. - name - which variable to pull. Here's the subtle bit: leave it empty and the node dumps every variable as
name: valuelines - a handy inspection tool. Fill it in and you get just that value. - if_not_found -
warn(default) returns thedefaultstring with a console warning;stopraises an error instead. - default - the fallback value when the variable isn't in the dictionary.
The value output is untyped (*), so it plugs into most string inputs. If the input dictionary is empty or None, the node errors - so don't wire this to a disconnected main-node output and expect silence.
Install
Same pack. 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.
Common issues
The traps are mostly variable-naming ones. Variable names are case-sensitive and the pack reserves anything starting with an underscore for system variables (_input_seed, _modelname, _modelfullname, ...) - you can extract those too, which is how people grab the actual seed or model path that the run used. If you get a default back when you expected a value, the variable was never set: either the prompt text didn't contain the ${name:...} construct, or a conditional branch that set it didn't fire. And remember only variables that ended up in the final prompt text are reliably in the output dict - a variable set and then never echoed still appears, but a variable from a branch that was filtered out won't. Set debug_level above minimal once and read the log; it lists the system variables on each run, which beats guessing.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| variables | PPP_DICT | Dictionary of variables to select from | |
| nameopt | STRING | Name of the variable to select | |
| if_not_foundopt | COMBO | warn | How to handle the case when the variable name is not found in the input dictionary |
| defaultopt | STRING | Default value if the variable is not found |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| value | * | — |