ACCC1380 commited on
Commit
a7730a4
1 Parent(s): 5365a63

Upload lora-scripts/install-cn.ps1 with huggingface_hub

Browse files
Files changed (1) hide show
  1. lora-scripts/install-cn.ps1 +22 -14
lora-scripts/install-cn.ps1 CHANGED
@@ -17,31 +17,39 @@ function Check {
17
  InstallFail
18
  }
19
  }
20
-
21
- if (!(Test-Path -Path "venv")) {
22
- Write-Output "���ڴ������⻷��..."
23
- python -m venv venv
24
- Check "�������⻷��ʧ�ܣ����� python �Ƿ�װ����Լ� python �汾�Ƿ�Ϊ64λ�汾��python 3.10����python��Ŀ¼�Ƿ��ڻ�������PATH�ڡ�"
 
 
 
 
 
 
 
 
 
 
25
  }
26
 
27
- .\venv\Scripts\activate
28
- Check "�������⻷��ʧ�ܡ�"
29
-
30
- Set-Location .\sd-scripts
31
  Write-Output "��װ������������ (�ѽ��й��ڼ��٣����ڹ�����޷�ʹ�ü���Դ�뻻�� install.ps1 �ű�)"
 
32
  $install_torch = Read-Host "�Ƿ���Ҫ��װ Torch+xformers? [y/n] (Ĭ��Ϊ y)"
33
- if ($install_torch -eq "y" -or $install_torch -eq "Y" -or $install_torch -eq ""){
34
- pip install torch==2.2.1+cu118 torchvision==0.17.1+cu118 -f https://mirror.sjtu.edu.cn/pytorch-wheels/torch_stable.html
35
  Check "torch ��װʧ�ܣ���ɾ�� venv �ļ��к��������С�"
36
- pip install -U -I --no-deps xformers==0.0.25+cu118 -f https://mirror.sjtu.edu.cn/pytorch-wheels/torch_stable.html
37
  Check "xformers ��װʧ�ܡ�"
38
  }
39
 
40
- pip install --upgrade -r requirements.txt
41
  Check "sd-scripts ������װʧ�ܡ�"
42
 
43
  Set-Location ..
44
- pip install --upgrade -r requirements.txt
45
  Check "ѵ������������װʧ�ܡ�"
46
 
47
  Write-Output "��װ���"
 
17
  InstallFail
18
  }
19
  }
20
+ if (Test-Path -Path "python\python.exe") {
21
+ Write-Output "ʹ�� python �ļ����ڵ� python..."
22
+ $py_path = (Get-Item "python").FullName
23
+ $env:PATH = "$py_path;$env:PATH"
24
+ }
25
+ else {
26
+ if (!(Test-Path -Path "venv")) {
27
+ Write-Output "���ڴ������⻷��..."
28
+ python -m venv venv
29
+ Check "�������⻷��ʧ�ܣ����� python �Ƿ�װ����Լ� python �汾�Ƿ�Ϊ64λ�汾��python 3.10����python��Ŀ¼�Ƿ��ڻ�������PATH�ڡ�"
30
+ }
31
+
32
+ Write-Output "��⵽���⻷�������Լ���..."
33
+ .\venv\Scripts\activate
34
+ Check "�������⻷��ʧ�ܡ�"
35
  }
36
 
37
+ Set-Location .\scripts
 
 
 
38
  Write-Output "��װ������������ (�ѽ��й��ڼ��٣����ڹ�����޷�ʹ�ü���Դ�뻻�� install.ps1 �ű�)"
39
+ Write-Output "�����ڹ��ڼ��پ���torch ��װ�޷�ʹ�þ���Դ����װ��Ϊ������"
40
  $install_torch = Read-Host "�Ƿ���Ҫ��װ Torch+xformers? [y/n] (Ĭ��Ϊ y)"
41
+ if ($install_torch -eq "y" -or $install_torch -eq "Y" -or $install_torch -eq "") {
42
+ python -m pip install torch==2.4.1+cu124 torchvision==0.19.1+cu124 --extra-index-url https://download.pytorch.org/whl/cu124
43
  Check "torch ��װʧ�ܣ���ɾ�� venv �ļ��к��������С�"
44
+ python -m pip install -U -I --no-deps xformers===0.0.28.post1 --extra-index-url https://download.pytorch.org/whl/cu124
45
  Check "xformers ��װʧ�ܡ�"
46
  }
47
 
48
+ python -m pip install --upgrade -r requirements.txt
49
  Check "sd-scripts ������װʧ�ܡ�"
50
 
51
  Set-Location ..
52
+ python -m pip install --upgrade -r requirements.txt
53
  Check "ѵ������������װʧ�ܡ�"
54
 
55
  Write-Output "��װ���"