Skip to main content

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.

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.

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 the wildcards/ directory for .txt files; each file name becomes an available wildcard keyword. Syntax: Wrap the wildcard name in double underscores.
__color__ flower
Fooocus replaces __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:
FileDescription
wildcards/animal.txtCommon animal names
wildcards/artist.txtArtist names
wildcards/color.txtBasic color names (aqua, black, blue, fuchsia, …)
wildcards/color_flower.txtNested wildcard: __color__ __flower__
wildcards/extended-color.txtExtended color palette
wildcards/flower.txtLarge list of flower species
wildcards/nationality.txtNationalities and demonyms
You can add your own files — just drop any .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.
aqua
black
blue
fuchsia
gray
green
lime

Nested Wildcards

Wildcard files can themselves contain wildcard syntax, allowing multi-level substitution. The built-in color_flower.txt demonstrates this pattern:
__color__ __flower__
When __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:
a painting of a __color__ __flower__ by a __nationality__ __artist__

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, green, blue]] flower
Fooocus generates three separate images — one with red flower, one with green flower, and one with blue flower.
Arrays are processed for the positive prompt only. They have no effect in the negative prompt field.

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 to 3.

Multiple Arrays

You can include more than one array in a single prompt. Each combination is generated:
a [[realistic, anime, oil painting]] portrait of a [[cat, dog]]
This produces 2 images — one per pair from left-to-right array resolution:
  1. a realistic portrait of a cat
  2. a 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:
[[sunflower field, sunflower field <lora:sunflowers:1.2>, sunflower field <lora:sunflowers:0.5>]]

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:
flower <lora:sunflowers:1.2>
Inline LoRAs are processed for the positive prompt only.

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.
epic landscape <lora:add_detail:0.8> <lora:film_grain:0.4>

Embeddings

Textual inversion embeddings follow a similar pattern using the embedding: prefix:
(embedding:file_name:1.1)
The embedding file must be present in 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:
I am (happy:1.5)
Values above 1.0 strengthen a token’s influence; values below 1.0 weaken it. Parentheses without a weight value use a default multiplier.
(masterpiece:1.3), best quality, (detailed face:0.8)
Fooocus uses Automatic1111’s reweighting algorithm, which produces better results when copying prompts directly from Civitai compared to ComfyUI’s native reweighting format.

Combining Features

All four systems can be combined in a single prompt. For example, a wildcard that resolves to an inline LoRA inside an array element is fully supported. Keep the BFS depth limit of 64 in mind when designing deeply nested wildcard chains, and remember that only wildcards work in the negative prompt — arrays and inline LoRAs are positive-prompt only.
Positive: [[__color__ flower <lora:floral_detail:0.8>, __color__ flower]] in a garden, (vivid:1.2)
Negative: __extended-color__ background, blurry

Build docs developers (and LLMs) love