-
Notifications
You must be signed in to change notification settings - Fork 1
/
sd3.bat
33 lines (25 loc) · 890 Bytes
/
sd3.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
@echo off
REM Check if the virtual environment exists
if not exist "venv" (
REM Create a new virtual environment
python -m venv venv
)
REM Activate the virtual environment
call venv\Scripts\activate.bat
REM Upgrade pip
python -m pip install --upgrade pip
REM Install or upgrade the required packages
pip install --upgrade torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121
pip install Pillow accelerate huggingface_hub sentencepiece protobuf
REM Check if the diffusers directory exists
if not exist "diffusers" (
REM Install diffusers from source
pip install git+https://github.com/huggingface/diffusers.git
) else (
echo The diffusers repository has already been cloned. Skipping installation.
)
pip install transformers
REM Run the sd3.py script
python sd3.py
REM Deactivate the virtual environment
call venv\Scripts\deactivate.bat