Skip to main content

webui-user.bat/webui-user.sh command line parameters

You can add command line parameters to the webui-user.bat file to make some settings for the Stable Diffusion web UI.


Edit batch file

To add command line parameters to the webui-user.bat file, you can edit it by following the steps below.

tip

Tips for MacOS Users

MacOS users should perform the following processes in the webui-user.sh shell file instead of webui-user.bat.

  1. Right-click on the webui-user.bat file and select 'Edit'. Alt text

  2. Find the line set COMMANDLINE_ARGS= and add the desired command line parameters next to it.

    • Example: If you added the --api parameter.

      /stable-diffusion-webui/webui-user.bat
      @echo off

      set PYTHON=
      set GIT=
      set VENV_DIR=
      set COMMANDLINE_ARGS=--api

      call webui.bat
  3. Enter additional parameters

    • If there are more command line parameters you want to add, continue on the same line.

    • Example: If you added the --api and --xformers parameters together.

      /stable-diffusion-webui/webui-user.bat
      @echo off

      set PYTHON=
      set GIT=
      set VENV_DIR=
      set COMMANDLINE_ARGS=--api --xformers

      call webui.bat
  4. when you are done editing, save the file and close the window.

--api: The following must be added for integration between Stable Diffusion web UI and UModeler X.

tip

Access Test in Web Browser

If you have installed Stable Diffusion and WebUI on your computer, try accessing http://127.0.0.1:7860/sdapi/v1/samplers in your web browser. If the --api option is set correctly, a list of samplers will appear, and if the option setting is incorrect, you will see {"detail":"Not Found"}.

If the list of samplers appears but you cannot connect through UModeler X, it's likely an issue with UModeler X itself. In that case, please contact us via Discord or email. If you see Not Found, check whether you have added the --api option in the webui-user.bat or webui-user.sh file.


--medvram: Enable settings optimized for systems with medium VRAM.

--lowvram: Enable settings optimized for systems with low levels of VRAM

--xformers: Enable the use of the xformers library.

info

xFormers

xFormers is a Transformer library, the library's optimizations allow for faster image generation and reduced VRAM usage.

Command line parameter recommendations based on VRAM

  1. 4GB of VRAM: --lowvram --xformers
  2. 8GB of VRAM: --medvram --xformers
  3. 12GB or more of VRAM: --xformers