0% found this document useful (0 votes)
83 views

Command Line Arguments and Settings · AUTOMATIC1111_stable-diffusion-webui Wiki · GitHub

The document provides a comprehensive list of command line arguments and settings for the AUTOMATIC1111/stable-diffusion-webui, detailing their values, defaults, and descriptions. It covers various categories including configuration, performance, and features, allowing users to customize their experience. Each argument is clearly defined, enabling users to understand how to modify the web UI and its functionalities effectively.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
83 views

Command Line Arguments and Settings · AUTOMATIC1111_stable-diffusion-webui Wiki · GitHub

The document provides a comprehensive list of command line arguments and settings for the AUTOMATIC1111/stable-diffusion-webui, detailing their values, defaults, and descriptions. It covers various categories including configuration, performance, and features, allowing users to customize their experience. Each argument is clearly defined, enabling users to understand how to modify the web UI and its functionalities effectively.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

10/03/2025, 19:49 Command Line Arguments and Settings · AUTOMATIC1111/stable-diffusion-webui Wiki · GitHub

All command line arguments


Argument
Value Default Description
Command

CONFIGURATION

-h, --help None False Show this help message and exit.

--exit Terminate after installation

--data-dir DATA_DIR ./ base path where all user data is stored

--models-dir MODELS None base path where models are stored; overrides --data-dir

configs/stable-diffusion/v1-
--config CONFIG Path to config which constructs model.
inference.yaml

Path to checkpoint of Stable Diffusion model; if specified,


--ckpt CKPT model.ckpt this checkpoint will be added to the list of checkpoints and
loaded.

--ckpt-dir CKPT_DIR None Path to directory with Stable Diffusion checkpoints.

--no-download-sd-
None False Don't download SD1.5 model even if no model is found.
model

--do-not-download- do not download CLIP model even if it's not included in the
None False
clip checkpoint

--vae-dir VAE_PATH None Path to Variational Autoencoders model

--vae-path VAE_PATH None Checkpoint to use as VAE; setting this argument

--gfpgan-dir GFPGAN_DIR GFPGAN/ GFPGAN directory.

--gfpgan-model GFPGAN_MODEL GFPGAN model file name.

--codeformer-
CODEFORMER_MODELS_PATH models/Codeformer/ Path to directory with codeformer model file(s).
models-path

--gfpgan-models-
GFPGAN_MODELS_PATH models/GFPGAN Path to directory with GFPGAN model file(s).
path

--esrgan-models-
ESRGAN_MODELS_PATH models/ESRGAN Path to directory with ESRGAN model file(s).
path

--bsrgan-models-
BSRGAN_MODELS_PATH models/BSRGAN Path to directory with BSRGAN model file(s).
path

--realesrgan-
REALESRGAN_MODELS_PATH models/RealESRGAN Path to directory with RealESRGAN model file(s).
models-path

--scunet-models-
SCUNET_MODELS_PATH models/ScuNET Path to directory with ScuNET model file(s).
path

--swinir-models-
SWINIR_MODELS_PATH models/SwinIR Path to directory with SwinIR and SwinIR v2 model file(s).
path

--ldsr-models-path LDSR_MODELS_PATH models/LDSR Path to directory with LDSR model file(s).

--dat-models-path DAT__MODELS_PATH models/DAT Path to directory with DAT model file(s).

--lora-dir LORA_DIR models/Lora Path to directory with Lora networks.

--clip-models-path CLIP_MODELS_PATH None Path to directory with CLIP model file(s).

Embeddings directory for textual inversion (default:


--embeddings-dir EMBEDDINGS_DIR embeddings/
embeddings).

--textual-inversion-
TEXTUAL_INVERSION_TEMPLATES_DIR textual_inversion_templates Directory with textual inversion templates.
templates-dir

--hypernetwork-dir HYPERNETWORK_DIR models/hypernetworks/ hypernetwork directory.

--localizations-dir LOCALIZATIONS_DIR localizations/ Localizations directory.

--styles-file STYLES_FILE styles.csv Path or wildcard path of styles files, allow multiple entries.

--ui-config-file UI_CONFIG_FILE ui-config.json Filename to use for UI configuration.

Do not hide progress bar in gradio UI (we hide it because it


--no-progressbar-
None False slows down ML if you have hardware acceleration in
hiding
browser).

--ui-settings-file UI_SETTINGS_FILE config.json Filename to use for UI settings.

--allow-code None False Allow custom script execution from web UI.

Use share=True for gradio and make the UI accessible


--share None False
through their site.

Launch gradio with 0.0.0.0 as server name, allowing to


--listen None False
respond to network requests.

Launch gradio with given server port, you need root/admin


--port PORT 7860
rights for ports < 1024; defaults to 7860 if available.

https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Command-Line-Arguments-and-Settings#all-command-line-arguments 1/4
10/03/2025, 19:49 Command Line Arguments and Settings · AUTOMATIC1111/stable-diffusion-webui Wiki · GitHub

