admin 管理员组

文章数量: 887019

error: command ‘C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.6\bin\nvcc’ failed with exit code 2

Comfyui-CatVTON插件作者建议安装环境是 python=3.10 Cuda=12.1 torch=2.1.2 而我的cuda版本是12.6、torch版本是2.3.1所以我想试试高版本环境下安装会不会发生错误,结果错误一堆我只好按要求重新创建新环境

安装时,请确保 PyTorch 的运行时 CUDA 版本与系统的 CUDA 版本一致;否则,可能会发生错误。
如果存在错位,解决方案是使用与系统版本匹配的 CUDA 版本重新安装 PyTorch。有关使用正确的 CUDA 版本安装 PyTorch
的更多信息,您可以访问 PyTorch 入门页面(了解以前的版本)。

记录命令信息中环境新添加的第三方库列如:tensorboard (from detectron2=0.6)、black (from detectron2=0.6)等信息、但是是conda环境管理看需求删除没用的包就行

Collecting tensorboard (from detectron2==0.6)
  Downloading https://pypi.tuna.tsinghua.edu/packages/d4/41/dccba8c5f955bc35b6110ff78574e4e5c8226ad62f08e732096c3861309b/tensorboard-2.17.1-py3-none-any.whl (5.5 MB)
     ---------------------------------------- 5.5/5.5 MB 1.3 MB/s eta 0:00:00
Requirement already satisfied: fvcore<0.1.6,>=0.1.5 in c:\newlyprogram\miniconda3\envs\cf\lib\site-packages (from detectron2==0.6) (0.1.5.post20221221)
Collecting iopath<0.1.10,>=0.1.7 (from detectron2==0.6)
  Downloading https://pypi.tuna.tsinghua.edu/packages/af/20/65dd9bd25a1eb7fa35b5ae38d289126af065f8a0c1f6a90564f4bff0f89d/iopath-0.1.9-py3-none-any.whl (27 kB)
Requirement already satisfied: omegaconf<2.4,>=2.1 in c:\newlyprogram\miniconda3\envs\cf\lib\site-packages (from detectron2==0.6) (2.3.0)
Requirement already satisfied: hydra-core>=1.1 in c:\newlyprogram\miniconda3\envs\cf\lib\site-packages (from detectron2==0.6) (1.3.2)
Collecting black (from detectron2==0.6)
  Downloading https://pypi.tuna.tsinghua.edu/packages/87/a0/6d2e4175ef364b8c4b64f8441ba041ed65c63ea1db2720d61494ac711c15/black-24.8.0-cp310-cp310-win_amd64.whl (1.4 MB)
     ---------------------------------------- 1.4/1.4 MB 2.2 MB/s eta 0:00:00
