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 is launched via python entry_with_update.py with any combination of optional flags appended. The entry point is always entry_with_update.py — not webui.py directly. Flags let you override defaults for networking, hardware precision, VRAM management, preview behavior, UI language, logging, and more without editing any config file.
On Windows, the bundled launchers (run.bat, run_anime.bat, run_realistic.bat) wrap entry_with_update.py for you. You can edit those .bat files to append any flags listed here.
Networking
Control how and where the Fooocus web UI is exposed on your network.
| Flag | Argument | Default | Description |
|---|
--listen | [IP] | 127.0.0.1 | Expose the UI on a network interface. Omitting IP defaults to 0.0.0.0 (all interfaces). |
--port | PORT | 7865 | Port number the UI listens on. |
--share | — | off | Creates a temporary public endpoint at a .gradio.live URL via Gradio’s sharing service. |
--disable-header-check | [ORIGIN] | disabled | Disables the HTTP origin header check. Omitting ORIGIN allows all origins (*). |
--web-upload-size | WEB_UPLOAD_SIZE | 100 | Maximum upload size in MB for the web UI. |
Using --listen or --share exposes the UI beyond localhost. If you are on an untrusted network, always pair these flags with an auth.json file. See Authentication for details.
Environment & Paths
Override where Fooocus looks for models, stores outputs, and caches data.
| Flag | Argument | Default | Description |
|---|
--hf-mirror | HF_MIRROR | none | Mirror URL to use instead of huggingface.co for model downloads. |
--external-working-path | PATH [PATH ...] | none | One or more extra directories that Fooocus should scan for models. |
--output-path | OUTPUT_PATH | outputs/ | Directory where generated images and logs are saved. |
--temp-path | TEMP_PATH | system temp | Directory for temporary processing files. |
--cache-path | CACHE_PATH | none | Directory for caching downloaded assets. |
Browser
Control whether Fooocus opens a browser tab and which color theme the UI uses.
| Flag | Argument | Default | Description |
|---|
--in-browser | — | on | Automatically open the UI in the default browser at launch. |
--disable-in-browser | — | off | Prevent Fooocus from opening a browser tab automatically. |
--theme | THEME | system default | Launch the UI in light or dark theme. |
GPU & Hardware
Fine-tune how Fooocus allocates and manages GPU and CPU resources. These flags are mutually exclusive within their groups.
Device selection
| Flag | Argument | Description |
|---|
--gpu-device-id | DEVICE_ID | Select a specific GPU by its integer device ID (for multi-GPU systems). |
--directml | [DIRECTML_DEVICE] | Use DirectML for AMD GPU acceleration on Windows. Omitting the device ID uses the default device. |
--disable-ipex-hijack | — | Disable Intel IPEX hijacking of PyTorch ops. |
CUDA memory allocation
| Flag | Description |
|---|
--async-cuda-allocation | Enable asynchronous CUDA memory allocation. |
--disable-async-cuda-allocation | Disable asynchronous CUDA memory allocation. |
--disable-attention-upcast | Disable automatic attention upcasting (can affect stability on some hardware). |
Global precision
| Flag | Description |
|---|
--all-in-fp32 | Force all operations to 32-bit float. Higher precision, more VRAM. |
--all-in-fp16 | Force all operations to 16-bit float. Lower VRAM, faster on supported GPUs. |
UNet precision
| Flag | Description |
|---|
--unet-in-bf16 | Run the UNet in bfloat16. |
--unet-in-fp16 | Run the UNet in float16. |
--unet-in-fp8-e4m3fn | Run the UNet in FP8 (e4m3fn format). Lowest VRAM use. |
--unet-in-fp8-e5m2 | Run the UNet in FP8 (e5m2 format). |
VAE precision
| Flag | Description |
|---|
--vae-in-fp16 | Run the VAE in float16. |
--vae-in-fp32 | Run the VAE in float32. |
--vae-in-bf16 | Run the VAE in bfloat16. |
--vae-in-cpu | Offload VAE computation to the CPU. |
CLIP / text encoder precision
| Flag | Description |
|---|
--clip-in-fp8-e4m3fn | Run CLIP in FP8 (e4m3fn format). |
--clip-in-fp8-e5m2 | Run CLIP in FP8 (e5m2 format). |
--clip-in-fp16 | Run CLIP in float16. |
--clip-in-fp32 | Run CLIP in float32. |
VRAM management
These flags are mutually exclusive — pick only one.
| Flag | Argument | Description |
|---|
--always-gpu | — | Keep all models in GPU VRAM at all times. |
--always-high-vram | — | High VRAM mode; recommended for Colab T4 and similar environments. |
--always-normal-vram | — | Normal VRAM mode (default behavior). |
--always-low-vram | — | Low VRAM mode; aggressively offloads models. |
--always-no-vram | — | No VRAM mode; runs entirely from system RAM. |
--always-cpu | [CPU_NUM_THREADS] | Force all computation on CPU. Optionally set the number of threads. |
VRAM offloading
| Flag | Description |
|---|
--always-offload-from-vram | Always offload models from VRAM when they are not in use. |
--disable-offload-from-vram | Prevent offloading models from VRAM between uses. Some Mac M2 users need this to speed up loading. |
Flags such as --lowvram, --gpu-only, and --bf16 (from older tutorials) are not valid Fooocus flags and will not improve performance. If you have been using them, remove them — in most cases they make things worse and introduce new errors.
Attention
Override the attention implementation Fooocus uses. These flags are mutually exclusive.
| Flag | Description |
|---|
--attention-split | Use split attention (memory-efficient, slower). |
--attention-quad | Use quad attention. |
--attention-pytorch | Use PyTorch’s built-in attention. |
--disable-xformers | Disable xFormers even if it is installed. |
Preview
Control how in-progress generation previews are generated in the UI.
| Flag | Argument | Default | Description |
|---|
--preview-option | none | auto | fast | taesd | none | Set the latent preview method. auto picks the best available; fast uses a fast RGB decoder; taesd uses the TAESD decoder for higher-quality previews. |
Preset & UI
Manage which model preset loads and how the UI behaves.
| Flag | Argument | Description |
|---|
--preset | PRESET | Apply a named UI preset at launch (e.g., anime, realistic). |
--disable-preset-selection | — | Remove the preset switcher from the browser UI. |
--always-download-new-model | — | Automatically download missing models when switching presets instead of falling back to the previous model. |
--language | LANGUAGE | Load a UI translation JSON from the language/ folder (e.g., --language cn loads language/cn.json). |
--multi-user | — | Enable multi-user mode; each connected user gets an independent generation queue. |
--enable-auto-describe-image | — | Automatically generate a prompt description when an input image is provided and the prompt field is empty. |
--disable-enhance-output-sorting | — | Disable the default sorting of enhanced images in the final gallery. |
Control what Fooocus writes to disk and reports at runtime.
| Flag | Description |
|---|
--disable-server-log | Suppress server-side request logging to the terminal. |
--debug-mode | Enable verbose debug output. |
--is-windows-embedded-python | Signal that Fooocus is running inside the bundled Windows embedded Python environment. Automatically opens a browser tab on launch. |
--disable-server-info | Hide server info messages printed at startup. |
--disable-image-log | Prevent writing generated images and logs to the outputs folder. |
--disable-analytics | Disable Gradio’s built-in analytics reporting. |
--disable-metadata | Do not embed generation metadata into output images. |
--disable-preset-download | Prevent automatic model downloads when loading a preset. |
--pytorch-deterministic | Enable PyTorch deterministic mode for reproducible results (may reduce performance). |
--rebuild-hash-cache | Scan all models and LoRAs to regenerate missing hash cache entries. Accepts an optional CPU_NUM_THREADS integer. |