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.
Tips for MacOS Users
MacOS users should perform the following processes in the webui-user.sh shell file instead of webui-user.bat.
Right-click
on thewebui-user.bat
file and select 'Edit'.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
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
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.
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.
VRAM related parameters
--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.
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
- 4GB of VRAM:
--lowvram --xformers
- 8GB of VRAM:
--medvram --xformers
- 12GB or more of VRAM:
--xformers