Argument
Value Default Description
Command

--hide-ui-dir-config None False Hide directory configuration from web UI.

--freeze-settings None False disable editing of all settings globally

disable editing settings in specific sections of the settings


--freeze-settings-in- page by specifying a comma-delimited list such like
None False
sections "saving-images,upscaling". The list of setting names can be
found in the modules/shared_options.py file

disable editing of individual settings by specifying a


--freeze-specific-
None False comma-delimited list like "samples_save,samples_format".
settings
The list of setting names can be found in the config.json file

--enable-insecure-
None False Enable extensions tab regardless of other options.
extension-access

--gradio-debug None False Launch gradio with --debug option.

Set gradio authentication like username:password ; or


--gradio-auth GRADIO_AUTH None
comma-delimit multiple like u1:p1,u2:p2,u3:p3 .

Set gradio authentication file path


--gradio-auth-path GRADIO_AUTH_PATH None ex. /path/to/auth/file same auth format as --gradio-
auth .

--disable-console-
None False Do not output progress bars to console.
progressbars

--enable-console- Print prompts to console when generating with txt2img


None False
prompts and img2img.

--api None False Launch web UI with API.

Set authentication for API like username:password ; or


--api-auth API_AUTH None
comma-delimit multiple like u1:p1,u2:p2,u3:p3 .

--api-log None False Enable logging of all API requests.

--nowebui None False Only launch the API, without the UI.

--ui-debug-mode None False Don't load model to quickly launch UI.

Select the default CUDA device to use


--device-id DEVICE_ID None (export CUDA_VISIBLE_DEVICES=0,1 etc might be needed
before).

--administrator None False Administrator privileges.

Allowed CORS origin(s) in the form of a comma-separated


--cors-allow-origins CORS_ALLOW_ORIGINS None
list (no spaces).

--cors-allow-origins- Allowed CORS origin(s) in the form of a single regular


CORS_ALLOW_ORIGINS_REGEX None
regex expression.

Partially enables TLS, requires --tls-certfile to fully


--tls-keyfile TLS_KEYFILE None
function.

Partially enables TLS, requires --tls-keyfile to fully


--tls-certfile TLS_CERTFILE None
function.

--disable-tls-verify None False When passed, enables the use of self-signed certificates.

customize the subpath for


--subpath SERVER_SUB_PATH
gradio, use with reverse proxy

--server-name SERVER_NAME None Sets hostname of server.

Disables gradio queue; causes the webpage to use http


--no-gradio-queue None False requests instead of websockets; was the default in earlier
versions.

--gradio-allowed- Add path to Gradio's allowed_paths ; make it possible to


None None
path serve files from it.

Disable SHA-256 hashing of checkpoints to help loading


--no-hashing None False
performance.

--skip-version-check None False Do not check versions of torch and xformers.

--skip-python-
None False Do not check versions of Python.
version-check

--skip-torch-cuda-
None False Do not check if CUDA is able to work properly.
test

--skip-install None False Skip installation of packages.

log level; one of: CRITICAL, ERROR, WARNING, INFO,


--loglevel None None
DEBUG

launch.py argument: print a detailed log of what's


--log-startup None False
happening at startup

--api-server-stop None False enable server stop/restart/kill via api

https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Command-Line-Arguments-and-Settings#all-command-line-arguments 2/4
10/03/2025, 19:49 Command Line Arguments and Settings · AUTOMATIC1111/stable-diffusion-webui Wiki · GitHub

Argument
Value Default Description
Command

--timeout-keep-
int 30 set timeout_keep_alive for uvicorn
alive

PERFORMANCE

--xformers None False Enable xformers for cross attention layers.

Enable xformers for cross attention layers regardless of


--force-enable-
None False whether the checking code thinks you can run it; do not
xformers
make bug reports if this fails to work.

--xformers-flash- Enable xformers with Flash Attention to improve


None False
attention reproducibility (supported for SD2.x or variant only).

Enable scaled dot product cross-attention layer


--opt-sdp-attention None False
optimization; requires PyTorch 2.*

Enable scaled dot product cross-attention layer


--opt-sdp-no-mem-
False None optimization without memory efficient attention, makes
attention
image generation deterministic; requires PyTorch 2.*

Force-enables Doggettx's cross-attention layer


--opt-split-attention None False
optimization. By default, it's on for CUDA-enabled systems.

--opt-split- Force-enables InvokeAI's cross-attention layer optimization.


None False
attention-invokeai By default, it's on when CUDA is unavailable.

--opt-split- Enable older version of split attention optimization that


None False
attention-v1 does not consume all VRAM available.

--opt-sub-quad- Enable memory efficient sub-quadratic cross-attention


None False
attention layer optimization.

--sub-quad-q- Query chunk size for the sub-quadratic cross-attention


SUB_QUAD_Q_CHUNK_SIZE 1024
chunk-size layer optimization to use.

