From the build directory, show the full list of command-line arguments:
Windows (PowerShell)
.\bin\Release\sd-cli.exe -hLinux/macOS
./bin/sd-cli -hSee sampling methods and schedulers for supported names, defaults, and custom sigma schedules.
Omitted inference options use the library defaults.
In particular, an omitted seed requests a random seed; use --seed 42 for a
repeatable run. Video generation defaults to 6 requested frames before model
alignment. SLG layers remain unset unless --skip-layers is supplied, and the
conditioning cache uses the library default. Zero and false are explicit inputs;
invalid values are reported rather than treated as omitted.
Logging defaults to info. Use --log-level <level> to select debug, verbose,
info, warn, or error (from most to least detailed). Each level includes
messages at that level and all less detailed levels. -v and --verbose are
equivalent to --log-level verbose. If repeated, the last logging option wins.
--flash-attn on|off|auto defaults to auto, selecting flash attention for each
compute backend during context creation. See Backend selection
for probing behavior.
Use module assignments such as --flash-attn auto,te=off,vae=on to override
individual modules.
--conv-direct on|off|auto also defaults to auto, enabling direct convolution
on backends with implicit GEMM implementations. Use --conv-direct auto,vae=off
for module overrides; supported modules are diffusion, vae, and controlnet.
See Direct convolution.
For direct image repair or automatic post-generation YOLOv8 detection followed by cropped inpainting, see ADetailer.
Use repeatable --image-preprocess rules to select resizing, cropping, padding,
and resampling separately for each image input. Add canny=true to any input
rule for edge detection. See
Image preprocessing for input selectors,
input defaults, downstream model processing, mask alignment, and examples.
Metadata mode inspects PNG, JPEG, WebP (including animated WebP), AVI, WebM, and Matroska
container metadata without loading any model. Use --image for both images and videos:
Windows (PowerShell)
.\bin\Release\sd-cli.exe -M metadata --image .\output.png
.\bin\Release\sd-cli.exe `
-M metadata `
--image .\output.jpg `
--metadata-format json
.\bin\Release\sd-cli.exe -M metadata --image .\output.webm
.\bin\Release\sd-cli.exe `
-M metadata `
--image .\output.avi `
--metadata-format json
.\bin\Release\sd-cli.exe `
-M metadata `
--image .\output.png `
--metadata-raw
.\bin\Release\sd-cli.exe `
-M metadata `
--image .\output.png `
--metadata-allLinux/macOS
./bin/sd-cli -M metadata --image ./output.png
./bin/sd-cli \
-M metadata \
--image ./output.jpg \
--metadata-format json
./bin/sd-cli -M metadata --image ./output.webm
./bin/sd-cli \
-M metadata \
--image ./output.avi \
--metadata-format json
./bin/sd-cli \
-M metadata \
--image ./output.png \
--metadata-raw
./bin/sd-cli \
-M metadata \
--image ./output.png \
--metadata-allFor completely black or white images or videos, NaNs, and the --linear-scale /
--attn-scale workaround, see Troubleshooting.
Generation outputs embed the core generation record.
Images retain the native JSON and an additional WebUI-compatible infotext.
--disable-image-metadata omits both from files.