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.

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.
FlagArgumentDefaultDescription
--listen[IP]127.0.0.1Expose the UI on a network interface. Omitting IP defaults to 0.0.0.0 (all interfaces).
--portPORT7865Port number the UI listens on.
--shareoffCreates a temporary public endpoint at a .gradio.live URL via Gradio’s sharing service.
--disable-header-check[ORIGIN]disabledDisables the HTTP origin header check. Omitting ORIGIN allows all origins (*).
--web-upload-sizeWEB_UPLOAD_SIZE100Maximum 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.
FlagArgumentDefaultDescription
--hf-mirrorHF_MIRRORnoneMirror URL to use instead of huggingface.co for model downloads.
--external-working-pathPATH [PATH ...]noneOne or more extra directories that Fooocus should scan for models.
--output-pathOUTPUT_PATHoutputs/Directory where generated images and logs are saved.
--temp-pathTEMP_PATHsystem tempDirectory for temporary processing files.
--cache-pathCACHE_PATHnoneDirectory for caching downloaded assets.

Browser

Control whether Fooocus opens a browser tab and which color theme the UI uses.
FlagArgumentDefaultDescription
--in-browseronAutomatically open the UI in the default browser at launch.
--disable-in-browseroffPrevent Fooocus from opening a browser tab automatically.
--themeTHEMEsystem defaultLaunch 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

FlagArgumentDescription
--gpu-device-idDEVICE_IDSelect 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-hijackDisable Intel IPEX hijacking of PyTorch ops.

CUDA memory allocation

FlagDescription
--async-cuda-allocationEnable asynchronous CUDA memory allocation.
--disable-async-cuda-allocationDisable asynchronous CUDA memory allocation.
--disable-attention-upcastDisable automatic attention upcasting (can affect stability on some hardware).

Global precision

FlagDescription
--all-in-fp32Force all operations to 32-bit float. Higher precision, more VRAM.
--all-in-fp16Force all operations to 16-bit float. Lower VRAM, faster on supported GPUs.

UNet precision

FlagDescription
--unet-in-bf16Run the UNet in bfloat16.
--unet-in-fp16Run the UNet in float16.
--unet-in-fp8-e4m3fnRun the UNet in FP8 (e4m3fn format). Lowest VRAM use.
--unet-in-fp8-e5m2Run the UNet in FP8 (e5m2 format).

VAE precision

FlagDescription
--vae-in-fp16Run the VAE in float16.
--vae-in-fp32Run the VAE in float32.
--vae-in-bf16Run the VAE in bfloat16.
--vae-in-cpuOffload VAE computation to the CPU.

CLIP / text encoder precision

FlagDescription
--clip-in-fp8-e4m3fnRun CLIP in FP8 (e4m3fn format).
--clip-in-fp8-e5m2Run CLIP in FP8 (e5m2 format).
--clip-in-fp16Run CLIP in float16.
--clip-in-fp32Run CLIP in float32.

VRAM management

These flags are mutually exclusive — pick only one.
FlagArgumentDescription
--always-gpuKeep all models in GPU VRAM at all times.
--always-high-vramHigh VRAM mode; recommended for Colab T4 and similar environments.
--always-normal-vramNormal VRAM mode (default behavior).
--always-low-vramLow VRAM mode; aggressively offloads models.
--always-no-vramNo 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

FlagDescription
--always-offload-from-vramAlways offload models from VRAM when they are not in use.
--disable-offload-from-vramPrevent 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.
FlagDescription
--attention-splitUse split attention (memory-efficient, slower).
--attention-quadUse quad attention.
--attention-pytorchUse PyTorch’s built-in attention.
--disable-xformersDisable xFormers even if it is installed.

Preview

Control how in-progress generation previews are generated in the UI.
FlagArgumentDefaultDescription
--preview-optionnone | auto | fast | taesdnoneSet 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.
FlagArgumentDescription
--presetPRESETApply a named UI preset at launch (e.g., anime, realistic).
--disable-preset-selectionRemove the preset switcher from the browser UI.
--always-download-new-modelAutomatically download missing models when switching presets instead of falling back to the previous model.
--languageLANGUAGELoad a UI translation JSON from the language/ folder (e.g., --language cn loads language/cn.json).
--multi-userEnable multi-user mode; each connected user gets an independent generation queue.
--enable-auto-describe-imageAutomatically generate a prompt description when an input image is provided and the prompt field is empty.
--disable-enhance-output-sortingDisable the default sorting of enhanced images in the final gallery.

Logging & Metadata

Control what Fooocus writes to disk and reports at runtime.
FlagDescription
--disable-server-logSuppress server-side request logging to the terminal.
--debug-modeEnable verbose debug output.
--is-windows-embedded-pythonSignal that Fooocus is running inside the bundled Windows embedded Python environment. Automatically opens a browser tab on launch.
--disable-server-infoHide server info messages printed at startup.
--disable-image-logPrevent writing generated images and logs to the outputs folder.
--disable-analyticsDisable Gradio’s built-in analytics reporting.
--disable-metadataDo not embed generation metadata into output images.
--disable-preset-downloadPrevent automatic model downloads when loading a preset.
--pytorch-deterministicEnable PyTorch deterministic mode for reproducible results (may reduce performance).
--rebuild-hash-cacheScan all models and LoRAs to regenerate missing hash cache entries. Accepts an optional CPU_NUM_THREADS integer.

Build docs developers (and LLMs) love