--sub-quad-kv- KV chunk size for the sub-quadratic cross-attention layer


SUB_QUAD_KV_CHUNK_SIZE None
chunk-size optimization to use.

--sub-quad-chunk- The percentage of VRAM threshold for the sub-quadratic


SUB_QUAD_CHUNK_THRESHOLD None
threshold cross-attention layer optimization to use chunking.

Enable alternative layout for 4d tensors, may result in faster


--opt-channelslast None False inference only on Nvidia cards with Tensor cores (16xx and
higher).

--disable-opt-split-
None False Force-disables cross-attention layer optimization.
attention

Do not check if produced images/latent spaces have nans;


--disable-nan-check None False
useful for running without a checkpoint in CI.

{all, sd, interrogate, gfpgan, bsrgan,


--use-cpu None Use CPU as torch device for specified modules.
esrgan, scunet, codeformer}

--use-ipex None False Use Intel XPU as torch device

--no-half None False Do not switch the model to 16-bit floats.

--precision {full, half, autocast} autocast Evaluate at this precision.

--no-half-vae None False Do not switch the VAE model to 16-bit floats.

Upcast sampling. No effect with --no-half . Usually


--upcast-sampling None False produces similar results to --no-half with better
performance while using less memory.

Enable Stable Diffusion model optimizations for sacrificing


--medvram None False
a some performance for low VRAM usage.

--medvram-sdxl None False enable --medvram optimization just for SDXL models

Enable Stable Diffusion model optimizations for sacrificing


--lowvram None False
a lot of speed for very low VRAM usage.

Load Stable Diffusion checkpoint weights to VRAM instead


--lowram None False
of RAM.

--disable-model-
disable an optimization that reduces RAM use when
loading-ram- None False
loading a model
optimization

FEATURES

Open the web UI URL in the system's default browser upon


--autolaunch None False
launch.

Open the web UI with the specified theme


--theme None Unset ( light or dark ). If not specified, uses the default browser
theme.

Use textbox for seeds in UI (no up/down, but possible to


--use-textbox-seed None False
input long seeds).

https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Command-Line-Arguments-and-Settings#all-command-line-arguments 3/4
10/03/2025, 19:49 Command Line Arguments and Settings · AUTOMATIC1111/stable-diffusion-webui Wiki · GitHub

Argument
Value Default Description
Command

--disable-safe-
None False Disable checking PyTorch models for malicious code.
unpickle

--ngrok NGROK None ngrok authtoken, alternative to gradio --share .

--ngrok-region NGROK_REGION us The region in which ngrok should start.

The options to pass to ngrok in JSON format,


e.g.: {"authtoken_from_env":true,
--ngrok-options NGROK_OPTIONS None "basic_auth":"user:password",
"oauth_provider":"google",
"oauth_allow_emails":"[email protected]"}

On startup, notifies whether or not your web UI version


--update-check None None
(commit) is up-to-date with the current master branch.

--update-all- On startup, it pulls the latest updates for all extensions you
None None
extensions have installed.

Force-reinstall xformers. Useful for upgrading - but remove


--reinstall-xformers None False
it after upgrading or you'll reinstall xformers perpetually.

Force-reinstall torch. Useful for upgrading - but remove it


--reinstall-torch None False
after upgrading or you'll reinstall torch perpetually.

Run test to validate web UI functionality, see wiki topic for


--tests TESTS False
more details.

--no-tests None False Do not run tests even if --tests option is specified.

launch.py argument: dump limited sysinfo file (without


--dump-sysinfo None False
information about extensions, options) to disk and quit

--disable-all-
None False disable all non-built-in extensions from running
extensions

--disable-extra-
None False disable all extensions from running
extensions

--skip-load-model- if load a model at web start, only take effect when --


None False
at-start nowebui

--unix-filenames- allow any symbols except '/' in filenames. May conflict with
None False
sanitization your browser and file system

maximal length of filenames of saved images, longer


--filenames-max-
int 128 filenames will be truncated. if overridden it can potentially
length
cause issues with the file system

disable read prompt from last generation feature;


--no-prompt-history None False
disables --data-path/params.txt

DEFUNCT OPTIONS

--show-negative-
None False No longer has an effect.
prompt

--deepdanbooru None False No longer has an effect.

--unload-gfpgan None False No longer has an effect.

--gradio-img2img-
GRADIO_IMG2IMG_TOOL None No longer has an effect.
tool

--gradio-inpaint-
GRADIO_INPAINT_TOOL None No longer has an effect.
tool

--gradio-queue None False No longer has an effect.

--add-stop-route None False No longer has an effect.

--always-batch- No longer has an effect, move into UI under Setting >


None False
cond-uncond Optimizations

No longer has an effect. moved to ui-


--max-batch-count MAX_BATCH_COUNT 16 config.json txt2img/Batch count/maximum img2img/Batch
count/maximum User-Interface-Customizations

https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Command-Line-Arguments-and-Settings#all-command-line-arguments 4/4

You might also like