Seed Based Wildcard (Impact & Weighted)
The wildcard node that's deterministic per seed
- selected_text
Most wildcard systems roll the dice every run: your prompt text changes, your seed changes, and if you ever want to reproduce the exact image that came out of a great seed, good luck. SeedBasedWildcardImpact ("Seed Based Wildcard (Impact & Weighted)") is the pack's headline node, and its whole pitch is in the name - the wildcard choice is derived from the seed, so the same seed always picks the same line and the same internal options. Reproducible variety.
What it does
You point it at a wildcard text file, give it a seed, and it returns selected_text - one line from that file, with all the wildcard syntax inside it resolved. "Wildcard file" here doesn't mean any text file: it reads from Impact Pack's wildcards folder. That's a deliberate choice, because Impact Pack's dynamic-prompt syntax is the ecosystem standard, and this node implements it directly:
__tag__- pull a random line from another wildcard file (matched by filename, case-insensitive){a|b|c}- pick one of the alternatives{1::a|9::b}- weighted alternatives:bis nine times as likely asa
That last one is the feature most wildcard nodes don't have, and it's genuinely useful - you can make a common outcome dominant while keeping rare surprises in the mix.
How it works
The mechanism is worth understanding because it explains both the reproducibility and the quirks. The node reads the file, picks line (seed - 1) % line_count (so seed 1 = first line), then resolves any __tag__ and {...} syntax inside that line using a random.Random(seed) instance. Because both the line pick and the inner choices are seeded from the same number, a given seed is fully reproducible - line, options, everything. Change the seed by one and you land on a different line with different inner choices. That's the feature.
It also handles nested wildcards recursively (up to 20 levels deep, so don't build infinite loops), and it defensively converts negative seeds to positive with abs() before indexing - which pairs beautifully with the pack's Seed Generator node.
The inputs
Only two, which is the appeal:
wildcard_file- a dropdown of every.txtfile found incustom_nodes/ComfyUI-Impact-Pack/wildcards, including subfoldersseed- an INT, default 1
That's it. No toggles, no weights to set per-option in the UI (weights live inside the {1::a|9::b} syntax in the file itself).
Where it sits
The output is a plain string, so it feeds any prompt assembler, CLIP text encode, or the pack's Dynamic Text Concatenate. The canonical workflow is: seed → this node → prompt, and then the same seed also drives your KSampler. Result: the prompt and the sampling are locked together, so a seed that produces a great image reproduces exactly. It's also superb for seed grids - X/Y plot over seeds, and each cell gets its own consistent wildcard expansion.
Install - and the one gotcha that bites everyone
The pack installs the usual way:
cd ComfyUI/custom_nodes
git clone https://github.com/sinanzoo2nd/ComfyUI-Seed-Wildcard-Pack
or ComfyUI Manager → Seed Wildcard. No requirements.txt, no model files.
The gotcha is in the path: the node hard-codes custom_nodes/ComfyUI-Impact-Pack/wildcards. If you don't have Impact Pack installed, that folder doesn't exist, the dropdown shows a placeholder called no_txt_files_found.txt, and the node returns an empty string. People hit this constantly. The fix is not a bug report - install Impact Pack (ComfyUI Manager has it) and put your .txt wildcard files in its wildcards folder. Impact Pack is already the source of the __tag__/{a|b} syntax anyway, so the dependency is philosophically consistent, just undocumented.
Second, smaller gotcha: it only sees .txt files, and it only refreshes the dropdown when the node loads - drop a new file in the wildcards folder and you may need to reload the workflow to see it. And if the file itself is missing at run time, you get an empty string silently, so check the path before assuming the node is broken.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| wildcard_file | COMBO | 1 options: no_txt_files_found.txt | |
| seed | INT | 1-18446744073709550000–18446744073709550000 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| selected_text | STRING | — |