apex安装

 安装过程复杂曲折,网上说的很多办法,貌似成功了,实际还是没起作用。

先说成功过程,执行下面命令,安装成功(当然,前提是你要先配置好编译环境):

(我的环境:windows10 、embeded python3.11.9 、pytorch version: 2.5.1+cu124、RTX2080ti)

git clone https://github.com/NVIDIA/apex.gitcd apexcurl -L "https://github.com/NVIDIA/apex/files/14844602/windows_support.patch" | git applypip install -v --disable-pip-version-check --no-cache-dir --no-build-isolation --config-settings "--build-option=--cpp_ext" --config-settings "--build-option=--cuda_ext" .

这个信息,不知道是否说明我的显卡是2系(TORCH_CUDA_ARCH_LIST=7.5)?

成功安装的apex,在卸载apex,你会发现安装的apex含有下面部件: 

---------------下面只是曲折过程,如无必要就不要浪费时间往下看了--------------

1、在comfyUI中,我安装了54个节点,只在安装了节点ComfyUI-PuLID-Flux-Enhanced后,在没有安装apex时,会有如下提示:

于是便想着要安装APEX,看看会不会速度快点,经过了漫长而曲折的过程,终于安装成功,但效果好像没什么变化。

从apex上述介绍中,是否表示,大多时候在Pytorch中已含相关代码?所以,究竟是否值得再花大力气去安装apex呢?还有待进一步探究。

我的环境是python3.11.9 、pytorch version: 2.5.1+cu124

