Skip to content

Commit

Permalink
add install option
Browse files Browse the repository at this point in the history
  • Loading branch information
sdbds committed Dec 6, 2023
1 parent 94e3deb commit c8cce8a
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 10 deletions.
5 changes: 4 additions & 1 deletion install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,12 @@ if (!(Test-Path -Path "MagicAnimate")) {
git clone https://huggingface.co/zcxu-eric/MagicAnimate
}

if (!(Test-Path -Path "stable-diffusion-v1-5")) {
$install_SD15 = Read-Host "Do you need to download SD15? If you don't have any SD15 model locally select y, if you want to change to another SD1.5 model select n. [y/n] (Default is y)"
if ($install_SD15 -eq "y" -or $install_SD15 -eq "Y" -or $install_SD15 -eq ""){
if (!(Test-Path -Path "stable-diffusion-v1-5")) {
Write-Output "Downloading stable-diffusion-v1-5 models..."
git clone https://huggingface.co/bdsqlsz/stable-diffusion-v1-5
}
}

Write-Output "Install completed"
Expand Down
28 changes: 19 additions & 9 deletions install_cn.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,42 @@ Set-Location $PSScriptRoot
$Env:PIP_DISABLE_PIP_VERSION_CHECK = 1

if (!(Test-Path -Path "venv")) {
Write-Output "Creating venv for python..."
Write-Output "创建python虚拟环境venv..."
python -m venv venv
}
.\venv\Scripts\activate

Write-Output "Installing deps..."
Write-Output "安装依赖..."
pip install -U -r requirements-windows.txt -i https://mirror.baidu.com/pypi/simple

Write-Output "Checking models..."
Write-Output "检查模型..."

if (!(Test-Path -Path "pretrained_models")) {
Write-Output "Creating pretrained_models..."
Write-Output "创建模型文件夹..."
mkdir "pretrained_models"
}

Set-Location .\pretrained_models

if (!(Test-Path -Path "MagicAnimate")) {
Write-Output "Downloading MagicAnimate models..."
Write-Output "下载MagicAnimate模型..."
git clone https://huggingface.co/zcxu-eric/MagicAnimate
}
if (Test-Path -Path "MagicAnimate/.git/lfs") {
Remove-Item -Path MagicAnimate/.git/lfs/* -Recurse -Force
}

if (!(Test-Path -Path "stable-diffusion-v1-5")) {
Write-Output "Downloading stable-diffusion-v1-5 models..."
git clone https://huggingface.co/bdsqlsz/stable-diffusion-v1-5
$install_SD15 = Read-Host "是否需要下载huggingface的SD15模型? 若您本地没有任何SD15模型选择y,如果想要换其他SD1.5模型选择 n。[y/n] (默认为 y)"
if ($install_SD15 -eq "y" -or $install_SD15 -eq "Y" -or $install_SD15 -eq "") {
if (!(Test-Path -Path "stable-diffusion-v1-5")) {
Write-Output "下载 stable-diffusion-v1-5 模型..."
git clone https://huggingface.co/bdsqlsz/stable-diffusion-v1-5

}
if (Test-Path -Path "stable-diffusion-v1-5/.git/lfs") {
Remove-Item -Path stable-diffusion-v1-5/.git/lfs/* -Recurse -Force
}
}

Write-Output "Install completed"
Write-Output "安装完毕"
Read-Host | Out-Null ;

0 comments on commit c8cce8a

Please sign in to comment.