Skip to content

Installing sd‐scripts (Our Method, For Windows)

ArgentVASIMR edited this page Sep 8, 2024 · 12 revisions
  1. Install dependencies.
    a. https://www.python.org/ftp/python/3.10.6/python-3.10.6-amd64.exe (Enable "Add Python 3.10 to PATH" in the installer)
    b. https://git-scm.com/download/win (Click "next" for all pages, then click "finish". Ignore git bash.)

  2. Set your execution policy to unrestricted.
    a. Open Powershell as an administrator.
    b. Type Set-ExecutionPolicy Unrestricted
    c. Type a, press enter.
    d. Close Powershell window.

  3. Install sd-scripts. (For reinstalling sd-scripts, this is the only part you need to redo)
    a. Find where you want to install your LoRA trainer. This could be anywhere on your computer (except System32, obviously).
    b. Once in your location of choice, open Powershell for that folder through any of these methods.
    c. In the newly opened Powershell window, paste the commands below into it and press enter:

git clone https://github.com/kohya-ss/sd-scripts.git
cd sd-scripts

python -m venv venv
.\venv\Scripts\activate

pip install torch==2.1.2 torchvision --index-url https://download.pytorch.org/whl/cu118
pip install --upgrade -r requirements.txt
pip install xformers==0.0.23.post1 --index-url https://download.pytorch.org/whl/cu118
pip install dadaptation

curl https://raw.githubusercontent.com/ArgentVASIMR/FD-LoRA/main/use-me.ps1 -o .\use-me.ps1

accelerate config

Answers to accelerate config questions:

- This machine
- No distributed training
- no
- no
- no
- all
- fp16

Then close the Powershell window.

Installation of sd-scripts is complete. If this is your first time setting up LoRA training, return to the first time install guide, section Setting up use-me.ps1.

Clone this wiki locally