-
Notifications
You must be signed in to change notification settings - Fork 27
/
setup.sh
34 lines (30 loc) · 1.25 KB
/
setup.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
echo "Cloning dependent repos..."
git clone --single-branch https://github.com/mattmazzola/GLIGEN.git
git clone --single-branch https://github.com/mattmazzola/Segment-Everything-Everywhere-All-At-Once.git SEEM
git clone --single-branch -b make_usable_from_other_demos https://github.com/mattmazzola/LLaVA
git clone --single-branch https://github.com/advimman/lama.git
echo "Creating environments and download pretrained models..."
cd LLaVA
conda create -n llava python=3.10 -y
conda activate llava
pip install --upgrade pip # enable PEP 660 support
pip install -e .
#download pretrained model
git clone https://huggingface.co/liuhaotian/llava-v1.5-13b
conda deactivate
cd ..
#setting up lama
cd lama
conda env create --name lama -f conda_env.yml -y
conda activate lama
conda install pytorch torchvision torchaudio cudatoolkit=10.2 -c pytorch -y
pip install torch==1.10.2+cu113 --find-links https://download.pytorch.org/whl/cu113/torch_stable.html
pip install torchvision==0.11.3+cu113 --find-links https://download.pytorch.org/whl/cu113/torch_stable.html
pip install flask
pip install pytorch-lightning
#download pretrained model
git clone https://huggingface.co/smartywu/big-lama download
unzip -n -q download/big-lama.zip
conda deactivate
cd ..
echo "Done setting up."