StableDiffusionWebUI: Startup Arguments
Preface
sdwebui has many startup arguments. This article analyzes them one by one.
Startup Arguments
The argument parsing is located in modules/cmd_args.py
-f: Allow root user to start
—update-all-extensions: Update all extensions on startup
—skip-python-version-check: Skip Python version check
—skip-torch-cuda-test: Skip CUDA check. If you don’t have a GPU locally, you can skip this first. CUDA is a computing platform by NVIDIA.
—reinstall-xformers: Reinstall xformers. xformers is an attention mechanism that can optimize the image generation process.
—reinstall-torch: Reinstall torch. Torch is a machine learning library.
—update-check: Check for updates on startup
—test-server: Start in test environment
—log-startup: Print detailed log information on startup
—skip-prepare-environment: Skip all environment preparation steps, such as checking various environments
—skip-install: Skip all dependency installation steps
—dump-sysinfo: Export system information to local
—loglevel: Set log level
—do-not-download-clip: Do not download the default CLIP model
—data-dir: Set user data path
—config: Set configuration file path
—ckpt: Checkpoint model file path. If set, this model will be loaded automatically.
—ckpt-dir: Checkpoint model directory
—vae-dir: VAE directory
—gfpgan-dir: GFPGAN directory. Deprecated, use —gfpgan-models-path instead.
—gfpgan-model: GFPGAN model path. Deprecated, use —gfpgan-models-path instead.
—no-half: Do not convert models to 16-bit floats
—no-half-vae: Do not convert VAE to 16-bit floats
—no-progressbar-hiding: Do not hide the Gradio progress bar
—max-batch-count: Maximum batch count
—embeddings-dir: Embeddings directory
—textual-inversion-templates-dir: Textual inversion templates directory
—hypernetwork-dir: Hypernetwork directory
—localizations-dir: Localizations directory
—allow-code: Allow custom scripts to execute in the WebUI
—medvram: Sacrifice some image generation speed to reduce VRAM usage
—medvram-sdxl: Enable medvram option only for SDXL
—lowvram: Sacrifice significant image generation speed to reduce VRAM usage
—lowram: Sacrifice significant image generation speed to reduce RAM usage
—always-batch-cond-uncond: Does nothing?
—unload-gfpgan: Does nothing?
—precision: Set precision
—upcast-sampling: Upcast sampling mode, improves image generation efficiency and reduces VRAM usage
—share: Share the project externally
—ngrok: Ngrok authentication configuration for sharing
—ngrok-region: Same as above
—ngrok-options: Same as above
—enable-insecure-extension-access: Enable the Extensions tab
—codeformer-models-path: CodeFormer directory
—gfpgan-models-path: GFPGAN directory
—esrgan-models-path: ESRGAN directory
—bsrgan-models-path: BSRGAN directory
—realesrgan-models-path: Real-ESRGAN directory
—dat-models-path: DAT directory
—clip-models-path: CLIP directory
—xformers: Enable xformers
—force-enable-xformers: Force enable xformers
—xformers-flash-attention: Enable xformers with flash attention
—deepdanbooru: Does nothing?
—opt-split-attention: Use doggettx to optimize the image generation process
—opt-sub-quad-attention: Optimization related
—sub-quad-q-chunk-size: Optimization related
—sub-quad-kv-chunk-size: Optimization related
—sub-quad-chunk-threshold: Optimization related
—opt-split-attention-invokeai: Optimization related
—opt-split-attention-v1: Optimization related
—opt-sdp-attention: Optimization related
—opt-sdp-no-mem-attention: Optimization related
—disable-opt-split-attention: Optimization related
—disable-nan-check: Disable NaN check
—use-cpu: Use CPU mode
—use-ipex: Use Intel XPU mode
—disable-model-loading-ram-optimization: Disable model loading RAM optimization
—listen: By default, only requests from localhost are accepted. Adding this argument accepts all network requests.
—port: Set port number
—show-negative-prompt: Does nothing?
—ui-config-file: UI configuration file, defaults to ui-config.json
—hide-ui-dir-config: Hide UI directory configuration
—freeze-settings: Disable modification of all global settings
—freeze-settings-in-sections: Disable modification of a specific settings section
—freeze-specific-settings: Disable modification of specific settings
—ui-settings-file: UI settings file, defaults to config.json
—gradio-debug: Start Gradio in debug mode
—gradio-auth: Enable Gradio authentication
—gradio-auth-path: Gradio auth file path
—gradio-img2img-tool: Does nothing?
—gradio-inpaint-tool: Does nothing?
—gradio-allowed-path: Add files to Gradio’s accessible paths
—opt-channelslast: Change SD memory to channels last mode
—styles-file: Styles file, supports multiple files
—autolaunch: Automatically open in browser after startup
—theme: Dark or light mode
—use-textbox-seed: Use textbox to input seed
—disable-console-progressbars: Do not output progress in console
—enable-console-prompts: Does nothing?
—vae-path: VAE path
—disable-safe-unpickle: Disable the check for malicious code in models
—api: Also start in API mode
—api-auth: Enable API authentication
—api-log: Enable API log output
—nowebui: Do not start WebUI, only start API mode
—ui-debug-mode: Do not load models, for quickly starting the UI
—device-id: Specify CUDA device ID
—administrator: Start with admin privileges
—cors-allow-origins: Enable CORS
—cors-allow-origins-regex: Enable CORS with regex matching
—tls-keyfile: TLS key file
—tls-certfile: TLS certificate file
—disable-tls-verify: Disable TLS verification
—server-name: Server name
—gradio-queue: Does nothing?
—no-gradio-queue: Disable WebSocket requests, use HTTP polling instead
—skip-version-check: Skip version check, including torch and xformers
—no-hashing: Skip hash check to improve model loading speed
—no-download-sd-model: Do not download the default model
—subpath: Subpath
—add-stop-route: Does nothing?
—api-server-stop: Allow stopping and restarting the service via API
—timeout-keep-alive: Set timeout, defaults to 30s
—disable-all-extensions: Disable all extensions
—disable-extra-extensions: Disable all extensions except built-in ones
—skip-load-model-at-start: Do not load models on startup
—unix-filenames-sanitization: Allow Unix filenames
—filenames-max-length: Maximum filename length
—no-prompt-history: Do not record prompt history
SDWebUI
|—URL: https://sdwebui.ai/?from=vq
|—Authentic Stable Diffusion WebUI V1.10.1~
|—Top-tier 4090 GPU, premium members get exclusive single 4090 for image generation~
|—Supports Mac client, Windows client, and Web online usage~
|—Innovative instant model transfer, upload local models instantly~
|—Supports txt2img, img2img, extras, and image info
|—Supports CLIP interrogation and DeepBooru interrogation
|—Supports HD upscaling (Hires.fix), with 21 built-in upscaling models
|—Supports detail restoration (ADetailer), with 11 built-in restoration models
|—Supports ControlNet, with 44 built-in preprocessors and 68 built-in models
|—Supports ultra-HD upscaling (Tiled Diffusion, Demo Fusion, Tiled VAE)
|—Supports old photo restoration, with 21 built-in upscaling models, plus GFPGAN and CodeFormer restoration models
|—Built-in 2 common Styles, 11 popular Checkpoint models, 7 popular LoRA models, 14 common embeddings
|—Built-in oldsix prompt plugin
|—Built-in 23-lesson beginner tutorial