Installing collected packages: werkzeug, tensorboard-data-server, pathspec, mypy-extensions, markdown, cloudpickle, tensorboard, iopath, black, pycocotools, detectron2
  Attempting uninstall: iopath
    Found existing installation: iopath 0.1.10
    Uninstalling iopath-0.1.10:
      Successfully uninstalled iopath-0.1.10
  DEPRECATION: Legacy editable install of detectron2==0.6 from file:///C:/Aiart/ComfyUI/custom_nodes/Comfyui-CatVTON/Detectron2_DensePose/detectron2 (setup.py develop) is deprecated. pip 25.0 will enforce this behaviour change. A possible replacement is to add a pyproject.toml or enable --use-pep517, and use setuptools >= 64. If the resulting installation is not behaving as expected, try using --config-settings editable_mode=compat. Please consult the setuptools documentation for more information. Discussion can be found at https://github/pypa/pip/issues/11457
  Running setup.py develop for detectron2
  Running setup.py develop for detectron2
    error: subprocess-exited-with-error

    × python setup.py develop did not run successfully.
    │ exit code: 1
    ╰─> [104 lines of output]
        running develop
        C:\NewlyProgram\miniconda3\envs\cf\lib\site-packages\setuptools\command\develop.py:42: EasyInstallDeprecationWarning: easy_install command is deprecated.
        !!

                ********************************************************************************
                Please avoid running ``setup.py`` and ``easy_install``.
                Instead, use pypa/build, pypa/installer or other
                standards-based tools.

                See https://github/pypa/setuptools/issues/917 for details.
                ********************************************************************************

        !!
          easy_install.initialize_options(self)
        C:\NewlyProgram\miniconda3\envs\cf\lib\site-packages\setuptools\_distutils\cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated.
        !!

                ********************************************************************************
                Please avoid running ``setup.py`` directly.
                Instead, use pypa/build, pypa/installer or other
                standards-based tools.

                See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
                ********************************************************************************

        !!
          self.initialize_options()
        running egg_info
        creating detectron2.egg-info
        writing detectron2.egg-info\PKG-INFO
        writing dependency_links to detectron2.egg-info\dependency_links.txt
        writing requirements to detectron2.egg-info\requires.txt
        writing top-level names to detectron2.egg-info\top_level.txt
        writing manifest file 'detectron2.egg-info\SOURCES.txt'
        C:\NewlyProgram\miniconda3\envs\cf\lib\site-packages\torch\utils\cpp_extension.py:499: UserWarning: Attempted to use ninja as the BuildExtension backend but we could not find ninja.. Falling back to using the slow distutils backend.          warnings.warn(msg.format('we could not find ninja.'))
        reading manifest file 'detectron2.egg-info\SOURCES.txt'
        adding license file 'LICENSE'
        writing manifest file 'detectron2.egg-info\SOURCES.txt'
        running build_ext
        C:\NewlyProgram\miniconda3\envs\cf\lib\site-packages\torch\utils\cpp_extension.py:384: UserWarning: Error checking compiler version for cl: [WinError 2] 系统找不到指定的文件。
          warnings.warn(f'Error checking compiler version for {compiler}: {error}')
        C:\NewlyProgram\miniconda3\envs\cf\lib\site-packages\torch\utils\cpp_extension.py:418: UserWarning: The detected CUDA version (12.6) has a minor version mismatch with the version that was used to compile PyTorch (12.1). Most likely this shouldn't be a problem.
          warnings.warn(CUDA_MISMATCH_WARN.format(cuda_str_version, torch.version.cuda))
        building 'detectron2._C' extension
        creating build
        creating build\temp.win-amd64-cpython-310
        creating build\temp.win-amd64-cpython-310\Release
        creating build\temp.win-amd64-cpython-310\Release\Aiart
        creating build\temp.win-amd64-cpython-310\Release\Aiart\ComfyUI
        creating build\temp.win-amd64-cpython-310\Release\Aiart\ComfyUI\custom_nodes
        creating build\temp.win-amd64-cpython-310\Release\Aiart\ComfyUI\custom_nodes\Comfyui-CatVTON
        creating build\temp.win-amd64-cpython-310\Release\Aiart\ComfyUI\custom_nodes\Comfyui-CatVTON\Detectron2_DensePose
    "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.6\bin\nvcc" -c C:\Aiart\ComfyUI\custom_nodes\Comfyui-CatVTON\Detectron2_DensePose\detectron2\detectron2\layers\csrc\nms_rotated\nms_rotated_cuda.cu -o build\temp.win-amd64-cpython-310\Release\Aiart\ComfyUI\custom_nodes\Comfyui-CatVTON\Detectron2_DensePose\detectron2\detectron2\layers\csrc\nms_rotated\nms_rotated_cuda.obj -IC:\Aiart\ComfyUI\custom_nodes\Comfyui-CatVTON\Detectron2_DensePose\detectron2\detectron2\layers\csrc -IC:\NewlyProgram\miniconda3\envs\cf\lib\site-packages\torch\include -IC:\NewlyProgram\miniconda3\envs\cf\lib\site-packages\torch\include\torch\csrc\api\include -IC:\NewlyProgram\miniconda3\envs\cf\lib\site-packages\torch\include\TH -IC:\NewlyProgram\miniconda3\envs\cf\lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.6\include" -IC:\NewlyProgram\miniconda3\envs\cf\include -IC:\NewlyProgram\miniconda3\envs\cf\Include "-IC:\NewlyProgram\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\include" "-IC:\NewlyProgram\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\ATLMFC\include" "-IC:\NewlyProgram\Microsoft Visual Studio\2022\Community\VC\Auxiliary\VS\include" "-IC:\Windows Kits\10\include\10.0.22621.0\ucrt" "-IC:\Windows Kits\10\\include\10.0.22621.0\\um" "-IC:\Windows Kits\10\\include\10.0.22621.0\\shared" "-IC:\Windows Kits\10\\include\10.0.22621.0\\winrt" "-IC:\Windows Kits\10\\include\10.0.22621.0\\cppwinrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" -Xcudafe --diag_suppress=dll_interface_conflict_dllexport_assumed -Xcudafe --diag_suppress=dll_interface_conflict_none_assumed -Xcudafe --diag_suppress=field_without_dll_interface -Xcudafe --diag_suppress=base_class_has_different_dll_interface -Xcompiler /EHsc -Xcompiler /wd4068 -Xcompiler /wd4067 -Xcompiler /wd4624 -Xcompiler /wd4190 -Xcompiler /wd4018 -Xcompiler /wd4275 -Xcompiler /wd4267 -Xcompiler /wd4244 -Xcompiler /wd4251 -Xcompiler /wd4819 -Xcompiler /MD -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr -O3 -DCUDA_HAS_FP16=1 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_89,code=compute_89 -gencode=arch=compute_89,code=sm_89 -std=c++17 --use-local-env
    C:\Aiart\ComfyUI\custom_nodes\Comfyui-CatVTON\Detectron2_DensePose\detectron2\detectron2\layers\csrc\nms_rotated\nms_rotated_cuda.cu(14): error: name must be a namespace name
      using namespace detectron2;
                      ^

    C:\Aiart\ComfyUI\custom_nodes\Comfyui-CatVTON\Detectron2_DensePose\detectron2\detectron2\layers\csrc\nms_rotated\nms_rotated_cuda.cu(68): error: identifier "single_box_iou_rotated" is undefined
            if (single_box_iou_rotated<T>(cur_box, block_boxes &

本文标签: 环境 工作流 节点 版本 国内