Fooocus Documentation

Complete technical documentation for Fooocus. This guide covers all aspects of installation, configuration, usage, and advanced features.

System Requirements

Minimum Requirements

  • OS: Windows 10/11, macOS 10.15+, or Linux
  • Python: 3.10 or higher
  • RAM: 8GB minimum
  • Storage: 10GB free space
  • GPU: Optional (CPU mode available)

Recommended Requirements

  • OS: Windows 11, macOS 12+, or modern Linux
  • Python: 3.11 or higher
  • RAM: 16GB or more
  • Storage: 20GB+ free space (for models)
  • GPU: NVIDIA GPU with 8GB+ VRAM, CUDA support

GPU Requirements

For GPU acceleration:

  • NVIDIA GPU: With CUDA support
  • CUDA Toolkit: 11.8 or higher
  • cuDNN Library: Required for optimal performance
  • VRAM: 8GB+ recommended for SDXL models

Installation

Windows

Windows installation is straightforward with the embedded Python package:

  1. Download the Windows package
  2. Extract to desired location
  3. Run run.bat

See Getting Started for detailed instructions.

macOS

macOS installation requires Python:

# Install dependencies
pip install -r requirements.txt

# Run Fooocus
python entry_with_update.py

Linux

Linux installation:

# Install system dependencies
sudo apt-get install python3 python3-pip

# Install Python dependencies
pip install -r requirements.txt

# Run Fooocus
python entry_with_update.py

Command-Line Options

Fooocus supports various command-line options for customization:

Option Description Example
--port Set web server port --port 7860
--listen Listen on all interfaces --listen
--share Create public Gradio link --share
--always-low-vram Force low VRAM mode --always-low-vram
--always-offload-from-vram Offload models when idle --always-offload-from-vram
--preset Load preset config --preset anime
--language Set UI language --language en
--theme Set UI theme --theme dark

Configuration Files

Fooocus uses configuration files for customization. The main config file is config.txt.

Config File Structure

# Model paths
base_model_path = models/checkpoints/
lora_path = models/loras/

# Default parameters
default_steps = 30
default_cfg_scale = 7.0

# Output settings
output_path = outputs/
output_format = png

Common Configuration Options

See Customization Guide for detailed configuration options.

Directory Structure

Understanding Fooocus directory structure:

Fooocus/
├── models/
│   ├── checkpoints/      # Base models (SDXL)
│   ├── loras/            # LoRA files
│   ├── vae/              # VAE models
│   └── upscale/          # Upscaling models
├── wildcards/            # Wildcard text files
├── outputs/              # Generated images
├── config.txt            # Configuration file
├── entry_with_update.py  # Main entry point
└── requirements.txt      # Python dependencies

Model Management

Supported Model Formats

Model Download

Fooocus automatically downloads required models on first launch. You can also:

Model Sources

Wildcards Documentation

Wildcards are defined in text files in the wildcards directory.

Wildcard File Format

# This is a comment
option1
option2
option3

Using Wildcards

Reference wildcards in prompts: __wildcard_name__

Example: wildcards/color.txt contains:

red
blue
green

Use in prompt: A __color__ flower

See Advanced Features for more wildcard techniques.

API Reference

Fooocus provides a web API for programmatic access:

Endpoints

Generate Endpoint

POST /api/generate
{
  "prompt": "your prompt here",
  "negative_prompt": "negative elements",
  "steps": 30,
  "cfg_scale": 7.0,
  "seed": -1
}

Internationalization

Fooocus supports multiple languages through JSON translation files.

Translation File Format

Translation files are located in translations/ directory:

translations/
├── en.json    # English
├── es.json    # Spanish
├── fr.json    # French
└── ...

Creating Translations

Translation files use JSON format:

{
  "ui.prompt": "Prompt",
  "ui.generate": "Generate",
  "ui.settings": "Settings"
}

Using Translations

Set language via command line: --language es

Or configure in config.txt: language = es

Troubleshooting

Common Issues

Model Download Fails

Out of Memory

Slow Performance

Performance Tuning

Memory Optimization

Speed Optimization

Related Resources

Getting Started

Beginner-friendly installation and setup guide.

Get Started →

Advanced Features

Expert techniques and power user features.

Advanced Guide →

Customization

Learn how to customize Fooocus configuration.

Customize →