Nodes/Wildcard Pipeline/WP Model Info
ComfyUI Node

WP Model Info

Teach Your Prompt Template Which Checkpoint It's Running

By DumiFlex·Created 7 months ago·Updated 3 days ago· 13
WP Model Info
  • upstream
  • model
  • wp_model_info
  • context

One prompt template, two checkpoints, one headache. On Pony the full score_9, score_8_up, … string is effectively mandatory - it was trained as one concatenated blob, and community consensus is that Pony fried SDXL's understanding of plain language. On Illustrious those tags do nothing at all; you want masterpiece, best quality plus real Danbooru tags.

Your LoRA stack has the same problem. Pony V6 adapters do nothing on Pony V7 (different base entirely), Illustrious LoRAs mostly carry over to NoobAI, and Pony ones are hit and miss. The prompt that makes one checkpoint sing makes another one worse. WP Model Info is how one template learns which model it's actually running on.

What it writes

Three variables, into the WP Context:

  • $model_family - the architecture, read off the loaded model itself: sd15, sdxl, flux, sd3, chroma, qwen_image, wan, ltxv, and so on.
  • $model_variant - the fine-tune lineage, read from the file name: pony, illustrious, noobai, animagine, or empty if nothing matches.
  • $model_name - the file name, stripped of folders and extension.

That split is the whole point. Pony and Illustrious are the same architecture. Both are SDXL underneath, so $model_family cannot separate them - architecturally there is nothing to separate. Only the filename carries that, which is why variant detection is pattern matching rather than introspection.

How it detects anything

The family comes from model.model.model_config's class name - ComfyUI's own idea of what it loaded - mapped through a prefix table checked longest-prefix-first, so SDXLRefiner lands before SDXL, and SSD1B, KOALA and Segmind_Vega all resolve to sdxl. Unknown classes fall back to their own name in snake_case, so a model released after that list was written still gets a stable value rather than an empty string.

The file name comes from walking backwards through the API prompt from your model wire, stepping over LoRA loaders and other model patches, until it finds the node that actually loaded the checkpoint and reads its file-name widget. Hence the tooltip's warning about a graph loop if a node that loads LoRAs from the prompt sits on your model - take MODEL from before it.

The shipped variant rules, first match wins, case-insensitive, matched anywhere in the name: noob → noobai, pony|pdxl → pony, illustrious|ilxl → illustrious, animagine → animagine. NoobAI sits above Illustrious on purpose - NoobAI files often mention both.

Inputs, output, and the widget

Inputs are few. upstream (optional) is an existing Context to extend. model is the MODEL wire from your checkpoint loader. That's it, plus the node's own settings widget. There's exactly one output, context - wire it into your first WP Context, and put the node at the start of the chain, because only nodes after it see the model variables.

The widget does the real work. Detected shows each value and where it came from (model, loader, rules, or pinned), and a globe on each row decides whether the Assembler may use it. All three start internal: later rules read them, the Assembler leaves them out of the prompt. Click a globe if you want $model_variant in a file-name prefix. The pin overrides detection with your own value: pin pony and you can test your Pony rules without loading a Pony checkpoint. Variant rules are editable variant + pattern rows with a Reset; a broken row is outlined red and skipped rather than killing the rest.

Two author-shipped shortcuts: the derivation editor's LoRA by model button drops in a ready-made rule setting $loras per variant, and a wildcard set to Match variable = model_variant picks whichever option equals the detected variant - letting a wildcard drive a constraint off the checkpoint.

Install

Manager → search Wildcard Pipeline by dumiflex → Install → restart. Or:

cd ComfyUI/custom_nodes
git clone https://github.com/DumiFlex/ComfyUI-Wildcard-Pipeline
cd ComfyUI-Wildcard-Pipeline
pnpm install
pnpm build

For a clone, pnpm build isn't optional: the frontend is built output that isn't in the repo, so without it the widget never mounts. No models to download, no Python dependencies; the pack needs ComfyUI 0.3.36+.

Where people get burned

$model_family is blank until the first run. The family needs a loaded model to inspect, so the widget can't show it from the graph alone. Variant and name update the moment you change the loader's checkpoint; the family appears after one generation.

An empty $model_variant is normal, not a bug. Detection is filename string matching, so none of the shipped patterns match myChar_v3_final.safetensors. Add a rule row for your naming convention, or pin the variant - the node warns in WP Debug when it has nothing at all to go on.

A typo in a rule row is silent. A half-filled row is skipped with a warning rather than an error, so if a rule never fires, check WP Debug's trace before assuming detection failed.

Categorywildcard-pipeline

Inputs (3)

NameTypeDefaultDescription
upstreamoptPIPELINE_CONTEXTOptional upstream Context to extend. Only nodes AFTER this one see the model variables, so it usually goes first.
modeloptMODELThe model from your checkpoint loader. Gives $model_family (sdxl, flux, …) and, through the loader, the file name. If a node that loads LoRAs from the prompt sits on the model, take MODEL from BEFORE it, or the graph loops.
wp_model_infooptWP_MODEL_INFO—

Outputs (1)

NameTypeDescription
contextPIPELINE_CONTEXT—