Skip to content

Installation

Vladimir Mandic edited this page Nov 7, 2024 · 36 revisions

Installing SD.Next

Tip

These instructions assume that you already have Git and Python installed on your user PATH.
If you do not have both Git and Python installed, follow the instructions in Install Python and Git to set those up first.

Clone SD.Next

  • Start terminal
    Launch your preferred system terminal and navigate to the directory where you want to install SD.Next.
    • This should be a directory which your user account has read/write/execute access to.
    • Installing SD.Next in a directory which requires admin permissions may cause it to not launch properly.
    • Installing SD.Next with superuser/admin permissions is not recommended.
  • Clone SD.Next
    Clone the repository by running
    git clone https://github.com/vladmandic/automatic <optional directory name>
    in your desired location and then navigate into the cloned directory.

Initial Installation

Warning

Decide on appropriate compute backend for your system ahead of time as that will determine which libraries are installed on your system

--use-cuda       Use nVidia CUDA backend (autodetected by default)
--use-rocm       Use AMD ROCm backend (autodetected by default)
--use-ipex       Use Intel OneAPI XPU backend
--use-openvino   Use Intel OpenVINO backend
--use-zluda      Use ZLUDA
--use-directml   Use DirectML
  • Launch SD.Next
    Run the appropriate launcher for your OS to start the web interface:
    • Windows: webui.bat --debug --use-xxx or .\webui.ps1 --debug --use-xxx
    • Linux & Mac: ./webui.sh --debug --use-xxx

For the initial setup and future tech support, it is advisable to include the --debug option which provides more detailed logging information.

Now wait for few minutes to let the server install all required libraries.
The server is finished launching when the console shows an entry for "Startup time".

Tip

For platform specific information, check out
WSL | Intel Arc | DirectML | OpenVINO | ONNX & Olive | ZLUDA | AMD ROCm | MacOS | nVidia

First-Time Setup

  • Start the web interface
    Once the web interface starts running, you can access it by opening your web browser and navigating to the address listed in the console next to "Local URL." For most users, this should be http://localhost:7860/.
    You will see a brief loading screen, then you should be taken to the Text tab.
  • Adjust paths
    You may want to adjust these settings in the System:Settings tab:
    • If you already have models, LoRAs, Embeddings, LyCORIS, etc. set your paths in the System Paths page now
    • Pay special attention to the Folder with Huggingface models and Folder for Huggingface Cache as they can grow to significant size
    • You can use Base path to set a common root for all paths
  • Set your desired look & feel
    You can change the theme in the User Interface section.
  • Save your settings
    If you changed any settings in the previous step, click Apply settings to save those settings to your config file. This will also apply some defaults from built-in extensions.
  • Restart server Click Restart server to re-launch the SD.Next server with the updated settings.

Install Python and Git

Windows

Git-for-Windows

  1. Download Git for Windows from the following link: Git for Windows
  2. Run the downloaded .exe file and follow the installation wizard.
  3. During the installation process, make sure to check the box for "Use Git from the Windows Command line and also from 3rd-party-software" to add Git to your system's PATH.
  4. Complete the installation by following the on-screen instructions.

Python-for-Windows

  1. Download Python for Windows from the following link: Python for Windows
  2. Run the downloaded .exe file and follow the installation wizard.
  3. On the "Customize Python" screen, make sure to check the box for "Add Python to PATH."
  4. Continue the installation by following the prompts.
  5. Once the installation is complete, you can open the command prompt and verify that Python is installed by executing python --version and pip --version to check the Python and Pip versions respectively.

MacOS

Git-for-MacOS

  1. Download Git for macOS from the following link: Git for macOS
  2. Open the downloaded .pkg file and follow the installation instructions.
  3. During the installation process, make sure to check the box for "Install Git Bash" to have a command-line Git interface.
  4. Complete the installation by following the prompts.

Python-for-MacOS

See these instructions for Python on MacOS (and an explanation why it's unique).

Clone this wiki locally