Customizing Fooocus

Fooocus is highly customizable through configuration files, presets, and command-line options. This guide covers all customization options to tailor Fooocus to your specific needs and workflow.

Configuration Files

The main configuration file is config.txt, located in the Fooocus root directory. This file allows you to set default values and customize behavior.

Basic Configuration Structure

# Model Paths
base_model_path = models/checkpoints/
lora_path = models/loras/
vae_path = models/vae/

# Default Parameters
default_steps = 30
default_cfg_scale = 7.0
default_sampler = dpmpp_2m_sde_gpu

# Output Settings
output_path = outputs/
output_format = png
output_quality = 95

# Performance Settings
always_low_vram = false
always_offload_from_vram = false

Model Path Configuration

Customize where Fooocus looks for models:

Default Parameters

Set default values that will be used when Fooocus starts:

Generation Parameters

Parameter Description Default
default_steps Number of sampling steps 30
default_cfg_scale CFG scale for prompt adherence 7.0
default_sampler Sampling method dpmpp_2m_sde_gpu
default_aspect_ratio Default image aspect ratio 1152*896
default_style Default style preset auto

Quality Settings

Style Presets

Create and customize style presets for consistent image generation:

Built-in Styles

Fooocus includes several built-in styles:

Creating Custom Styles

Define custom styles in your configuration:

# Custom Style Definition
style_custom_name = {
    "prompt": "your style prompt here",
    "negative": "unwanted elements",
    "steps": 30,
    "cfg_scale": 7.0
}

Style Files

Styles can also be defined in separate files in the styles/ directory for better organization.

LoRA Presets

Create LoRA presets for quick application of common LoRA combinations:

Defining LoRA Presets

# LoRA Preset
lora_preset_anime = {
    "loras": [
        {"name": "anime_style", "strength": 1.0},
        {"name": "character_lora", "strength": 0.8}
    ]
}

Using Presets

Apply presets via UI dropdown or command line: --preset anime

Default Prompts

Set default positive and negative prompts that will be used automatically:

Default Positive Prompt

default_positive_prompt = "high quality, detailed, professional"

Default Negative Prompt

default_negative_prompt = "blurry, low quality, artifacts, watermark"

Prompt Templates

Create prompt templates for common use cases:

template_photography = "photorealistic, {subject}, professional photography, 8k, sharp focus"
template_anime = "anime style, {subject}, high quality, detailed"

Output Configuration

Customize how and where Fooocus saves generated images:

Output Settings

Filename Templates

Customize output filenames:

filename_template = "{seed}_{steps}_{cfg_scale}"

Available variables: {seed}, {steps}, {cfg_scale}, {timestamp}

Performance Customization

Optimize Fooocus performance for your hardware:

Memory Settings

Speed Settings

UI Customization

Customize the user interface appearance and behavior:

Theme Settings

Layout Settings

Wildcard Customization

Organize and customize wildcard files:

Wildcard Directory Structure

wildcards/
├── colors/
│   ├── basic.txt
│   └── extended.txt
├── styles/
│   ├── art.txt
│   └── photography.txt
└── subjects/
    ├── animals.txt
    └── objects.txt

Creating Wildcard Files

Create text files with one option per line:

# wildcards/colors/basic.txt
red
blue
green
yellow
orange
purple

Use in prompts: __colors/basic__ flower

Command-Line Presets

Create batch files or scripts for common configurations:

Windows Batch Files

@echo off
REM run_anime.bat
python entry_with_update.py --preset anime --always-low-vram

Linux/macOS Scripts

#!/bin/bash
# run_realistic.sh
python entry_with_update.py --preset realistic --port 7860

Advanced Customization

For advanced users, Fooocus supports deeper customization:

Custom Models

API Customization

Workflow Automation

Configuration Examples

Example configurations for common use cases:

High Quality Configuration

default_steps = 50
default_cfg_scale = 7.0
default_quality = extreme
enable_refiner = true
refiner_switch = 0.8

Fast Generation Configuration

default_steps = 20
default_cfg_scale = 5.0
default_quality = speed
enable_refiner = false

Low VRAM Configuration

always_low_vram = true
always_offload_from_vram = true
max_vram_usage = 4096
cpu_offload = true

Best Practices

Configuration Tips

  • Backup your config files before making changes
  • Test changes incrementally
  • Document custom configurations
  • Share useful presets with the community
  • Keep config files organized and commented

Related Resources

Documentation

Complete technical reference for all options.

Read Docs →

Advanced Features

Learn about advanced features you can customize.

Advanced Guide →

Community

Share and discover custom configurations.

Join Community →