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.

On the very first launch, Fooocus writes a 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

1

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.
2

Edit values

Change the values you need, following the JSON format rules described below. Save the file when done.
3

Restart Fooocus

Fooocus reads config.txt at startup. Restart the application for changes to take effect.
4

Resetting to defaults

If something breaks, simply delete config.txt. Fooocus will regenerate it with default values on the next launch.

Path Settings

These keys tell Fooocus where to find (or place) its various model assets. All values must be absolute paths.
On Windows, use \\\\ (double backslash) as the path separator inside JSON strings, not a single \. For example: "D:\\\\Fooocus\\\\models\\\\checkpoints".
KeyDefault LocationDescription
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_expansionGPT-2 prompt expansion model
path_outputs../outputs/Directory where generated images are saved
path_wildcards../wildcards/Wildcard .txt files for inline prompt substitution
Both path_checkpoints and path_loras accept a list of directories, allowing you to point Fooocus at multiple locations simultaneously:
{
    "path_checkpoints": ["D:\\\\MyModels\\\\checkpoints", "E:\\\\SharedModels"],
    "path_loras": ["D:\\\\MyModels\\\\loras"]
}

Default Model Settings

KeyTypeDefaultDescription
default_modelstring"juggernautXL_v8Rundiffusion.safetensors"Base checkpoint loaded at startup
default_refinerstring"None"Refiner checkpoint ("None" to disable)
default_refiner_switchfloat (0–1)0.5Sampling step at which to swap to the refiner
previous_default_modelslist of strings[]Fallback model names checked when the primary model file is not found
default_loraslist of [bool, string, float]5 disabled LoRAsActive LoRA slots. Each entry is [enabled, filename, weight]
default_loras_min_weightfloat (-10–10)-2Minimum allowed LoRA weight in the UI
default_loras_max_weightfloat (-10–10)2Maximum allowed LoRA weight in the UI
default_max_lora_numberint (≥ 1)5Number of LoRA slots shown in the UI
default_vaestring"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.
KeyTypeDefaultDescription
default_performancestring"Speed"Startup performance mode ("Quality", "Speed", "Extreme Speed", "Lightning", "Hyper-SD")
default_samplerstring"dpmpp_2m_sde_gpu"Default sampler
default_schedulerstring"karras"Default noise scheduler
default_cfg_scalefloat7.0Guidance scale (CFG)
default_sample_sharpnessfloat2.0SAG-based sharpness enhancement weight
default_aspect_ratiostring"1152*896"Default output resolution in width*height format
default_image_numberint (1–default_max_image_number)2Number of images generated per run
default_max_image_numberint (≥ 1)32Maximum allowed image count in the UI
default_promptstring""Pre-filled positive prompt
default_prompt_negativestring""Pre-filled negative prompt
default_styleslist of strings["Fooocus V2", "Fooocus Enhance", "Fooocus Sharp"]Style presets enabled at startup
default_overwrite_stepint-1Override sampling steps regardless of performance mode (-1 = follow mode)
default_overwrite_switchint-1Override the refiner switch step (-1 = follow preset)
default_clip_skipint (1–12)2CLIP skip depth
default_cfg_tsnrfloat7.0CFG TSNR correction threshold (applied when CFG > 10)
default_output_formatstring"png"Output format: "png", "jpeg", or "webp"

UI Defaults

KeyTypeDefaultDescription
default_advanced_checkboxboolfalseWhether the Advanced panel is open on launch
default_image_prompt_checkboxboolfalseWhether the Image Prompt panel is open on launch
default_enhance_checkboxboolfalseWhether the Enhance panel is open on launch
default_developer_debug_mode_checkboxboolfalseWhether Developer Debug Mode is active on launch
default_save_metadata_to_imagesboolfalseEmbed generation metadata into output images
default_metadata_schemestring"fooocus"Metadata format: "fooocus" (JSON) or "a1111" (plain text)
metadata_created_bystring""Optional author name embedded in image metadata
default_black_out_nsfwboolfalseAutomatically black out images flagged by the safety checker
temp_path_cleanup_on_launchbooltrueDelete 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 mapping filename → URL.
KeyTypeDescription
checkpoint_downloadsobjectCheckpoint files to download if absent
lora_downloadsobjectLoRA files to download if absent
embeddings_downloadsobjectEmbedding files to download if absent
vae_downloadsobjectVAE files to download if absent

Full Example

The following is a representative config.txt that overrides model paths to custom drives, changes the default model and sampler, and sets a negative prompt:
{
    "path_checkpoints": "D:\\\\Fooocus\\\\models\\\\checkpoints",
    "path_loras": "D:\\\\Fooocus\\\\models\\\\loras",
    "path_embeddings": "D:\\\\Fooocus\\\\models\\\\embeddings",
    "path_vae_approx": "D:\\\\Fooocus\\\\models\\\\vae_approx",
    "path_upscale_models": "D:\\\\Fooocus\\\\models\\\\upscale_models",
    "path_inpaint": "D:\\\\Fooocus\\\\models\\\\inpaint",
    "path_controlnet": "D:\\\\Fooocus\\\\models\\\\controlnet",
    "path_clip_vision": "D:\\\\Fooocus\\\\models\\\\clip_vision",
    "path_fooocus_expansion": "D:\\\\Fooocus\\\\models\\\\prompt_expansion\\\\fooocus_expansion",
    "path_outputs": "D:\\\\Fooocus\\\\outputs",
    "default_model": "realisticStockPhoto_v20.safetensors",
    "default_refiner": "None",
    "default_loras": [[true, "lora_filename_1.safetensors", 0.5], [true, "lora_filename_2.safetensors", 0.5]],
    "default_cfg_scale": 3.0,
    "default_sampler": "dpmpp_2m",
    "default_scheduler": "karras",
    "default_prompt_negative": "low quality",
    "default_prompt": "",
    "default_styles": [
        "Fooocus V2",
        "Fooocus Photograph",
        "Fooocus Negative"
    ]
}

Environment Variable Overrides

Every config key can also be set as an environment variable. Environment variables take priority over values in config.txt. This is useful for containerized or scripted deployments where you want to avoid editing files.
# Override the output path at launch time
path_outputs=/mnt/storage/fooocus-outputs python entry_with_update.py
Fooocus will print Environment: key = value to the console for every key it picks up from the environment.
If you are running Fooocus in Docker or a cloud environment, environment variable overrides are the cleanest way to inject per-instance configuration without baking paths into a shared config.txt.

Build docs developers (and LLMs) love