Wildcards
Write a header line like `color:` then one option per line. Each header becomes a separate __color__.txt file. Lines starting with # are comments.
Files to create
In Stable Diffusion's sd-dynamic-prompts extension (A1111, ComfyUI, and others), a wildcard referenced as __color__ or __pose__ is backed by a plain text file — color.txt, pose.txt — placed in the extension's wildcards folder, one option per line. The more options you add, the more variety you get, but building a file per category, saving each one in a text editor, minding the encoding and trailing newline, and arranging them in the wildcards folder is tedious busywork. This tool assembles all those .txt files inside your browser and writes them out as a single ZIP. In the box on the left, write a header line like `color:` and list one option per line below it. Each header becomes its own __color__.txt (a wildcard named color); stack several categories and you get as many files as you need in one go (lines starting with # are treated as comments). Turn on 'Put in wildcards/ folder' and the ZIP is laid out with a wildcards folder so you can extract it straight into the extension. 'Remove duplicate lines' cleans up pasted options, and 'Sort lines A→Z' tidies each file. The right side previews the file names and line counts so you can check everything before saving. Files are written as UTF-8 with a single trailing newline, so sd-dynamic-prompts reads them as-is. When you instead want to see how a finished wildcard expands in a real generation, use wildcard-tester (this tool is for making the files; that one is for previewing the expansion). All processing happens on your device — your options and the generated files are never uploaded, stored, or sent anywhere.
How to use
- In the box, write a header line like `color:` and list one option per line below it. Stack as many categories as you like (lines starting with # are comments).
- Optionally tidy each file with 'Remove duplicate lines' and 'Sort lines A→Z', and check names and line counts in the preview.
- Toggle 'Put in wildcards/ folder' to choose the folder layout inside the ZIP.
- Hit 'Download ZIP' and extract it into your extension's wildcards folder.
FAQ
Are my options or files uploaded anywhere?
No. Parsing the text, generating the .txt files, and building the ZIP all happen inside your browser. Your input and the generated files are never uploaded, stored, or sent anywhere — nothing leaves your device.
What file name does each category get?
The `name:` from the header line becomes the file name. `color:` produces color.txt; `character/hair:` keeps the path in the name (sd-dynamic-prompts references them as __color__ or __character/hair__). Characters not allowed in file names (: * ? and so on) are replaced with _.
How is this different from wildcard-tester?
This tool is for building the .txt files that back your wildcards. wildcard-tester takes finished wildcards and previews how __name__ and {a|b|c} expand in a real generation. Use them together: make the files here, then check their behavior there.
Where do I put the ZIP I made?
Extract it into your extension's wildcards folder (for A1111's sd-dynamic-prompts that's typically extensions/sd-dynamic-prompts/wildcards, but it varies). With 'Put in wildcards/ folder' on, the ZIP already contains a wildcards folder, so you can extract it to match your setup.
Are the encoding and trailing newline handled correctly?
Each .txt is UTF-8 with a single trailing newline at the end of the content — the common format sd-dynamic-prompts expects. An empty category (zero options) is written as an empty file.