forked from FahimF/sd-gui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·37 lines (37 loc) · 1.09 KB
/
install.sh
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
34
35
36
37
#!/bin/bash
read -n 1 -p "Create conda environment (y/n)?" input
if [[ $input = n ]] ; then
printf "\nBypassing environment creation ...\n"
else
conda create -n ml python=3.9.13
fi
read -n 1 -p "Activate new conda environment (y/n)?" input
if [[ $input = n ]] ; then
printf "\nBypassing environment activation ...\n"
else
# conda activate mlnew
source "/Users/$USER/miniforge3/bin/activate" ml
fi
read -n 1 -p "Continue (y/n)?" input
if [[ $input = n ]] ; then
printf "\nQuitting ...\n"
exit
fi
conda install pytorch -c pytorch-nightly -y
conda install pyqt -y
conda install -c conda-forge transformers diffusers ftfy flask scipy -y
pip install opencv-python
read -n 1 -p "Revert PyTorch to good nightly (y/n)?" input
if [[ $input = n ]] ; then
printf "\nQuitting ...\n"
exit
fi
pip install --pre -r requirements.txt -f https://download.pytorch.org/whl/nightly/torch_nightly.html
read -n 1 -p "Download the Stable Diffusion model (y/n)?" input
if [[ $input = n ]] ; then
printf "\nQuitting ...\n"
exit
fi
mkdir output
git lfs install
git clone https://huggingface.co/CompVis/stable-diffusion-v1-4