-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun2.bat
59 lines (43 loc) · 1.81 KB
/
run2.bat
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
@echo off
title JoyCaption-Pre-Alpha-Batch_2024-07-30a
color 0a
cd /d %cd%
:: cd /d %~dp0
set DIR=%cd%
:: https://www.python.org/ftp/python/
:: https://www.python.org/ftp/python/3.11.9/python-3.11.9-embed-amd64.zip
:: https://bootstrap.pypa.io/get-pip.py
set PATH=%DIR%\python;%DIR%\python\Scripts;%PATH%;
:: set PATH=%DIR%\git\bin;%DIR%\python;%DIR%\python\Scripts;%PATH%;
set PY_LIBS=%DIR%\python\Scripts\Lib;%DIR%\python\Scripts\Lib\site-packages
set PY_PIP=%DIR%\python\Scripts
set PIP_INSTALLER_LOCATION=%DIR%\python\get-pip.py
set HF_HOME=%DIR%\hf
:: set HF_ENDPOINT=https://hf-mirror.com
:: set HUGGINGFACE_HUB_DISABLE_CACHE=1
:: 安装 pip 后不可使用时,可尝试编辑 %DIR%\python\pythonXXX._pth 去掉 import site 的注释
:: python 脚本将当前目录添加到 sys.path
:: import os
:: import sys
:: sys.path.append(os.path.dirname(os.path.abspath(__file__)))
:: 包临时缓存路径
set PIP_CACHE_DIR=..\cache
:: 缓存。off 禁用,on 启用
:: set PIP_NO_CACHE_DIR=off
:: 包索引 URL
set PIP_INDEX_URL=https://mirrors.cloud.tencent.com/pypi/simple
:: https://pypi.org/simple
:: https://mirrors.163.com/pypi/simple/
:: https://mirrors.cloud.tencent.com/pypi/simple
:: https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
:: python -m pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu124
:: python -m pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121
:: python -m pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
:: python -m pip install xformers===0.0.28.post1 --extra-index-url https://download.pytorch.org/whl/cu124
:: 额外包索引 URL
:: set PIP_EXTRA_INDEX_URL=https://pypi.org/simple
:: 请求包索引超时时间。单位:秒。
set PIP_TIMEOUT=10
:: 更详细的调试信息
:: set PIP_VERBOSE=1
cmd /k python caption.py input --bs 8