Skip to content

Command line options

hlky edited this page Aug 28, 2022 · 3 revisions

Setting command line options

Edit scripts/relauncher.py python scripts/webui.py becomes python scripts/webui.py --no-half --precision=full

List of command line options

optional arguments:
  -h, --help            show this help message and exit
  --outdir [OUTDIR]     dir to write results to
  --outdir_txt2img [OUTDIR_TXT2IMG]
                        dir to write txt2img results to (overrides --outdir)
  --outdir_img2img [OUTDIR_IMG2IMG]
                        dir to write img2img results to (overrides --outdir)
  --save-metadata       Whether to embed the generation parameters in the sample images
  --skip-grid           do not save a grid, only individual samples. Helpful when evaluating lots of samples
  --skip-save           do not save indiviual samples. For speed measurements.
  --n_rows N_ROWS       rows in the grid; use -1 for autodetect and 0 for n_rows to be same as batch_size (default:
                        -1)
  --config CONFIG       path to config which constructs model
  --ckpt CKPT           path to checkpoint of model
  --precision {full,autocast}
                        evaluate at this precision
  --gfpgan-dir GFPGAN_DIR
                        GFPGAN directory
  --realesrgan-dir REALESRGAN_DIR
                        RealESRGAN directory
  --realesrgan-model REALESRGAN_MODEL
                        Upscaling model for RealESRGAN
  --no-verify-input     do not verify input to check if it's too long
  --no-half             do not switch the model to 16-bit floats
  --no-progressbar-hiding
                        do not hide progressbar in gradio UI (we hide it because it slows down ML if you have hardware
                        accleration in browser)
  --defaults DEFAULTS   path to configuration file providing UI defaults, uses same format as cli parameter
  --gpu GPU             choose which GPU to use if you have multiple
  --extra-models-cpu    run extra models (GFGPAN/ESRGAN) on cpu
  --esrgan-cpu          run ESRGAN on cpu
  --gfpgan-cpu          run GFPGAN on cpu
  --cli CLI             don't launch web server, take Python function kwargs from this file.
Clone this wiki locally