diff --git a/comfy3d-pt25/README.adoc b/comfy3d-pt25/README.adoc index 2934a5f..edf5511 100644 --- a/comfy3d-pt25/README.adoc +++ b/comfy3d-pt25/README.adoc @@ -6,12 +6,12 @@ https://hub.docker.com/r/yanwk/comfyui-boot/tags?name=comfy3d-pt25[View on 1000Mbps and VERY STABLE connection (e.g. cloud server). +https://huggingface.co/docs/huggingface_hub/hf_transfer[More] + +|TORCH_CUDA_ARCH_LIST +|7.5 + +or + +'5.2+PTX;6.0;6.1+PTX;7.5;8.0;8.6;8.9+PTX' +|Build target for PyTorch and its extensions. +For most users, you only need to set one build target for your GPU. +https://arnon.dk/matching-sm-architectures-arch-and-gencode-for-various-nvidia-cards/[More] + +|CMAKE_ARGS +|(Default) + +'-DBUILD_opencv_world=ON -DWITH_CUDA=ON -DCUDA_FAST_MATH=ON -DWITH_CUBLAS=ON -DWITH_NVCUVID=ON' +|Build options for CMAKE for projects using CUDA. + +|=== + + +[[trellis-demo]] +## Additional: Running the TRELLIS Demo Using This Image + +https://github.com/microsoft/TRELLIS[TRELLIS] +officially provides a Gradio demo that can generate orbit videos and `.glb` models from images. +This image has almost all the necessary dependencies, so you can easily run the demo. The execution script is provided below. + +* Note: Requires more than 16G VRAM. + +* `ATTN_BACKEND` Parameter Selection +** `flash-attn` is suitable for Ampere architecture (30 series/A100) and later GPUs. +** `xformers` has better compatibility. + +* `SPCONV_ALGO` Parameter Selection +** `native` starts faster and is suitable for single runs. +** `auto` will have better performance, but will take some time for benchmarking at the beginning. + +.1. Run the Container +[source,sh] +---- +mkdir -p storage + +podman run -it \ + --name trellis-demo \ + --device nvidia.com/gpu=all \ + --security-opt label=disable \ + -p 7860:7860 \ + -v "$(pwd)"/storage:/root \ + -e ATTN_BACKEND="flash-attn" \ + -e SPCONV_ALGO="native" \ + -e GRADIO_SERVER_NAME="0.0.0.0" \ + -e PIP_USER=true \ + -e PIP_ROOT_USER_ACTION=ignore \ + -e PYTHONPYCACHEPREFIX="/root/.cache/pycache" \ + docker.io/yanwk/comfyui-boot:comfy3d-pt25 \ + /bin/fish +---- + +.2. Run the Commands +[source,sh] +---- +export PATH="$PATH:/root/.local/bin" + +# Run the compilation script, takes about 10 minutes. +bash /runner-scripts/build-deps.sh + +# Install dependencies +pip install gradio==4.44.1 gradio_litmodel3d==0.0.1 + +# Download the model +huggingface-cli download JeffreyXiang/TRELLIS-image-large + +# Download and run TRELLIS demo +git clone --depth=1 --recurse-submodules \ + https://github.com/microsoft/TRELLIS.git \ + /root/TRELLIS + +cd /root/TRELLIS + +python3 app.py +---- + +NOTE: You may safely ignore the message "matrix-client 0.4.0 requires urllib3~=1.21, but you have urllib3 2.2.3 which is incompatible." As `matrix-client` is used by ComfyUI-Manager, it is not relevant in this context. diff --git a/comfy3d-pt25/README.zh.adoc b/comfy3d-pt25/README.zh.adoc index 46b7315..36a365e 100644 --- a/comfy3d-pt25/README.zh.adoc +++ b/comfy3d-pt25/README.zh.adoc @@ -9,8 +9,9 @@ https://hub.docker.com/r/yanwk/comfyui-boot/tags?name=comfy3d-pt25[在 1000Mbps 且十分稳定的连接有意义(比如云服务器)。 +https://huggingface.co/docs/huggingface_hub/hf_transfer[文档] + +|TORCH_CUDA_ARCH_LIST +|7.5 + +或 + +'5.2+PTX;6.0;6.1+PTX;7.5;8.0;8.6;8.9+PTX' +|设置 PyTorch 及扩展的编译目标。 +对于大多数用户,仅需为自己的 GPU 设置一个目标。 +https://arnon.dk/matching-sm-architectures-arch-and-gencode-for-various-nvidia-cards/[参考] + +|CMAKE_ARGS +|'-DBUILD_opencv_world=ON -DWITH_CUDA=ON -DCUDA_FAST_MATH=ON -DWITH_CUBLAS=ON -DWITH_NVCUVID=ON' +|设置 CMAKE 编译参数,脚本中已默认设置,一般情况无需调整。 + +|=== + + +[[trellis-demo]] +## 额外内容:使用本镜像运行 TRELLIS 官方 demo + +https://github.com/microsoft/TRELLIS[TRELLIS] +官方自带了一个 Gradio 演示程序,可以从单张或多张图片生成环绕视频和 `.glb` 模型。 +而本镜像依赖项基本完备,可以简单运行该 demo,以下提供执行脚本。 + +* 注意:需要 16G 以上显存 + +* `ATTN_BACKEND` 参数选择 +** `flash-attn` 适合安培架构(30系/A100)及之后的 GPU +** `xformers` 兼容性更好 + +* `SPCONV_ALGO` 参数选择 +** `native` 启动较快,适合单次运行 +** `auto` 会有更好性能,但一开始会花时间进行性能测试 + +.1. 运行容器 +[source,sh] +---- +mkdir -p storage + +# 注意这里配置了代理 +# 请按需修改 +podman run -it \ + --name trellis-demo \ + --device nvidia.com/gpu=all \ + --security-opt label=disable \ + -p 7860:7860 \ + -v "$(pwd)"/storage:/root \ + -e ATTN_BACKEND="flash-attn" \ + -e SPCONV_ALGO="native" \ + -e GRADIO_SERVER_NAME="0.0.0.0" \ + -e PIP_USER=true \ + -e PIP_ROOT_USER_ACTION=ignore \ + -e PYTHONPYCACHEPREFIX="/root/.cache/pycache" \ + -e PIP_INDEX_URL="https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple" \ + -e HF_ENDPOINT="https://hf-mirror.com" \ + docker.io/yanwk/comfyui-boot:comfy3d-pt25 \ + /bin/fish +---- + +.2. 运行命令 +[source,sh] +---- +export PATH="$PATH:/root/.local/bin" + +# 执行一遍编译脚本,耗时10分钟左右 +bash /runner-scripts/build-deps.sh + +# 安装依赖项 +pip install gradio==4.44.1 gradio_litmodel3d==0.0.1 + +# 下载模型 +huggingface-cli download JeffreyXiang/TRELLIS-image-large + +# 下载并运行 TRELLIS demo +git clone --depth=1 --recurse-submodules \ + https://github.com/microsoft/TRELLIS.git \ + /root/TRELLIS + +cd /root/TRELLIS + +python3 app.py +---- + +NOTE: 如果提示 "matrix-client 0.4.0 requires urllib3~=1.21, but you have urllib3 2.2.3 which is incompatible." 直接忽略即可。只有 ComfyUI-Manager 的分享功能会用到 `matrix-client` 这个过时的组件,此处毫无影响。 diff --git a/comfy3d-pt25/runner-scripts/build-deps.sh b/comfy3d-pt25/runner-scripts/build-deps.sh index 45f034e..6541114 100644 --- a/comfy3d-pt25/runner-scripts/build-deps.sh +++ b/comfy3d-pt25/runner-scripts/build-deps.sh @@ -10,10 +10,11 @@ cd /root if [ -z "${CMAKE_ARGS}" ]; then export CMAKE_ARGS='-DBUILD_opencv_world=ON -DWITH_CUDA=ON -DCUDA_FAST_MATH=ON -DWITH_CUBLAS=ON -DWITH_NVCUVID=ON' - echo "CMAKE_ARGS not set, setting to ${CMAKE_ARGS}" + echo "[INFO] CMAKE_ARGS not set, setting to ${CMAKE_ARGS}" fi ; -# Compile PyTorch3D first +# Compile PyTorch3D +# Put it first because it takes longest time. pip install --force-reinstall \ "git+https://github.com/facebookresearch/pytorch3d.git" @@ -57,7 +58,7 @@ pip install --force-reinstall \ /tmp/build/mip-splatting/submodules/diff-gaussian-rasterization/ # (Optional) Compile Flash Attention for Ampere and later GPUs. -# Limit Ninja jobs to avoid OOM. +# "MAX_JOBS" limits Ninja jobs to avoid OOM. # If have >96GB RAM, just remove MAX_JOBS line. export MAX_JOBS=4 pip install flash-attn --no-build-isolation diff --git a/cu124-megapak/README.adoc b/cu124-megapak/README.adoc index 5ff3d9b..59f8d13 100644 --- a/cu124-megapak/README.adoc +++ b/cu124-megapak/README.adoc @@ -66,7 +66,88 @@ touch storage/.download-complete ---- -include::../docs/section-cli-args.adoc[] - -include::../docs/section-env-vars.adoc[] - +[[cli-args]] +## CLI_ARGS Reference + +[%autowidth,cols=2] +|=== +|args |description + +|--lowvram +|If your GPU only has 4GB VRAM. + +|--novram +|If adding __--lowvram__ still out-of-memory. + +|--cpu +|Run on CPU. It's pretty slow. + +|--use-pytorch-cross-attention +|If you don't want to use xFormers. This may perform well on WSL2, but significantly slower on Linux hosts. + +|--preview-method taesd +|Enable higher-quality previews with TAESD. ComfyUI-Manager would override this (settings available in Manager UI). + +|--front-end-version Comfy-Org/ComfyUI_frontend@latest +|Use the most up-to-date frontend version. + +|--fast +|Enable experimental optimizations. +Currently the only optimization is float8_e4m3fn matrix multiplication on +4000/ADA series Nvidia cards or later. +Might break things/lower quality. +See the +https://github.com/comfyanonymous/ComfyUI/commit/9953f22fce0ba899da0676a0b374e5d1f72bf259[commit]. +|=== + +More `CLI_ARGS` available at +https://github.com/comfyanonymous/ComfyUI/blob/master/comfy/cli_args.py[ComfyUI]. + + +[[env-vars]] +## Environment Variables Reference + +[cols="2,2,3"] +|=== +|Variable|Example Value|Memo + +|HTTP_PROXY + +HTTPS_PROXY +|http://localhost:1081 + +http://localhost:1081 +|Set HTTP proxy. + +|PIP_INDEX_URL +|'https://pypi.org/simple' +|Set mirror site for Python Package Index. + +|HF_ENDPOINT +|'https://huggingface.co' +|Set mirror site for HuggingFace Hub. + +|HF_TOKEN +|'hf_your_token' +|Set HuggingFace Access Token. +https://huggingface.co/settings/tokens[More] + +|HF_HUB_ENABLE_HF_TRANSFER +|1 +|Enable HuggingFace Hub experimental high-speed file transfers. +Only make sense if you have >1000Mbps and VERY STABLE connection (e.g. cloud server). +https://huggingface.co/docs/huggingface_hub/hf_transfer[More] + +|TORCH_CUDA_ARCH_LIST +|7.5 + +or + +'5.2+PTX;6.0;6.1+PTX;7.5;8.0;8.6;8.9+PTX' +|Build target for PyTorch and its extensions. +For most users, no setup is needed as it will be automatically selected on Linux. +When needed, you only need to set one build target just for your GPU. +https://arnon.dk/matching-sm-architectures-arch-and-gencode-for-various-nvidia-cards/[More] + +|CMAKE_ARGS +|(Default) + +'-DBUILD_opencv_world=ON -DWITH_CUDA=ON -DCUDA_FAST_MATH=ON -DWITH_CUBLAS=ON -DWITH_NVCUVID=ON' +|Build options for CMAKE for projects using CUDA. + +|=== diff --git a/cu124-megapak/README.zh.adoc b/cu124-megapak/README.zh.adoc index aec9e10..2804a83 100644 --- a/cu124-megapak/README.zh.adoc +++ b/cu124-megapak/README.zh.adoc @@ -63,7 +63,84 @@ touch storage/.download-complete ---- -include::../docs/section-cli-args.zh.adoc[] +[[cli-args]] +## CLI_ARGS 参考 -include::../docs/section-env-vars.zh.adoc[] +[%autowidth,cols=2] +|=== +|启动参数 |说明 +|--lowvram +|如果显存只有 4G (程序启动时会检测显存,自动开启) + +|--novram +|如果用了 __--lowvram__ 还是显存不够,直接改用 CPU 内存 + +|--cpu +|用 CPU 来跑,会很慢 + +|--use-pytorch-cross-attention +|如果不想用 xFormers,而改用 PyTorch 原生交叉注意力机制。在 WSL2 上可能会有更好的速度/显存占用表现,但在 Linux 宿主机上会明显更慢。 + +|--preview-method taesd +|使用基于 TAESD 的高质量实时预览。使用 Manager 会覆盖该参数(需在 Manager 界面中设置预览方式)。 + +|--front-end-version Comfy-Org/ComfyUI_frontend@latest +|使用最新版本的 ComfyUI 前端 + +|--fast +|使用实验性的高性能模式,对 40 系显卡 + CUDA 12.4 + 最新 PyTorch + fp8-e4m3fn 模型可达 40% 性能提升。但也有可能造成图像质量劣化。 +https://github.com/comfyanonymous/ComfyUI/commit/9953f22fce0ba899da0676a0b374e5d1f72bf259[来源] +|=== + +更多启动参数见 ComfyUI 的 +https://github.com/comfyanonymous/ComfyUI/blob/master/comfy/cli_args.py[cli_args.py] +。 + + +[[env-vars]] +## 环境变量参考 + +[cols="2,2,3"] +|=== +|变量名|参考值|备注 + +|HTTP_PROXY + +HTTPS_PROXY +|http://localhost:1081 + +http://localhost:1081 +|设置 HTTP 代理。 + +|PIP_INDEX_URL +|'https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple' +|设置 PyPI 镜像站点。 + +|HF_ENDPOINT +|'https://hf-mirror.com' +|设置 HuggingFace 镜像站点。 + +|HF_TOKEN +|'hf_your_token' +|设置 HuggingFace +https://huggingface.co/settings/tokens[访问令牌] +(Access Token)。 + +|HF_HUB_ENABLE_HF_TRANSFER +|1 +|启用 HuggingFace Hub 实验性高速传输,仅对 >1000Mbps 且十分稳定的连接有意义(比如云服务器)。 +https://huggingface.co/docs/huggingface_hub/hf_transfer[文档] + +|TORCH_CUDA_ARCH_LIST +|7.5 + +或 + +'5.2+PTX;6.0;6.1+PTX;7.5;8.0;8.6;8.9+PTX' +|设置 PyTorch 及扩展的编译目标(CUDA 架构版本)。 +对于大多数用户,无需设置,在 Linux 下会自动选择。 +如有需要,一般仅需设置自己的 GPU 这一个目标。 +https://arnon.dk/matching-sm-architectures-arch-and-gencode-for-various-nvidia-cards/[参考] + +|CMAKE_ARGS +|'-DBUILD_opencv_world=ON -DWITH_CUDA=ON -DCUDA_FAST_MATH=ON -DWITH_CUBLAS=ON -DWITH_NVCUVID=ON' +|设置 CMAKE 编译参数,脚本中已默认设置,一般情况无需调整。 + +|=== diff --git a/docs/note-TRELLIS.txt b/docs/note-TRELLIS.txt deleted file mode 100644 index 7c4360e..0000000 --- a/docs/note-TRELLIS.txt +++ /dev/null @@ -1,59 +0,0 @@ -# Podman 运行 -podman run -it --rm --name trellis \ ---device nvidia.com/gpu=all \ ---security-opt label=disable \ ---memory 28g \ ---network=host \ --v ~/app-trellis:/root \ --e PIP_INDEX_URL="https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple" \ --e HF_ENDPOINT="https://hf-mirror.com" \ --e HTTP_PROXY=http://localhost:1081 \ --e HTTPS_PROXY=http://localhost:1081 \ --e http_proxy=http://localhost:1081 \ --e https_proxy=http://localhost:1081 \ --e TORCH_CUDA_ARCH_LIST="6.1" \ --e PYTHONPYCACHEPREFIX="/root/.cache/pycache" \ --e PIP_USER=true \ --e PIP_ROOT_USER_ACTION=ignore \ --e GRADIO_SERVER_NAME="0.0.0.0" \ -yanwk/comfyui-boot:comfy3d-pt25-20241216 /bin/fish - -export PATH="$PATH:/root/.local/bin" - -pip install pillow imageio imageio-ffmpeg tqdm easydict opencv-python-headless scipy ninja rembg onnxruntime trimesh xatlas pyvista pymeshfix igraph transformers - -pip install spconv-cu124 - -# 这个是下载源码后编译安装 -pip install flash-attn - -# 完全可以用新版 -pip install git+https://github.com/EasternJournalist/utils3d.git@9a4eb15e4021b67b12c460c7057d642626897ec8 -pip install git+https://github.com/EasternJournalist/utils3d.git - -pip install kaolin -f https://nvidia-kaolin.s3.us-east-2.amazonaws.com/torch-2.5.1_cu124.html - -# 其实完全可以改为下载 zip archive 再安装 -mkdir -p /tmp/extensions - git clone --recurse-submodules https://github.com/JeffreyXiang/diffoctreerast.git /tmp/extensions/diffoctreerast - pip install /tmp/extensions/diffoctreerast - -# 需要编辑头文件 rasterizer_impl.h,添加 cstdint -mkdir -p /tmp/extensions - git clone https://github.com/autonomousvision/mip-splatting.git /tmp/extensions/mip-splatting - pip install /tmp/extensions/mip-splatting/submodules/diff-gaussian-rasterization/ - -git clone --recurse-submodules https://github.com/microsoft/TRELLIS.git -cd TRELLIS - -mkdir -p /tmp/extensions - cp -r extensions/vox2seq /tmp/extensions/vox2seq - pip install /tmp/extensions/vox2seq - -# Gradio 演示用的,会降低一些组件版本。但 gradio 4.44.1 是稳定版本,选它没啥毛病 -pip install gradio==4.44.1 gradio_litmodel3d==0.0.1 - -huggingface-cli download JeffreyXiang/TRELLIS-image-large - -# cd TRELLIS/ -python3 app.py diff --git a/docs/section-cli-args.adoc b/docs/section-cli-args.adoc deleted file mode 100644 index eb6a157..0000000 --- a/docs/section-cli-args.adoc +++ /dev/null @@ -1,37 +0,0 @@ -[[cli-args]] -## CLI_ARGS Reference - -[%autowidth,cols=2] -|=== -|args |description - -|--lowvram -|If your GPU only has 4GB VRAM. - -|--novram -|If adding __--lowvram__ still out-of-memory. - -|--cpu -|Run on CPU. It's pretty slow. - -|--use-pytorch-cross-attention -|If you don't want to use xFormers. This may perform well on WSL2, but significantly slower on Linux hosts. - -|--preview-method taesd -|Enable higher-quality previews with TAESD. ComfyUI-Manager would override this (settings available in Manager UI). - -|--front-end-version Comfy-Org/ComfyUI_frontend@latest -|Use the most up-to-date frontend version. - -|--fast -|Enable experimental optimizations. -Currently the only optimization is float8_e4m3fn matrix multiplication on -4000/ADA series Nvidia cards or later. -Might break things/lower quality. -See the -https://github.com/comfyanonymous/ComfyUI/commit/9953f22fce0ba899da0676a0b374e5d1f72bf259[commit]. -|=== - -More `CLI_ARGS` available at -https://github.com/comfyanonymous/ComfyUI/blob/master/comfy/cli_args.py[ComfyUI]. - diff --git a/docs/section-cli-args.zh.adoc b/docs/section-cli-args.zh.adoc deleted file mode 100644 index cc82d20..0000000 --- a/docs/section-cli-args.zh.adoc +++ /dev/null @@ -1,33 +0,0 @@ -[[cli-args]] -## CLI_ARGS 参考 - -[%autowidth,cols=2] -|=== -|启动参数 |说明 - -|--lowvram -|如果显存只有 4G (程序启动时会检测显存,自动开启) - -|--novram -|如果用了 __--lowvram__ 还是显存不够,直接改用 CPU 内存 - -|--cpu -|用 CPU 来跑,会很慢 - -|--use-pytorch-cross-attention -|如果不想用 xFormers,而改用 PyTorch 原生交叉注意力机制。在 WSL2 上可能会有更好的速度/显存占用表现,但在 Linux 宿主机上会明显更慢。 - -|--preview-method taesd -|使用基于 TAESD 的高质量实时预览。使用 Manager 会覆盖该参数(需在 Manager 界面中设置预览方式)。 - -|--front-end-version Comfy-Org/ComfyUI_frontend@latest -|使用最新版本的 ComfyUI 前端 - -|--fast -|使用实验性的高性能模式,对 40 系显卡 + CUDA 12.4 + 最新 PyTorch + fp8-e4m3fn 模型可达 40% 性能提升。但也有可能造成图像质量劣化。 -https://github.com/comfyanonymous/ComfyUI/commit/9953f22fce0ba899da0676a0b374e5d1f72bf259[来源] -|=== - -更多启动参数见 ComfyUI 的 -https://github.com/comfyanonymous/ComfyUI/blob/master/comfy/cli_args.py[cli_args.py] -。 diff --git a/docs/section-env-vars.adoc b/docs/section-env-vars.adoc deleted file mode 100644 index 9222c1e..0000000 --- a/docs/section-env-vars.adoc +++ /dev/null @@ -1,50 +0,0 @@ -[[env-vars]] -## Environment Variables Reference - -[cols="2,2,3"] -|=== -|Variable|Example Value|Memo - -|HTTP_PROXY + -HTTPS_PROXY -|http://localhost:1081 + -http://localhost:1081 -|Set HTTP proxy. - -|PIP_INDEX_URL -|'https://pypi.org/simple' -|Set mirror site for Python Package Index. - -|HF_ENDPOINT -|'https://huggingface.co' -|Set mirror site for HuggingFace Hub. - -|HF_TOKEN -|'hf_your_token' -|Set HuggingFace Access Token. -https://huggingface.co/settings/tokens[More] - -|HF_HUB_CACHE -|'/root/HuggingFaceHub' -|Set model download path for HuggingFace Hub. Default is -`~/.cache/huggingface/hub` . - -|HF_HUB_ENABLE_HF_TRANSFER -|1 -|Enable HuggingFace Hub experimental high-speed file transfers. -Only make sense if you have >1000Mbps and VERY STABLE connection (e.g. cloud server). -https://huggingface.co/docs/huggingface_hub/hf_transfer[More] - -|TORCH_CUDA_ARCH_LIST -|7.5 + -or + -'5.2+PTX;6.0;6.1+PTX;7.5;8.0;8.6;8.9+PTX' -|Build target for PyTorch and its extensions. -For most users, you only need to set one build target for your GPU. -https://arnon.dk/matching-sm-architectures-arch-and-gencode-for-various-nvidia-cards/[More] - -|CMAKE_ARGS -|'-DBUILD_opencv_world=ON -DWITH_CUDA=ON -DCUDA_FAST_MATH=ON -DWITH_CUBLAS=ON -DWITH_NVCUVID=ON' -|Build options for CMAKE for projects using CUDA. - -|=== diff --git a/docs/section-env-vars.zh.adoc b/docs/section-env-vars.zh.adoc deleted file mode 100644 index 2b85807..0000000 --- a/docs/section-env-vars.zh.adoc +++ /dev/null @@ -1,50 +0,0 @@ -[[env-vars]] -## 环境变量参考 - -[cols="2,2,3"] -|=== -|变量名|参考值|备注 - -|HTTP_PROXY + -HTTPS_PROXY -|http://localhost:1081 + -http://localhost:1081 -|设置 HTTP 代理。 - -|PIP_INDEX_URL -|'https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple' -|设置 PyPI 镜像站点。 - -|HF_ENDPOINT -|'https://hf-mirror.com' -|设置 HuggingFace 镜像站点。 - -|HF_TOKEN -|'hf_your_token' -|设置 HuggingFace -https://huggingface.co/settings/tokens[访问令牌] -(Access Token)。 - -|HF_HUB_CACHE -|'/root/HuggingFaceHub' -|为 HuggingFace Hub 设置模型下载目录。默认为 -`~/.cache/huggingface/hub` 。 - -|HF_HUB_ENABLE_HF_TRANSFER -|1 -|启用 HuggingFace Hub 实验性高速传输,仅对 >1000Mbps 且十分稳定的连接有意义(比如云服务器)。 -https://huggingface.co/docs/huggingface_hub/hf_transfer[文档] - -|TORCH_CUDA_ARCH_LIST -|7.5 + -或 + -'5.2+PTX;6.0;6.1+PTX;7.5;8.0;8.6;8.9+PTX' -|设置 PyTorch 及扩展的编译目标。 -对于大多数用户,仅需为自己的 GPU 设置一个目标。 -https://arnon.dk/matching-sm-architectures-arch-and-gencode-for-various-nvidia-cards/[参考] - -|CMAKE_ARGS -|'-DBUILD_opencv_world=ON -DWITH_CUDA=ON -DCUDA_FAST_MATH=ON -DWITH_CUBLAS=ON -DWITH_NVCUVID=ON' -|设置 CMAKE 编译参数,脚本中已默认设置,一般情况无需调整。 - -|===