On the very first launch, Fooocus writes aDocumentation 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.
config.txt file to the root of the Fooocus directory. This file is standard JSON and controls everything from where Fooocus looks for model files to the default sampler, styles, and prompt that appear when the UI opens. Editing config.txt is the primary way to customize Fooocus without touching any source code.
A companion file,
config_modification_tutorial.txt, is regenerated on every launch. It lists every recognized key with its current value and examples. Use it as a live reference — but make your actual edits in config.txt, not the tutorial file.Editing and Resetting
Open config.txt
Navigate to your Fooocus installation folder and open
config.txt with any plain-text editor. The file is UTF-8 encoded JSON.Edit values
Change the values you need, following the JSON format rules described below. Save the file when done.
Restart Fooocus
Fooocus reads
config.txt at startup. Restart the application for changes to take effect.Path Settings
These keys tell Fooocus where to find (or place) its various model assets. All values must be absolute paths.| Key | Default Location | Description |
|---|---|---|
path_checkpoints | ../models/checkpoints/ | Directory (or list of directories) for SDXL checkpoint files |
path_loras | ../models/loras/ | Directory (or list of directories) for LoRA files |
path_embeddings | ../models/embeddings/ | Textual inversion embedding files |
path_vae_approx | ../models/vae_approx/ | Approximate VAE models used for fast preview |
path_vae | ../models/vae/ | Full VAE models |
path_upscale_models | ../models/upscale_models/ | Upscale model files |
path_inpaint | ../models/inpaint/ | Inpaint head and patch files |
path_controlnet | ../models/controlnet/ | ControlNet and IP-Adapter models |
path_clip_vision | ../models/clip_vision/ | CLIP vision encoder models |
path_fooocus_expansion | ../models/prompt_expansion/fooocus_expansion | GPT-2 prompt expansion model |
path_outputs | ../outputs/ | Directory where generated images are saved |
path_wildcards | ../wildcards/ | Wildcard .txt files for inline prompt substitution |
path_checkpoints and path_loras accept a list of directories, allowing you to point Fooocus at multiple locations simultaneously:
Default Model Settings
| Key | Type | Default | Description |
|---|---|---|---|
default_model | string | "juggernautXL_v8Rundiffusion.safetensors" | Base checkpoint loaded at startup |
default_refiner | string | "None" | Refiner checkpoint ("None" to disable) |
default_refiner_switch | float (0–1) | 0.5 | Sampling step at which to swap to the refiner |
previous_default_models | list of strings | [] | Fallback model names checked when the primary model file is not found |
default_loras | list of [bool, string, float] | 5 disabled LoRAs | Active LoRA slots. Each entry is [enabled, filename, weight] |
default_loras_min_weight | float (-10–10) | -2 | Minimum allowed LoRA weight in the UI |
default_loras_max_weight | float (-10–10) | 2 | Maximum allowed LoRA weight in the UI |
default_max_lora_number | int (≥ 1) | 5 | Number of LoRA slots shown in the UI |
default_vae | string | "Default (model)" | VAE override; "Default (model)" uses the VAE baked into the checkpoint |
Generation Defaults
These keys set the initial values of controls in the main generation panel.| Key | Type | Default | Description |
|---|---|---|---|
default_performance | string | "Speed" | Startup performance mode ("Quality", "Speed", "Extreme Speed", "Lightning", "Hyper-SD") |
default_sampler | string | "dpmpp_2m_sde_gpu" | Default sampler |
default_scheduler | string | "karras" | Default noise scheduler |
default_cfg_scale | float | 7.0 | Guidance scale (CFG) |
default_sample_sharpness | float | 2.0 | SAG-based sharpness enhancement weight |
default_aspect_ratio | string | "1152*896" | Default output resolution in width*height format |
default_image_number | int (1–default_max_image_number) | 2 | Number of images generated per run |
default_max_image_number | int (≥ 1) | 32 | Maximum allowed image count in the UI |
default_prompt | string | "" | Pre-filled positive prompt |
default_prompt_negative | string | "" | Pre-filled negative prompt |
default_styles | list of strings | ["Fooocus V2", "Fooocus Enhance", "Fooocus Sharp"] | Style presets enabled at startup |
default_overwrite_step | int | -1 | Override sampling steps regardless of performance mode (-1 = follow mode) |
default_overwrite_switch | int | -1 | Override the refiner switch step (-1 = follow preset) |
default_clip_skip | int (1–12) | 2 | CLIP skip depth |
default_cfg_tsnr | float | 7.0 | CFG TSNR correction threshold (applied when CFG > 10) |
default_output_format | string | "png" | Output format: "png", "jpeg", or "webp" |
UI Defaults
| Key | Type | Default | Description |
|---|---|---|---|
default_advanced_checkbox | bool | false | Whether the Advanced panel is open on launch |
default_image_prompt_checkbox | bool | false | Whether the Image Prompt panel is open on launch |
default_enhance_checkbox | bool | false | Whether the Enhance panel is open on launch |
default_developer_debug_mode_checkbox | bool | false | Whether Developer Debug Mode is active on launch |
default_save_metadata_to_images | bool | false | Embed generation metadata into output images |
default_metadata_scheme | string | "fooocus" | Metadata format: "fooocus" (JSON) or "a1111" (plain text) |
metadata_created_by | string | "" | Optional author name embedded in image metadata |
default_black_out_nsfw | bool | false | Automatically black out images flagged by the safety checker |
temp_path_cleanup_on_launch | bool | true | Delete the temp folder at startup |
Download Settings
Fooocus can automatically download missing model files when a preset requires them. Specify files as a JSON object mappingfilename → URL.
| Key | Type | Description |
|---|---|---|
checkpoint_downloads | object | Checkpoint files to download if absent |
lora_downloads | object | LoRA files to download if absent |
embeddings_downloads | object | Embedding files to download if absent |
vae_downloads | object | VAE files to download if absent |
Full Example
The following is a representativeconfig.txt that overrides model paths to custom drives, changes the default model and sampler, and sets a negative prompt:
Environment Variable Overrides
Every config key can also be set as an environment variable. Environment variables take priority over values inconfig.txt. This is useful for containerized or scripted deployments where you want to avoid editing files.
Environment: key = value to the console for every key it picks up from the environment.
