Mustache Variables
Your whole prompt-versioning brain in one YAML block
- variable_sets
- variable_defs
This is the big one in the mustache family, and the reason the whole pipeline exists. You paste a YAML mapping of variable names to candidate values into the multiline box, and the node parses it into a MUSTACHE_VARIABLES definition dictionary for everything downstream. Where Mustache Variable builds one variable with no YAML, this one lets you define the whole versioning space at once - and it can reference variables inside the YAML itself:
color:
- brown
- blue
- black
hairarrangement:
- ponytail
- bun
hairstyle:
- {{color:static}} hair in a {{hairarrangement:static}}
That nested reference is the feature that makes this pack feel like a real prompt-language rather than a wildcard replacer. It ships with a full operator set you apply inline inside {{placeholders}}:
randomize(the default) - fresh random pick during lazy expansion.static- use the already-resolved value for that variable, don't reselect.repeat- reuse the most recent lazy pick for that variable from earlier in the same render.lowercase/propercase/uppercase- case transforms.notrim- preserve surrounding whitespace (default is trim).
Combine compatible ones with commas: {{color:static,lowercase}}. There's a subtle and worth-getting-right distinction: static uses the current resolved value, while repeat reuses the most recent lazy random choice - so {{color}} hair with {{color:repeat}} eyes pairs a fresh random color with the same one echoed for the eyes. You can even weight values with a :probability suffix (black:0.4) and the sampler will respect the odds.
The inputs
yaml_text- the mapping (or a list of mappings; multiple YAML strings get merged). Scalar values are accepted as shorthand for one-item lists. Nested objects/lists inside values are rejected, and duplicate variable names within one input raise an error rather than silently merging.variable_sets(optional) - an upstream concrete setting list used to pre-render the YAML before parsing. This is how you chain mustache stages:Mustache Variables → Mustache Variable Sampler → Reorder List → Mustache Variables. Don't wire aMUSTACHE_VARIABLE_LISTintoyaml_textitself - that replaces the template instead of rendering it.
Output: variable_defs of type MUSTACHE_VARIABLES - still just the definitions. The actual expansion into concrete settings happens in Mustache Variable Sampler.
Installing and using it
Part of Skoogeer-Noise. ComfyUI Manager → search "Skoogeer-Noise", or:
cd ComfyUI/custom_nodes
git clone https://github.com/ttulttul/Skoogeer-Noise
Restart ComfyUI. No models, no keys; deps are torch, numpy, einops, pyyaml.
The author ships two tracked example files in the repo - docs/mustache_template_guide.yaml for the workflow walkthrough and sample.yaml for a larger, layered example with weighted optional clauses - and both are genuinely worth opening if you want to see the operator system pushed hard. The main gotcha is expansion size: the lazy references resolve in Mustache Variable Sampler, so recursive or layered templates can explode combinatorially there - that's where limit earns its keep. And if you're comparing this to wildcard systems you've used before, the honest take is that this is more structured (typed sockets, real error messages on missing variables) but also more ceremony - worth it once your prompt space grows beyond a few one-off swaps.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| yaml_text | STRING | haircolor: - brown - blonde leglength: - short - long - weird | YAML mapping of variable names to values. Each key becomes a mustache variable and each value should usually be a list of render options. Scalar values are accepted as shorthand for a single-item list. If the optional variable_sets input is connected, this YAML is treated as a mustache template and rendered once per variable-setting entry before parsing. |
| variable_setsopt | MUSTACHE_VARIABLE_LIST | Optional concrete variable settings used to render templated YAML before parsing. This lets you chain one mustache-variable stage into another. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| variable_defs | MUSTACHE_VARIABLES | — |