Skip to content
Vladimir Mandic edited this page Jun 30, 2024 · 13 revisions

Installing SD.Next

Nvidia Graphics Card Note

You will likely want to follow Nvidia's instructions to disable System Memory Fallback for Stable Diffusion on the newest drivers, which you should be using.

General Installation

Prerequisites

  • 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.

Initial Installation

  1. 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.
  2. Clone the repository by running git clone https://github.com/vladmandic/automatic <optional directory name> in your desired location.
  3. Navigate into the cloned directory.
  4. Run the appropriate launcher for your OS to start the web interface:
    • Windows: webui.bat --debug or .\webui.ps1 --debug
      • DirectML/AMD owners on Windows should additionally start with --use-directml.
    • Linux: ./webui.sh --debug
      • ROCm/Linux users can optionally also start with --use-rocm if your setup is not autodetected.
    • Mac: ./webui.sh --debug
    • Notes:
      • Intel OneAPI XPU users should also start with --use-ipex
      • For the initial setup and future tech support, it is advisable to include the --debug option. This will provide more detailed information, which can be helpful until the Diffusers backend becomes fully feature complete from Huggingface and any potential compatibility issues are resolved.
  5. Let the server finish installing and launching. The server is finished launching when the console shows an entry for "Local URL" with the server's address.

First-Time Setup

  1. 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/.
  2. You will see a brief loading screen, then you should be taken to the Text tab.
  3. You may want to adjust these settings in the System tab:
    • If you already have models, LoRAs, Embeddings, LyCORIS, etc. set your paths in the System Paths page now, especially if you started with --models-dir, since you won't need to use that argument afterwards.
      • Pay special attention to the Folder with Huggingface models entry as that is where diffusers models will download to if you use the Huggingface downloader.
    • If you intend to use the Diffusers backend and/or SDXL, go to the User Interface page and add sd_model_refiner, diffusers_pipeline, and sd_backend to the Quicksettings list box. This will make controlling SDXL much easier.
    • Optionally, we have just added a new theme, Amethyst-Nightfall, (It's purple!). You can select that at the top of the User Interface page in the UI theme setting.
  4. 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.
  5. Click Restart Server to re-launch the SD.Next server with the updated settings.

Post-Install

After installing and setting up SD.Next, you may find these pages useful:

Install Python and Git

To install Python and Git on Windows and macOS, please follow the instructions below:

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).