menyifang / DCT-Net

Official implementation of "DCT-Net: Domain-Calibrated Translation for Portrait Stylization", SIGGRAPH 2022 (TOG); Multi-style cartoonization
Apache License 2.0
786 stars 77 forks source link

No CUDA runtime is found, using CUDA_HOME='/usr/local/cuda' #43

Open 1615070057 opened 1 year ago

1615070057 commented 1 year ago

这个问题困扰了很久, cuda环境没有问题, torch版本是1.13.1+cu116 No CUDA runtime is found, using CUDA_HOME='/usr/local/cuda' Traceback (most recent call last): File "generate_blendmodel.py", line 6, in from model import Generator File "/root/ljf/DCT-Net-main/source/stylegan2/model.py", line 12, in from op import FusedLeakyReLU, fused_leaky_relu, upfirdn2d, conv2d_gradfix File "/root/ljf/DCT-Net-main/source/stylegan2/op/init.py", line 1, in from .fused_act import FusedLeakyReLU, fused_leaky_relu File "/root/ljf/DCT-Net-main/source/stylegan2/op/fused_act.py", line 15, in os.path.join(module_path, "fused_bias_act_kernel.cu"), File "/root/xiaofei/miniconda3/envs/dctnet/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1296, in load keep_intermediates=keep_intermediates) File "/root/xiaofei/miniconda3/envs/dctnet/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1518, in _jit_compile is_standalone=is_standalone) File "/root/xiaofei/miniconda3/envs/dctnet/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1619, in _write_ninja_file_and_build_library is_standalone=is_standalone) File "/root/xiaofei/miniconda3/envs/dctnet/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 2014, in _write_ninja_file_to_build_library cuda_flags = common_cflags + COMMON_NVCC_FLAGS + _get_cuda_arch_flags() File "/root/xiaofei/miniconda3/envs/dctnet/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1780, in _get_cuda_arch_flags arch_list[-1] += '+PTX' IndexError: list index out of range

luotianhang commented 1 year ago

你这个要跑起来得下载cuda,使用cuda lib 你这里安装使用的是已经编译好的,

1615070057 commented 1 year ago

你这个要跑起来得下载cuda,使用cuda lib 你这里安装使用的是已经编译好的,

在train_localtoon.py中, 真实人脸的数据量你用了多少, 不会是ffhq的全部吧

zhanghongyong123456 commented 1 year ago

这个问题困扰了很久, cuda环境没有问题, torch版本是1.13.1+cu116 No CUDA runtime is found, using CUDA_HOME='/usr/local/cuda' Traceback (most recent call last): File "generate_blendmodel.py", line 6, in from model import Generator File "/root/ljf/DCT-Net-main/source/stylegan2/model.py", line 12, in from op import FusedLeakyReLU, fused_leaky_relu, upfirdn2d, conv2d_gradfix File "/root/ljf/DCT-Net-main/source/stylegan2/op/init.py", line 1, in from .fused_act import FusedLeakyReLU, fused_leaky_relu File "/root/ljf/DCT-Net-main/source/stylegan2/op/fused_act.py", line 15, in os.path.join(module_path, "fused_bias_act_kernel.cu"), File "/root/xiaofei/miniconda3/envs/dctnet/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1296, in load keep_intermediates=keep_intermediates) File "/root/xiaofei/miniconda3/envs/dctnet/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1518, in _jit_compile is_standalone=is_standalone) File "/root/xiaofei/miniconda3/envs/dctnet/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1619, in _write_ninja_file_and_build_library is_standalone=is_standalone) File "/root/xiaofei/miniconda3/envs/dctnet/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 2014, in _write_ninja_file_to_build_library cuda_flags = common_cflags + COMMON_NVCC_FLAGS + _get_cuda_arch_flags() File "/root/xiaofei/miniconda3/envs/dctnet/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1780, in _get_cuda_arch_flags arch_list[-1] += '+PTX' IndexError: list index out of range

I have same error,have you solve? I find issuses,
image