Skip to content

Commit

Permalink
Add env var TORCH_CUDA_ARCH_LIST
Browse files Browse the repository at this point in the history
  • Loading branch information
YanWenKun committed Sep 9, 2024
1 parent 53ac087 commit d47638c
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
4 changes: 4 additions & 0 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ Its compiler will be needed (for some JIT code).
https://developer.nvidia.com/cuda-downloads?target_os=Windows&target_arch=x86_64&target_version=11&target_type=exe_local[CUDA Toolkit],
latest version is fine as long as it's 12.x.

3. Edit `run_nvidia_gpu.bat`, reduce `TORCH_CUDA_ARCH_LIST` according to your
https://github.com/ashawkey/stable-dreamfusion/issues/360#issuecomment-2292510049[GPU arch],
to save your time on JIT compiling.

== Tips for Usage

1. Model Path: If model files are already saved in another location and you don't want to move them, you can configure the program to load them:
Expand Down
4 changes: 4 additions & 0 deletions README.zh.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ https://visualstudio.microsoft.com/downloads/?q=build+tools[Visual Studio 2022
https://developer.nvidia.com/cuda-downloads?target_os=Windows&target_arch=x86_64&target_version=11&target_type=exe_local[CUDA Toolkit],
最新版即可,只要大版本还在 12.x 就兼容。

3. 编辑 `run_nvidia_gpu.bat`,根据你的
https://github.com/ashawkey/stable-dreamfusion/issues/360#issuecomment-2292510049[GPU 架构]
来精简 `TORCH_CUDA_ARCH_LIST`,以节约运行时的 JIT 编译耗时。

此外请注意,Comfy3D 还会在执行各节点时下载所需模型,而访问 HuggingFace 可能需要挂代理。

## 使用技巧
Expand Down
11 changes: 9 additions & 2 deletions attachments/run_nvidia_gpu.bat
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,23 @@
rem set HTTP_PROXY=http://localhost:1081
rem set HTTPS_PROXY=http://localhost:1081

@REM In order to save your time on compiling PyTorch JIT CPP extensions,
@REM edit this according to your GPU arch.
@REM https://github.com/ashawkey/stable-dreamfusion/issues/360#issuecomment-2292510049
@REM 依照下表,修改为你的 GPU 对应架构,以节约 JIT 编译 PyTorch C++ 扩展的时间:
@REM 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 will set PATH environment variable.
@REM 该行命令会配置 PATH 环境变量。
set PATH=%PATH%;%~dp0\python_embeded\Scripts\
set PATH=%PATH%;%~dp0\python_embeded\Scripts

@REM This command will let the .pyc files to be stored in one place.
@REM 该行命令会使 .pyc 文件集中保存在一处。
set PYTHONPYCACHEPREFIX=.\pycache

@REM If you don't want the browser to open automatically,
@REM add " --disable-auto-launch" (without quotation marks) to the end of the line below.
@REM add " --disable-auto-launch" (without quotation marks) to the end of the line below.
@REM 如果不想要 ComfyUI 启动后自动打开浏览器,添加" --disable-auto-launch"(不含引号)到下行末尾。
.\python_embeded\python.exe -s ComfyUI\main.py --windows-standalone-build

Expand Down

0 comments on commit d47638c

Please sign in to comment.