Fooocus extends the standard text prompt with three powerful inline processing systems: wildcards for randomized token substitution, array processing for automated multi-variant generation, and inline LoRA syntax for per-prompt model blending. These features can be mixed together to build sophisticated, data-driven prompt workflows without leaving the UI.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/lllyasviel/Fooocus/llms.txt
Use this file to discover all available pages before exploring further.
Wildcards
Wildcards let you inject a randomly selected word or phrase from a plain-text file directly into a prompt at generation time. Fooocus scans thewildcards/ directory for .txt files; each file name becomes an available wildcard keyword.
Syntax: Wrap the wildcard name in double underscores.
__color__ with a random line from wildcards/color.txt before sampling. Randomness is derived from the generation seed, so the same seed always produces the same substitution.
Wildcards are processed for both positive and negative prompts, unlike arrays and inline LoRAs which are positive-prompt only.
Available Wildcard Files
The following wildcard files ship with Fooocus out of the box:| File | Description |
|---|---|
wildcards/animal.txt | Common animal names |
wildcards/artist.txt | Artist names |
wildcards/color.txt | Basic color names (aqua, black, blue, fuchsia, …) |
wildcards/color_flower.txt | Nested wildcard: __color__ __flower__ |
wildcards/extended-color.txt | Extended color palette |
wildcards/flower.txt | Large list of flower species |
wildcards/nationality.txt | Nationalities and demonyms |
.txt file into the wildcards/ folder and reference it with __filename__ (without the .txt extension).
Wildcard File Format
Each line in a wildcard file is one possible substitution value. Blank lines are ignored.Nested Wildcards
Wildcard files can themselves contain wildcard syntax, allowing multi-level substitution. The built-incolor_flower.txt demonstrates this pattern:
__color_flower__ is used in a prompt, Fooocus first loads color_flower.txt, which resolves to __color__ __flower__, and then recursively resolves each of those wildcards. The maximum BFS resolution depth is 64 levels.
Multiple Wildcards in One Prompt
Several wildcards can appear in the same prompt:Sequential (Non-Random) Order
By default, wildcard selection is random (seeded). To process a wildcard file from top to bottom in order instead of randomly, enable “Read wildcards in order” in Developer Debug Mode. This is useful for batch generation where you want every entry in a file to appear exactly once.Array Processing
Arrays let you define a list of prompt variants inline and generate one image per variant automatically. This is the fastest way to compare multiple subjects, styles, or LoRAs without manually editing the prompt between runs. Syntax: Enclose a comma-separated list in double square brackets.red flower, one with green flower, and one with blue flower.
Matching Image Count
To ensure every variant is generated, set Image Number to match the number of elements in the array. With the example above, set Image Number to3.
Multiple Arrays
You can include more than one array in a single prompt. Each combination is generated:a realistic portrait of a cata anime portrait of a dog
Arrays are processed left-to-right and cannot be nested inside each other.
Arrays with Inline LoRAs
Array elements can contain inline LoRA syntax, making it easy to compare the effect of different LoRAs:Inline LoRAs
Inline LoRAs apply a LoRA model to the generation directly from the prompt text, without using the LoRA panel in the UI. Syntax:Requirements
- The LoRA file must exist in the
models/loras/directory. - The weight is a float value (e.g.,
0.5,1.0,1.2). - Multiple inline LoRAs can be placed in the same prompt.
Embeddings
Textual inversion embeddings follow a similar pattern using theembedding: prefix:
models/embeddings/. The weight modifier (1.1 in the example) scales the embedding’s contribution.
Prompt Weighting
Fooocus supports A1111-style token emphasis for fine-grained control over how strongly specific words influence the generation. Syntax:1.0 strengthen a token’s influence; values below 1.0 weaken it. Parentheses without a weight value use a default multiplier.
Fooocus uses Automatic1111’s reweighting algorithm, which produces better results when copying prompts directly from Civitai compared to ComfyUI’s native reweighting format.
