Skip to content

Commit

Permalink
better scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
YanWenKun committed Dec 11, 2024
1 parent 0a635e3 commit 190fd6a
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 23 deletions.
2 changes: 1 addition & 1 deletion pt24-cu121/attachments/force-update-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ git_pull ComfyUI

cd ./ComfyUI/custom_nodes
for D in *; do
if [ -d "${D}" ]; then
if [ -d "${D}" ] && [ "${D}" != "ComfyUI-3D-Pack" ]; then
git_pull "${D}" &
fi
done
Expand Down
4 changes: 2 additions & 2 deletions pt24-cu121/attachments/reinstall-deps-for-3d.bat
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ echo affect the existing python_embeded.
echo Regardless of success or failure, the temporary files will not be deleted.
echo ################################################################################
echo Require environment: C++ Build Tools (Visual Studio 2022), CUDA Toolkit, Git.
echo Recommend to edit TORCH_CUDA_ARCH_LIST in this script to save build time.
echo Recommend to edit TORCH_CUDA_ARCH_LIST in this script to reduce build time.
echo ################################################################################
echo Press Enter to continue...

Expand Down Expand Up @@ -58,6 +58,6 @@ echo Build complete, installing...

del .\tmp_build\numpy-2*.whl

for %i in (.\tmp_build\*.whl) do .\python_embeded\python.exe -s -m pip install --force-reinstall "%i"
for %%i in (.\tmp_build\*.whl) do .\python_embeded\python.exe -s -m pip install --force-reinstall "%%i"

.\python_embeded\python.exe -s -m pip install numpy==1.26.4
7 changes: 3 additions & 4 deletions pt24-cu121/attachments/run.bat
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
@REM Edit this first! According to your GPU model.
set TORCH_CUDA_ARCH_LIST=6.1+PTX

@REM To set proxy, edit and uncomment the two lines below (remove 'rem ' in the beginning of line).
rem set HTTP_PROXY=http://localhost:1081
rem set HTTPS_PROXY=http://localhost:1081
Expand All @@ -14,10 +17,6 @@ rem set HF_TOKEN=
@REM https://huggingface.co/docs/huggingface_hub/hf_transfer
rem set HF_HUB_ENABLE_HF_TRANSFER=1

@REM In order to save your time on compiling PyTorch JIT CPP extensions, edit this line according to your GPU arch.
@REM Ref: https://github.com/ashawkey/stable-dreamfusion/issues/360#issuecomment-2292510049
set TORCH_CUDA_ARCH_LIST=5.2+PTX;6.0;6.1+PTX;7.5;8.0;8.6;8.9+PTX

@REM This command redirects HuggingFace-Hub to download model files in this folder.
set HF_HUB_CACHE=%~dp0\HuggingFaceHub

Expand Down
12 changes: 2 additions & 10 deletions pt24-cu121/attachments/中文脚本/run_cn.bat
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
@REM 依照下表,修改为你的 GPU 对应架构,以节约运行时编译 PyTorch C++ 扩展的时间:
@REM 'Pascal', '6.0;6.1+PTX'
@REM 'Volta+Tegra', '7.2'
@REM 'Volta', '7.0+PTX'
@REM 'Turing', '7.5+PTX'
@REM 'Ampere+Tegra', '8.7'
@REM 'Ampere', '8.0;8.6+PTX'
@REM 'Ada', '8.9+PTX'
@REM 'Hopper', '9.0+PTX'
set TORCH_CUDA_ARCH_LIST=5.2+PTX;6.0;6.1+PTX;7.5;8.0;8.6;8.9+PTX
@REM 务必根据你的 GPU 型号配置!
set TORCH_CUDA_ARCH_LIST=6.1+PTX

@REM 如需配置代理,取消注释(移除行首的 'rem ')并编辑下两行环境变量。
rem set HTTP_PROXY=http://localhost:1081
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ function change_url_or_pull () {

change_url_or_pull ComfyUI

# 这里使用 & 将任务置入后台,以实现多线程,并等待全部任务完成
# 这里使用 & 将任务置入后台,以实现多线程(多进程),并等待全部任务完成
cd ./ComfyUI/custom_nodes
for D in *; do
if [ -d "${D}" ]; then
if [ -d "${D}" ] && [ "${D}" != "ComfyUI-3D-Pack" ]; then
change_url_or_pull "${D}" &
fi
done
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,6 @@ echo "编译完成,开始安装……"

del .\tmp_build\numpy-2*.whl

for %i in (.\tmp_build\*.whl) do .\python_embeded\python.exe -s -m pip install --force-reinstall "%i"
for %%i in (.\tmp_build\*.whl) do .\python_embeded\python.exe -s -m pip install --force-reinstall "%%i"

.\python_embeded\python.exe -s -m pip install numpy==1.26.4
5 changes: 5 additions & 0 deletions pt24-cu121/stage2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,12 @@ git reset --hard "v0.3.7"
# CUSTOM NODES
cd "$workdir"/Comfy3D_WinPortable/ComfyUI/custom_nodes

# 3D-Pack
mv "$workdir"/ComfyUI-3D-Pack ./ComfyUI-3D-Pack
# Make sure Manager won't update its deps anyway
rm ./ComfyUI-3D-Pack/requirements.txt
rm ./ComfyUI-3D-Pack/install.py
rm -rf ./ComfyUI-3D-Pack/_Pre_Builds

# Install ComfyUI-Manager but disable it by default
git clone https://ghp.ci/https://github.com/ltdrdata/ComfyUI-Manager.git
Expand Down
2 changes: 1 addition & 1 deletion pt25-cu124/attachments/reinstall-deps-for-3d.bat
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,6 @@ echo Build complete, installing...

del .\tmp_build\numpy-2*.whl

for %i in (.\tmp_build\*.whl) do .\python_embeded\python.exe -s -m pip install --force-reinstall "%i"
for %%i in (.\tmp_build\*.whl) do .\python_embeded\python.exe -s -m pip install --force-reinstall "%%i"

.\python_embeded\python.exe -s -m pip install numpy==1.26.4
2 changes: 1 addition & 1 deletion pt25-cu124/attachments/中文脚本/run_cn.bat
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@REM 务必根据 GPU 型号配置!
@REM 务必根据你的 GPU 型号配置!
set TORCH_CUDA_ARCH_LIST=6.1+PTX

@REM 如需配置代理,取消注释(移除行首的 'rem ')并编辑下两行环境变量。
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,6 @@ echo "编译完成,开始安装……"

del .\tmp_build\numpy-2*.whl

for %i in (.\tmp_build\*.whl) do .\python_embeded\python.exe -s -m pip install --force-reinstall "%i"
for %%i in (.\tmp_build\*.whl) do .\python_embeded\python.exe -s -m pip install --force-reinstall "%%i"

.\python_embeded\python.exe -s -m pip install numpy==1.26.4

0 comments on commit 190fd6a

Please sign in to comment.