KwaiVGI / LivePortrait

Bring portraits to life!
https://liveportrait.github.io
Other
13.06k stars 1.39k forks source link

Animals mode构建MultiScaleDeformableAttention报错 #265

Open JuLian1130 opened 3 months ago

JuLian1130 commented 3 months ago

运行python setup.py build install报错:

File "/root/miniconda3/envs/LivePortrait/lib/python3.9/site-packages/setuptools/__init__.py", line 104, in setup
    return distutils.core.setup(**attrs)
  File "/root/miniconda3/envs/LivePortrait/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 184, in setup
    return run_commands(dist)
  File "/root/miniconda3/envs/LivePortrait/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 200, in run_commands
    dist.run_commands()
  File "/root/miniconda3/envs/LivePortrait/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
    self.run_command(cmd)
  File "/root/miniconda3/envs/LivePortrait/lib/python3.9/site-packages/setuptools/dist.py", line 967, in run_command
    super().run_command(command)
  File "/root/miniconda3/envs/LivePortrait/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
    cmd_obj.run()
  File "/root/miniconda3/envs/LivePortrait/lib/python3.9/site-packages/setuptools/_distutils/command/build.py", line 132, in run
    self.run_command(cmd_name)
  File "/root/miniconda3/envs/LivePortrait/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command
    self.distribution.run_command(command)
  File "/root/miniconda3/envs/LivePortrait/lib/python3.9/site-packages/setuptools/dist.py", line 967, in run_command
    super().run_command(command)
  File "/root/miniconda3/envs/LivePortrait/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
    cmd_obj.run()
  File "/root/miniconda3/envs/LivePortrait/lib/python3.9/site-packages/setuptools/command/build_ext.py", line 91, in run
    _build_ext.run(self)
  File "/root/miniconda3/envs/LivePortrait/lib/python3.9/site-packages/setuptools/_distutils/command/build_ext.py", line 359, in run
    self.build_extensions()
  File "/root/miniconda3/envs/LivePortrait/lib/python3.9/site-packages/torch/utils/cpp_extension.py", line 522, in build_extensions
    _check_cuda_version(compiler_name, compiler_version)
  File "/root/miniconda3/envs/LivePortrait/lib/python3.9/site-packages/torch/utils/cpp_extension.py", line 417, in _check_cuda_version
    raise RuntimeError(CUDA_MISMATCH_MESSAGE.format(cuda_str_version, torch.version.cuda))
RuntimeError: 
The detected CUDA version (12.4) mismatches the version that was used to compile
PyTorch (11.8). Please make sure to use the same CUDA versions.

CUDA必须是11.8吗?其他版本如何安装?

zzzweakman commented 3 months ago

您好 @JuLian1130 ,您需要卸载cuda 11.8版本的torch,建议您重新创建一个环境,并下载对应您机器上cuda版本的torch(12.4),才能正确编译。

Hi @JuLian1130 , you need to uninstall the torch version that is installed with CUDA 11.8. I recommend that you create a new environment and download the torch version that matches the CUDA version (12.4) on your machine to ensure proper compilation.

zzzweakman commented 3 months ago

To experience the animals feature😸, Linux users must install the torch version that corresponds to their machine's CUDA version.