2、首先是报如下错误: 

  building 'amp_C' extensionH:\ComfyUI_cp3.11.9\python_embeded\Lib\site-packages\torch\utils\cpp_extension.py:1964: UserWarning: TORCH_CUDA_ARCH_LIST is not set, all archs for visible cards are included for compilation.If this is not desired, please set os.environ['TORCH_CUDA_ARCH_LIST'].warnings.warn(Emitting ninja build file H:\ComfyUI_cp3.11.9\apex\build\temp.win-amd64-cpython-311\Release\build.ninja...Compiling objects...Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)[1/7] C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4\bin\nvcc --generate-dependencies-with-compile --dependency-output H:\ComfyUI_cp3.11.9\apex\build\temp.win-amd64-cpython-311\Release\csrc/multi_tensor_scale_kernel.obj.d -std=c++17 --use-local-env -Xcompiler /MD -Xcompiler /wd4819 -Xcompiler /wd4251 -Xcompiler /wd4244 -Xcompiler /wd4267 -Xcompiler /wd4275 -Xcompiler /wd4018 -Xcompiler /wd4190 -Xcompiler /wd4624 -Xcompiler /wd4067 -Xcompiler /wd4068 -Xcompiler /EHsc -Xcudafe --diag_suppress=base_class_has_different_dll_interface -Xcudafe --diag_suppress=field_without_dll_interface -Xcudafe --diag_suppress=dll_interface_conflict_none_assumed -Xcudafe --diag_suppress=dll_interface_conflict_dllexport_assumed -IH:\ComfyUI_cp3.11.9\python_embeded\Lib\site-packages\torch\include -IH:\ComfyUI_cp3.11.9\python_embeded\Lib\site-packages\torch\include\torch\csrc\api\include -IH:\ComfyUI_cp3.11.9\python_embeded\Lib\site-packages\torch\include\TH -IH:\ComfyUI_cp3.11.9\python_embeded\Lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4\include" -IH:\ComfyUI_cp3.11.9\python_embeded\include -IH:\ComfyUI_cp3.11.9\python_embeded\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.40.33807\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\cppwinrt" -c H:\ComfyUI_cp3.11.9\apex\csrc\multi_tensor_scale_kernel.cu -o H:\ComfyUI_cp3.11.9\apex\build\temp.win-amd64-cpython-311\Release\csrc/multi_tensor_scale_kernel.obj -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr -lineinfo -O3 --use_fast_math -DVERSION_GE_1_1 -DVERSION_GE_1_3 -DVERSION_GE_1_5 -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=amp_C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_75,code=compute_75 -gencode=arch=compute_75,code=sm_75FAILED: H:/ComfyUI_cp3.11.9/apex/build/temp.win-amd64-cpython-311/Release/csrc/multi_tensor_scale_kernel.objC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4\bin\nvcc --generate-dependencies-with-compile --dependency-output H:\ComfyUI_cp3.11.9\apex\build\temp.win-amd64-cpython-311\Release\csrc/multi_tensor_scale_kernel.obj.d -std=c++17 --use-local-env -Xcompiler /MD -Xcompiler /wd4819 -Xcompiler /wd4251 -Xcompiler /wd4244 -Xcompiler /wd4267 -Xcompiler /wd4275 -Xcompiler /wd4018 -Xcompiler /wd4190 -Xcompiler /wd4624 -Xcompiler /wd4067 -Xcompiler /wd4068 -Xcompiler /EHsc -Xcudafe --diag_suppress=base_class_has_different_dll_interface -Xcudafe --diag_suppress=field_without_dll_interface -Xcudafe --diag_suppress=dll_interface_conflict_none_assumed -Xcudafe --diag_suppress=dll_interface_conflict_dllexport_assumed -IH:\ComfyUI_cp3.11.9\python_embeded\Lib\site-packages\torch\include -IH:\ComfyUI_cp3.11.9\python_embeded\Lib\site-packages\torch\include\torch\csrc\api\include -IH:\ComfyUI_cp3.11.9\python_embeded\Lib\site-packages\torch\include\TH -IH:\ComfyUI_cp3.11.9\python_embeded\Lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4\include" -IH:\ComfyUI_cp3.11.9\python_embeded\include -IH:\ComfyUI_cp3.11.9\python_embeded\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.40.33807\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\cppwinrt" -c H:\ComfyUI_cp3.11.9\apex\csrc\multi_tensor_scale_kernel.cu -o H:\ComfyUI_cp3.11.9\apex\build\temp.win-amd64-cpython-311\Release\csrc/multi_tensor_scale_kernel.obj -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr -lineinfo -O3 --use_fast_math -DVERSION_GE_1_1 -DVERSION_GE_1_3 -DVERSION_GE_1_5 -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=amp_C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_75,code=compute_75 -gencode=arch=compute_75,code=sm_75C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/Tools/MSVC/14.40.33807/include\type_traits(1167): error: static assertion failed with "You've instantiated std::aligned_storage<Len, Align> with an extended alignment (in other words, Align > alignof(max_align_t)). Before VS 2017 15.8, the member "type" would non-conformingly have an alignment of only alignof(max_align_t). VS 2017 15.8 was fixed to handle this correctly, but the fix inherently changes layout and breaks binary compatibility (*only* for uses of aligned_storage with extended alignments). To suppress this error, please define either (1) _ENABLE_EXTENDED_ALIGNED_STORAGE to confirm that you want a type with an extended alignment, or (2) _DISABLE_EXTENDED_ALIGNED_STORAGE to get the old non-conforming behavior."static_assert(_Always_false<_Aligned>,^detected during:instantiation of class "std::_Aligned<_Len, _Align, double, false> [with _Len=16ULL, _Align=16ULL]" at line 1185instantiation of class "std::_Aligned<_Len, _Align, int, false> [with _Len=16ULL, _Align=16ULL]" at line 1192instantiation of class "std::_Aligned<_Len, _Align, short, false> [with _Len=16ULL, _Align=16ULL]" at line 1199instantiation of class "std::_Aligned<_Len, _Align, char, false> [with _Len=16ULL, _Align=16ULL]" at line 1207instantiation of class "std::_Aligned_storage<_Len, _Align> [with _Len=16ULL, _Align=16ULL]" at line 1211instantiation of type "std::_Aligned_storage_t<16ULL, 16ULL>" at line 1215instantiation of class "std::aligned_storage<_Len, _Align> [with _Len=16ULL, _Align=16ULL]" at line 25 of H:\ComfyUI_cp3.11.9\apex\csrc\multi_tensor_scale_kernel.cuinstantiation of "void load_store(T *, T *, int, int) [with T=float]" at line 64 of H:\ComfyUI_cp3.11.9\apex\csrc\multi_tensor_scale_kernel.cuinstantiation of "void ScaleFunctor<in_t, out_t>::operator()(int, volatile int *, TensorListMetadata<2> &, float) [with in_t=float, out_t=float]" at line 38 of H:\ComfyUI_cp3.11.9\apex\csrc\multi_tensor_apply.cuhinstantiation of "void multi_tensor_apply_kernel(int64_t, volatile int *, T, U, ArgTypes...) [with T=TensorListMetadata<2>, U=ScaleFunctor<float, float>, ArgTypes=<float>]" at line 109 of H:\ComfyUI_cp3.11.9\apex\csrc\multi_tensor_apply.cuhinstantiation of "void multi_tensor_apply<depth,T,ArgTypes...>(int64_t, int64_t, const at::Tensor &, const std::vector<std::vector<at::Tensor, std::allocator<at::Tensor>>, std::allocator<std::vector<at::Tensor, std::allocator<at::Tensor>>>> &, T, ArgTypes...) [with depth=2, T=ScaleFunctor<float, float>, ArgTypes=<float>]" at line 124 of H:\ComfyUI_cp3.11.9\apex\csrc\multi_tensor_scale_kernel.cu1 error detected in the compilation of "H:/ComfyUI_cp3.11.9/apex/csrc/multi_tensor_scale_kernel.cu".multi_tensor_scale_kernel.cu

 针对出现的第一个错误:

H:\ComfyUI_cp3.11.9\python_embeded\Lib\site-packages\torch\utils\cpp_extension.py:1964: UserWarning: TORCH_CUDA_ARCH_LIST is not set, all archs for visible cards are included for compilation.If this is not desired, please set os.environ['TORCH_CUDA_ARCH_LIST'].

参考文章《如何设置 TORCH_CUDA_ARCH_LIST 环境变量以优化 PyTorch 性能》,我的显卡是RTX2080Ti,所以设置:

set TORCH_CUDA_ARCH_LIST=7.5

再次编译,错误信息如下:

  已完成代码的生成building 'amp_C' extensionEmitting ninja build file H:\ComfyUI_cp3.11.9\apex\build\temp.win-amd64-cpython-311\Release\build.ninja...Compiling objects...Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)[1/14] C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4\bin\nvcc --generate-dependencies-with-compile --dependency-output H:\ComfyUI_cp3.11.9\apex\build\temp.win-amd64-cpython-311\Release\csrc/multi_tensor_l2norm_scale_kernel.obj.d -std=c++17 --use-local-env -Xcompiler /MD -Xcompiler /wd4819 -Xcompiler /wd4251 -Xcompiler /wd4244 -Xcompiler /wd4267 -Xcompiler /wd4275 -Xcompiler /wd4018 -Xcompiler /wd4190 -Xcompiler /wd4624 -Xcompiler /wd4067 -Xcompiler /wd4068 -Xcompiler /EHsc -Xcudafe --diag_suppress=base_class_has_different_dll_interface -Xcudafe --diag_suppress=field_without_dll_interface -Xcudafe --diag_suppress=dll_interface_conflict_none_assumed -Xcudafe --diag_suppress=dll_interface_conflict_dllexport_assumed -IH:\ComfyUI_cp3.11.9\python_embeded\Lib\site-packages\torch\include -IH:\ComfyUI_cp3.11.9\python_embeded\Lib\site-packages\torch\include\torch\csrc\api\include -IH:\ComfyUI_cp3.11.9\python_embeded\Lib\site-packages\torch\include\TH -IH:\ComfyUI_cp3.11.9\python_embeded\Lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4\include" -IH:\ComfyUI_cp3.11.9\python_embeded\include -IH:\ComfyUI_cp3.11.9\python_embeded\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.40.33807\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\cppwinrt" -c H:\ComfyUI_cp3.11.9\apex\csrc\multi_tensor_l2norm_scale_kernel.cu -o H:\ComfyUI_cp3.11.9\apex\build\temp.win-amd64-cpython-311\Release\csrc/multi_tensor_l2norm_scale_kernel.obj -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr -lineinfo -O3 --use_fast_math -DVERSION_GE_1_1 -DVERSION_GE_1_3 -DVERSION_GE_1_5 -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=amp_C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_75,code=sm_75FAILED: H:/ComfyUI_cp3.11.9/apex/build/temp.win-amd64-cpython-311/Release/csrc/multi_tensor_l2norm_scale_kernel.objC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4\bin\nvcc --generate-dependencies-with-compile --dependency-output H:\ComfyUI_cp3.11.9\apex\build\temp.win-amd64-cpython-311\Release\csrc/multi_tensor_l2norm_scale_kernel.obj.d -std=c++17 --use-local-env -Xcompiler /MD -Xcompiler /wd4819 -Xcompiler /wd4251 -Xcompiler /wd4244 -Xcompiler /wd4267 -Xcompiler /wd4275 -Xcompiler /wd4018 -Xcompiler /wd4190 -Xcompiler /wd4624 -Xcompiler /wd4067 -Xcompiler /wd4068 -Xcompiler /EHsc -Xcudafe --diag_suppress=base_class_has_different_dll_interface -Xcudafe --diag_suppress=field_without_dll_interface -Xcudafe --diag_suppress=dll_interface_conflict_none_assumed -Xcudafe --diag_suppress=dll_interface_conflict_dllexport_assumed -IH:\ComfyUI_cp3.11.9\python_embeded\Lib\site-packages\torch\include -IH:\ComfyUI_cp3.11.9\python_embeded\Lib\site-packages\torch\include\torch\csrc\api\include -IH:\ComfyUI_cp3.11.9\python_embeded\Lib\site-packages\torch\include\TH -IH:\ComfyUI_cp3.11.9\python_embeded\Lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4\include" -IH:\ComfyUI_cp3.11.9\python_embeded\include -IH:\ComfyUI_cp3.11.9\python_embeded\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.40.33807\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\cppwinrt" -c H:\ComfyUI_cp3.11.9\apex\csrc\multi_tensor_l2norm_scale_kernel.cu -o H:\ComfyUI_cp3.11.9\apex\build\temp.win-amd64-cpython-311\Release\csrc/multi_tensor_l2norm_scale_kernel.obj -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr -lineinfo -O3 --use_fast_math -DVERSION_GE_1_1 -DVERSION_GE_1_3 -DVERSION_GE_1_5 -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=amp_C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_75,code=sm_75C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/Tools/MSVC/14.40.33807/include\type_traits(1167): error: static assertion failed with "You've instantiated std::aligned_storage<Len, Align> with an extended alignment (in other words, Align > alignof(max_align_t)). Before VS 2017 15.8, the member "type" would non-conformingly have an alignment of only alignof(max_align_t). VS 2017 15.8 was fixed to handle this correctly, but the fix inherently changes layout and breaks binary compatibility (*only* for uses of aligned_storage with extended alignments). To suppress this error, please define either (1) _ENABLE_EXTENDED_ALIGNED_STORAGE to confirm that you want a type with an extended alignment, or (2) _DISABLE_EXTENDED_ALIGNED_STORAGE to get the old non-conforming behavior."static_assert(_Always_false<_Aligned>,^detected during:instantiation of class "std::_Aligned<_Len, _Align, double, false> [with _Len=16ULL, _Align=16ULL]" at line 1185instantiation of class "std::_Aligned<_Len, _Align, int, false> [with _Len=16ULL, _Align=16ULL]" at line 1192instantiation of class "std::_Aligned<_Len, _Align, short, false> [with _Len=16ULL, _Align=16ULL]" at line 1199instantiation of class "std::_Aligned<_Len, _Align, char, false> [with _Len=16ULL, _Align=16ULL]" at line 1207instantiation of class "std::_Aligned_storage<_Len, _Align> [with _Len=16ULL, _Align=16ULL]" at line 1211instantiation of type "std::_Aligned_storage_t<16ULL, 16ULL>" at line 1215instantiation of class "std::aligned_storage<_Len, _Align> [with _Len=16ULL, _Align=16ULL]" at line 24 of H:\ComfyUI_cp3.11.9\apex\csrc\multi_tensor_l2norm_scale_kernel.cuinstantiation of "void load_store(T *, T *, int, int) [with T=float]" at line 75 of H:\ComfyUI_cp3.11.9\apex\csrc\multi_tensor_l2norm_scale_kernel.cuinstantiation of "void L2NormScaleFunctor<in_t, out_t>::operator()(int, volatile int *, TensorListMetadata<2> &, float *, float *, float, __nv_bool, int) [with in_t=float, out_t=float]" at line 38 of H:\ComfyUI_cp3.11.9\apex\csrc\multi_tensor_apply.cuhinstantiation of "void multi_tensor_apply_kernel(int64_t, volatile int *, T, U, ArgTypes...) [with T=TensorListMetadata<2>, U=L2NormScaleFunctor<float, float>, ArgTypes=<float *, float *, float, __nv_bool, int>]" at line 109 of H:\ComfyUI_cp3.11.9\apex\csrc\multi_tensor_apply.cuhinstantiation of "void multi_tensor_apply<depth,T,ArgTypes...>(int64_t, int64_t, const at::Tensor &, const std::vector<std::vector<at::Tensor, std::allocator<at::Tensor>>, std::allocator<std::vector<at::Tensor, std::allocator<at::Tensor>>>> &, T, ArgTypes...) [with depth=2, T=L2NormScaleFunctor<float, float>, ArgTypes=<float *, float *, float, __nv_bool, int>]" at line 292 of H:\ComfyUI_cp3.11.9\apex\csrc\multi_tensor_l2norm_scale_kernel.cu1 error detected in the compilation of "H:/ComfyUI_cp3.11.9/apex/csrc/multi_tensor_l2norm_scale_kernel.cu".multi_tensor_l2norm_scale_kernel.cu

3、无奈之下,想着试试 torch.__version__  = 2.5.1+cpu时,错误信息提示如下:

H:\ComfyUI_cp3.11.9\apex>..\python_embeded\python -m pip install -v --disable-pip-version-check --no-cache-dir --no-build-isolation --config-settings "--build-option=--cpp_ext" --config-settings "--build-option=--cuda_ext" .
Using pip 24.3.1 from H:\ComfyUI_cp3.11.9\python_embeded\Lib\site-packages\pip (python 3.11)
Processing h:\comfyui_cp3.11.9\apexRunning command Preparing metadata (pyproject.toml)Warning: Torch did not find available GPUs on this system.If your intention is to cross-compile, this is not an error.By default, Apex will cross-compile for Pascal (compute capabilities 6.0, 6.1, 6.2),Volta (compute capability 7.0), Turing (compute capability 7.5),and, if the CUDA version is >= 11.0, Ampere (compute capability 8.0).If you wish to cross-compile for a single specific architecture,export TORCH_CUDA_ARCH_LIST="compute capability" before running setup.py.torch.__version__  = 2.5.1+cpu

4、文章《NVIDIA APEX安装完全指南及Megatron-LM/Pytorch运行问题解决》 

切换到不同的分支:从 GitHub - NVIDIA/apex: A PyTorch Extension: Tools for easy mixed precision and distributed training in Pytorch 的标签页中,可以知道发布的版本,不至于在众多的分支中无所适从。

 切换到分支:24.04.01-devel

不带参数,显示目前所选分支,git clone的初始分支为master:

git checkout 24.04.01-devel

依然报错。

5、参考文章《使用 Visual Studio 2022、CUDA 12.1 和 PyTorch 2.2.2 进行 Windows 编译的最新补丁 #1792》

以下只是想完全照抄原文,使用虚拟环境编译,最终因为我是使用的embeddable python,需要搭建太多东西,放弃,以下只是记录尝试过程中的一些知识。

-------------------------------------------------------------------------------------------------------

文章里的路径,与我的环境并不一样,所以使用dir /x 查看短路径,并且只能一级一级查看:

最终,我的路径如下: 

cmd /c 'C:\PROGRA~2\MICROS~3\2022\BUILDT~1\VC\AUXILI~1\Build\VCVARS~1.BAT amd64 & busybox64u sh -ilX'

将环境中文件复制到windows文件夹,文件夹需要双 \\ :

建立的虚拟环境,以及git clone 的路径,在“C:\Users\你的用户名” 路径下。

----------------------------------------------------------------------------------------

受文章启发,直接在我的环境中再次安装(执行下面命令生成的whl要比文章头的命令较小,不知道是否因为设置了TORCH_CUDA_ARCH_LIST=7.5只针对我的RTX2080ti):

git clone https://github.com/NVIDIA/apex.gitcd apexcurl -L "https://github.com/NVIDIA/apex/files/14844602/windows_support.patch" | git applyset DISTUTILS_USE_SDK=1set TORCH_CUDA_ARCH_LIST=7.5pip install -v --disable-pip-version-check --no-cache-dir --no-build-isolation --config-settings "--build-option=--cpp_ext" --config-settings "--build-option=--cuda_ext" .

经过十几分钟,安装成功(如欲将编译成功的whl文件保存下来,需要在编译成功,要进行安装时,按下暂停键Pause,从缓存路径将文件复制,否则,装完后,文件会被删除)。 

成功后,再次启动comfyUI,没有了开始提到的信息。

编译成功后,缓存里面有个文件origin.json,有如下内容,不知道与文章中提到的url有关联?:

{"dir_info": {}, "url": "file:///H:/ComfyUI_cp3.11.9/apex"}

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/bicheng/66534.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

基于FPGA的出租车里程时间计费器

基于FPGA的出租车里程时间计费器 功能描述一、系统框图二、verilog代码里程增加模块时间增加模块计算价格模块上板视频演示 总结 功能描述 &#xff08;1&#xff09;&#xff1b;里程计费功能&#xff1a;3公里以内起步价8元&#xff0c;超过3公里后每公里2元&#xff0c;其中…

jdk8升级JDK21(Springboot2.7.18升级Springboot3.4.0)

目录 背景&#xff1a; 一、maven升级 二、代码改造 2.1 javax替换为jakarta 2.2 swagger2升级swagger3相关更新 2.2.1 新增SpringDocConfig配置类 2.2.2 全局代码更新 2.2.3 全局代码替换&#xff08;普通正则替换&#xff09; 2.3 Mybatis Plus升级 2.4 logback.xm…

AI赋能跨境电商:魔珐科技3D数字人破解出海痛点

跨境出海进入狂飙时代&#xff0c;AI应用正在深度渗透并重塑着跨境电商产业链的每一个环节&#xff0c;迎来了发展的高光时刻。生成式AI时代的大幕拉开&#xff0c;AI工具快速迭代&#xff0c;为跨境电商行业的突破与飞跃带来了无限可能性。 由于跨境电商业务自身特性鲜明&…

【HarmonyOS NEXT】鸿蒙应用实现屏幕录制详解和源码

【HarmonyOS NEXT】鸿蒙应用实现屏幕录制详解和源码 一、前言 官方文档关于屏幕录制的API和示例介绍获取简单和突兀。使用起来会让上手程度变高。所以特意开篇文章&#xff0c;讲解屏幕录制的使用。官方文档参见&#xff1a;使用AVScreenCaptureRecorder录屏写文件(ArkTS) 二…

Android - NDK:编译可执行程序在android设备上运行

在android开发中&#xff0c;调试时会把C代码直接编译成可执行程序&#xff0c;运行在android设备上以确认其功能是否正常。 1、基于NDK编译可执行文件 2、push到 /data/local/tmp目录下 3、设置权限&#xff0c;执行。 ndk工程中build.gradle设置 groovy plugins {id com.a…

用matlab调用realterm一次性发送16进制数

realterm采用PutString接口进行发送&#xff0c;需要注意的是发送的16进制数前面要加入0x标志。只有这样&#xff0c;realterm才能将输入的字符串识别为16进制数的形式。 另外,PutString函数支持两个参数输入&#xff0c;第一个参数为字符串&#xff0c;第二个参数为发送形式&…

Python3刷算法来呀,贪心系列题单

1.7号题单 1、​​​​​​k次取反后最大值 2、柠檬水找零 3、分发糖果 示例 1&#xff1a; 输入&#xff1a;ratings [1,0,2] 输出&#xff1a;5 解释&#xff1a;你可以分别给第一个、第二个、第三个孩子分发 2、1、2 颗糖果。示例 2&#xff1a; 输入&#xff1a;ratings…

el-table拖拽表格

1、拖拽插件安装 npm i -S vuedraggable // vuedraggable依赖Sortable.js&#xff0c;我们可以直接引入Sortable使用Sortable的特性。 // vuedraggable是Sortable的一种加强&#xff0c;实现组件化的思想&#xff0c;可以结合Vue&#xff0c;使用起来更方便。 2、引入拖拽函数…

Unity学习笔记(七)使用状态机重构角色攻击

前言 本文为Udemy课程The Ultimate Guide to Creating an RPG Game in Unity学习笔记 攻击状态重构 首先我们重构攻击状态的动画 之前的动画&#xff0c;我们是使用状态(isAttacking)攻击次数(comboCounter)完成动画的过渡&#xff0c;这样虽然能完成功能&#xff0c;但是如…

Windows10环境下安装RabbitMq折腾记

最近有个老项目需要迁移到windows10环境&#xff0c;用的是比较老的rabbitmq安装包&#xff0c;如下所示。经过一番折腾&#xff0c;死活服务起不来&#xff0c;最终果断放弃老版本启用新版本。现在把折腾过程记录下&#xff1a; 一、安装erlang 安装完成后的目录结构&#xff…

了解RabbitMQ中的Exchange:深入解析与实践应用

在分布式系统设计中&#xff0c;消息队列&#xff08;Message Queue&#xff09;扮演着至关重要的角色&#xff0c;而RabbitMQ作为开源消息代理软件的佼佼者&#xff0c;以其高性能、高可用性和丰富的功能特性&#xff0c;成为了众多开发者的首选。在RabbitMQ的核心组件中&…

分布式主键ID生成方式-snowflake雪花算法

这里写自定义目录标题 一、业务场景二、技术选型1、UUID方案2、Leaf方案-美团&#xff08;基于数据库自增id&#xff09;3、Snowflake雪花算法方案 总结 一、业务场景 大量的业务数据需要保存到数据库中&#xff0c;原来的单库单表的方式扛不住大数据量、高并发&#xff0c;需…

Linux 系统搭建网络传输环境汇总

Ubuntu 系统搭建 TFTP 服务器 1. 创建 /home/username/workspace/tftp 目录并赋予最大权限&#xff0c;username 是自己用户名 sudo mkdir -p /home/username/workspace/tftp sudo chmod 777 /home/username/workspace/tftp 2. 安装 tftp-hpa&#xff08; 客户端软件包&#x…

“AI智慧语言训练系统:让语言学习变得更简单有趣

大家好&#xff0c;我是你们的老朋友&#xff0c;一个热衷于探讨科技与教育结合的产品经理。今天&#xff0c;我想和大家聊聊一个让语言学习变得不再头疼的话题——AI智慧语言训练系统。这个系统可是我们语言学习者的福音&#xff0c;让我们一起来揭开它的神秘面纱吧&#xff0…

线性代数考研笔记

行列式 背景 分子行列式&#xff1a;求哪个未知数&#xff0c;就把b1&#xff0c;b2放在对应的位置 分母行列式&#xff1a;系数对应写即可 全排列与逆序数 1 3 2&#xff1a;逆序数为1 奇排列 1 2 3&#xff1a;逆序数为0 偶排列 将 1 3 2 只需将3 2交换1次就可以还原原…

精选2款.NET开源的博客系统

前言 博客系统是一个便于用户创建、管理和分享博客内容的在线平台&#xff0c;今天大姚给大家分享2款.NET开源的博客系统。 StarBlog StarBlog是一个支持Markdown导入的开源博客系统&#xff0c;后端基于最新的.Net6和Asp.Net Core框架&#xff0c;遵循RESTFul接口规范&…

关于FPGA中添加FIR IP核(采用了GOWIN EDA)

文章目录 前言一、IP核二、MATLAB文件三、导出系数COE文件1.设计滤波器2.用官方的matlab代码或者直接用文本文件 四、进行模块化设计源文件 前言 FIR滤波器的特点是其输出信号是输入信号的加权和&#xff0c;权值由滤波器的系数决定。每个系数代表了滤波器在特定延迟位置上的“…

51单片机——中断(重点)

学习51单片机的重点及难点主要有中断、定时器、串口等内容&#xff0c;这部分内容一定要认真掌握&#xff0c;这部分没有学好就不能说学会了51单片机 1、中断系统 1.1 概念 中断是为使单片机具有对外部或内部随机发生的事件实时处理而设置的&#xff0c;中断功能的存在&#…

VVenC 编码器源码结构与接口函数介绍

VVenC VVenC&#xff08;Fraunhofer Versatile Video Encoder&#xff09;是由德国弗劳恩霍夫海因里希研究所&#xff08;Fraunhofer Heinrich Hertz Institute, HHI&#xff09;开发的一个开源的高效视频编码器。它实现了最新的视频编码标准——Versatile Video Coding (VVC)…

耗时一天,我用AI开发了AI小程序

小码哥从事前后端开发近十年&#xff0c;但是随着技术的更新迭代&#xff0c;有时候没有时间和精力去优化UI、实现一些前后端功能&#xff0c;以及解决一些bug。特别是我想开发小码哥AI的移动端&#xff0c;但觉得自己没有那么多时间去研究移动端了&#xff0c;准备放弃了&…