我正在尝试stylegan2
通过调用以下命令来运行该项目:
python run_generator.py generate-images --network=gdrive:networks/stylegan2-ffhq-config-f.pkl --seeds=6600-6625 --truncation-psi=0.5
.
但是,程序遇到了缺少Windows编译环境的异常,说:
RuntimeError: Could not find MSVC/GCC/CLANG installation on this computer. Check compiler_bindir_search_path list in "C:\my\work\cuda\stylegan2\dnnlib\tflib\custom_ops.py".
.
计算机是安装了 Windows 10 的计算机Visual Studio 2022
,所以我尝试了这篇文章并调用了以下命令,但问题仍然存在。
& 'C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Auxiliary\Build\vcvars64.bat'
我们非常感谢任何提示或建议。而且,如果您需要更多信息,请告诉我。
截屏:
(stylegan2) PS C:\my\work\cuda\stylegan2> & 'C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Auxiliary\Build\vcvars64.bat'
**********************************************************************
** Visual Studio 2022 Developer Command Prompt v17.1.0
** Copyright (c) 2021 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'
(stylegan2) PS C:\my\work\cuda\stylegan2>
(stylegan2) PS C:\my\work\cuda\stylegan2>
(stylegan2) PS C:\my\work\cuda\stylegan2> python run_generator.py generate-images --network=gdrive:networks/stylegan2-ffhq-config-f.pkl --seeds=6600-6625 --truncation-psi=0.5
2022-03-04 18:39:01.388490: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'cudart64_100.dll'; dlerror: cudart64_100.dll not found
2022-03-04 18:39:01.388733: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
Local submit - run_dir: results\00001-generate-images
dnnlib: Running run_generator.generate_images() on localhost...
Loading networks from "gdrive:networks/stylegan2-ffhq-config-f.pkl"...
2022-03-04 18:39:03.699975: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2
2022-03-04 18:39:03.705082: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library nvcuda.dll
2022-03-04 18:39:03.734052: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1639] Found device 0 with properties:
name: Quadro RTX 4000 major: 7 minor: 5 memoryClockRate(GHz): 1.38
pciBusID: 0000:01:00.0
2022-03-04 18:39:03.735242: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'cudart64_100.dll'; dlerror: cudart64_100.dll not found
2022-03-04 18:39:03.736541: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'cublas64_100.dll'; dlerror: cublas64_100.dll not found
2022-03-04 18:39:03.737605: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'cufft64_100.dll'; dlerror: cufft64_100.dll not found
2022-03-04 18:39:03.739084: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'curand64_100.dll'; dlerror: curand64_100.dll not found
2022-03-04 18:39:03.740038: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'cusolver64_100.dll'; dlerror: cusolver64_100.dll not found
2022-03-04 18:39:03.742081: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'cusparse64_100.dll'; dlerror: cusparse64_100.dll not found
2022-03-04 18:39:03.743019: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'cudnn64_7.dll'; dlerror: cudnn64_7.dll not found
2022-03-04 18:39:03.743130: W tensorflow/core/common_runtime/gpu/gpu_device.cc:1662] Cannot dlopen some GPU libraries. Please make sure the missing libraries mentioned above are installed properly if you would like to use GPU. Follow the guide at https://www.tensorflow.org/install/gpu for how to download and setup the required libraries for your platform.
Skipping registering GPU devices...
2022-03-04 18:39:03.851285: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1180] Device interconnect StreamExecutor with strength 1 edge matrix:
2022-03-04 18:39:03.851412: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1186] 0
2022-03-04 18:39:03.852704: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1199] 0: N
Setting up TensorFlow plugin "fused_bias_act.cu": Preprocessing... Failed!
Traceback (most recent call last):
File "run_generator.py", line 168, in <module>
main()
File "run_generator.py", line 163, in main
dnnlib.submit_run(sc, func_name_map[subcmd], **kwargs)
File "C:\my\work\cuda\stylegan2\dnnlib\submission\submit.py", line 343, in submit_run
return farm.submit(submit_config, host_run_dir)
File "C:\my\work\cuda\stylegan2\dnnlib\submission\internal\local.py", line 22, in submit
return run_wrapper(submit_config)
File "C:\my\work\cuda\stylegan2\dnnlib\submission\submit.py", line 280, in run_wrapper
run_func_obj(**submit_config.run_func_kwargs)
File "C:\my\work\cuda\stylegan2\run_generator.py", line 21, in generate_images
_G, _D, Gs = pretrained_networks.load_networks(network_pkl)
File "C:\my\work\cuda\stylegan2\pretrained_networks.py", line 76, in load_networks
G, D, Gs = pickle.load(stream, encoding='latin1')
File "C:\my\work\cuda\stylegan2\dnnlib\tflib\network.py", line 297, in __setstate__
self._init_graph()
File "C:\my\work\cuda\stylegan2\dnnlib\tflib\network.py", line 154, in _init_graph
out_expr = self._build_func(*self.input_templates, **build_kwargs)
File "<string>", line 491, in G_synthesis_stylegan2
File "<string>", line 455, in layer
File "<string>", line 99, in modulated_conv2d_layer
File "<string>", line 68, in apply_bias_act
File "C:\my\work\cuda\stylegan2\dnnlib\tflib\ops\fused_bias_act.py", line 68, in fused_bias_act
return impl_dict[impl](x=x, b=b, axis=axis, act=act, alpha=alpha, gain=gain)
File "C:\my\work\cuda\stylegan2\dnnlib\tflib\ops\fused_bias_act.py", line 122, in _fused_bias_act_cuda
cuda_kernel = _get_plugin().fused_bias_act
File "C:\my\work\cuda\stylegan2\dnnlib\tflib\ops\fused_bias_act.py", line 16, in _get_plugin
return custom_ops.get_plugin(os.path.splitext(__file__)[0] + '.cu')
File "C:\my\work\cuda\stylegan2\dnnlib\tflib\custom_ops.py", line 111, in get_plugin
_run_cmd(_prepare_nvcc_cli('"%s" --preprocess -o "%s" --keep --keep-dir "%s"' % (cuda_file, tmp_file, tmp_dir)))
File "C:\my\work\cuda\stylegan2\dnnlib\tflib\custom_ops.py", line 76, in _prepare_nvcc_cli
raise RuntimeError('Could not find MSVC/GCC/CLANG installation on this computer. Check compiler_bindir_search_path list in "%s".' % __file__)
RuntimeError: Could not find MSVC/GCC/CLANG installation on this computer. Check compiler_bindir_search_path list in "C:\my\work\cuda\stylegan2\dnnlib\tflib\custom_ops.py".
(stylegan2) PS C:\my\work\cuda\stylegan2>