forked from ali-vilab/AnyDoor
-
Notifications
You must be signed in to change notification settings - Fork 16
/
install.ps1
60 lines (37 loc) · 1.5 KB
/
install.ps1
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
Set-Location $PSScriptRoot
$Env:PIP_DISABLE_PIP_VERSION_CHECK = 1
if (!(Test-Path -Path "venv")) {
Write-Output "Creating venv for python..."
python -m venv venv
}
.\venv\Scripts\activate
python -m pip install pip==23.0.1
pip install torch==2.0.1+cu118 torchvision==0.15.2+cu118 --extra-index-url https://download.pytorch.org/whl/cu118
pip install --no-deps xformers==0.0.22
Write-Output "Installing deps..."
pip install setuptools==66.0.0
$SOURCEFILE="scripts/util.py"
$TARGETFILE="venv/Lib/site-packages/setuptools/_distutils/util.py"
Copy-Item -Path $SOURCEFILE -Destination $TARGETFILE -Force
pip install share==1.0.4
pip install -r requirements-windows.txt
pip install git+https://github.com/cocodataset/panopticapi.git
pip install pycocotools
pip install lvis
Write-Output "Checking models..."
if (!(Test-Path -Path "path")) {
Write-Output "Creating pretrained_models..."
mkdir "path"
}
git lfs install
git lfs clone https://huggingface.co/bdsqlsz/AnyDoor-Pruned ./path
if (Test-Path -Path "path/.git/lfs") {
Remove-Item -Path path/.git/lfs/* -Recurse -Force
}
Set-Location .\path
Write-Output "Downloading dinoV2 models..."
Write-Output "from https://dl.fbaipublicfiles.com/dinov2/dinov2_vitg14/dinov2_vitg14_reg4_pretrain.pth..."
Write-Output "If it downloads slowly,you can copy link then close this window for downloading manually"
wget https://dl.fbaipublicfiles.com/dinov2/dinov2_vitg14/dinov2_vitg14_reg4_pretrain.pth
Write-Output "Install completed"
Read-Host | Out-Null ;