Closed AdrienBaude closed 3 years ago
Hi, @AdrienBaude unfortunately I have not tested the code on Windows and the problem seems to come from the cuda conflicts. Please check the issue https://github.com/anvoynov/GANLatentDiscovery/issues/23 Maybe that would be helpful?
Hi,
I am trying to use this library with a StyleGAN2 model. I have Windows 10, python 3.6, cuda 10.0, visual studio 2017 and torch 1.4.
When I run the command, I get :
`python run_train.py --gan_type StyleGAN2 --gan_weights network-snapshot-002083.pkl --deformator ortho --out rectification_results_dir C:\Users\dummy\AppData\Local\Programs\Python\Python38\lib\site-packages\setuptools\distutils_patch.py:25: UserWarning: Distutils was imported before Setuptools. This usage is discouraged and may exhibit undesirable behaviors or errors. Please use Setuptools' objects directly or at least import Setuptools first. warnings.warn( C:\Users\dummy\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\utils\cpp_extension.py:287: UserWarning: Error checking compiler version for cl: 'utf-8' codec can't decode byte 0xff in position 54: invalid start byte warnings.warn('Error checking compiler version for {}: {}'.format(compiler, error)) StyleGAN2 load fail: Error building extension 'fused': [1/2] C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\bin\nvcc -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 /wd4190 -Xcompiler /wd4018 -Xcompiler /wd4275 -Xcompiler /wd4267 -Xcompiler /wd4244 -Xcompiler /wd4251 -Xcompiler /wd4819 -Xcompiler /MD -DTORCH_EXTENSION_NAME=fused -DTORCH_API_INCLUDE_EXTENSION_H -IC:\Users\dummy\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\include -IC:\Users\dummy\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\include\torch\csrc\api\include -IC:\Users\dummy\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\include\TH -IC:\Users\dummy\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\include" -IC:\Users\dummy\AppData\Local\Programs\Python\Python38\Include -D_GLIBCXX_USE_CXX11_ABI=0 -DCUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -DCUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr -gencode=arch=compute_75,code=sm_75 -c I:\GANLatentDiscovery-master\models\StyleGAN2\op\fused_bias_act_kernel.cu -o fused_bias_act_kernel.cuda.o FAILED: fused_bias_act_kernel.cuda.o C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\bin\nvcc -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 /wd4190 -Xcompiler /wd4018 -Xcompiler /wd4275 -Xcompiler /wd4267 -Xcompiler /wd4244 -Xcompiler /wd4251 -Xcompiler /wd4819 -Xcompiler /MD -DTORCH_EXTENSION_NAME=fused -DTORCH_API_INCLUDE_EXTENSION_H -IC:\Users\dummy\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\include -IC:\Users\dummy\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\include\torch\csrc\api\include -IC:\Users\dummy\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\include\TH -IC:\Users\dummy\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\include" -IC:\Users\dummy\AppData\Local\Programs\Python\Python38\Include -D_GLIBCXX_USE_CXX11_ABI=0 -DCUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -DCUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr -gencode=arch=compute_75,code=sm_75 -c I:\GANLatentDiscovery-master\models\StyleGAN2\op\fused_bias_act_kernel.cu -o fused_bias_act_kernel.cuda.o C:/Users/dummy/AppData/Local/Programs/Python/Python38/lib/site-packages/torch/include\c10/util/ThreadLocalDebugInfo.h(12): warning: modifier is ignored on an enum specifier
C:/Users/dummy/AppData/Local/Programs/Python/Python38/lib/site-packages/torch/include\ATen/core/boxing/impl/boxing.h(100): warning: integer conversion resulted in a change of sign
C:/Users/dummy/AppData/Local/Programs/Python/Python38/lib/site-packages/torch/include\ATen/record_function.h(13): warning: modifier is ignored on an enum specifier
C:/Users/dummy/AppData/Local/Programs/Python/Python38/lib/site-packages/torch/include\ATen/core/op_registration/op_whitelist.h(39): warning: integer conversion resulted in a change of sign
C:/Users/dummy/AppData/Local/Programs/Python/Python38/lib/site-packages/torch/include\ATen/core/builtin_function.h(97): warning: statement is unreachable
C:/Users/dummy/AppData/Local/Programs/Python/Python38/lib/site-packages/torch/include\torch/csrc/jit/ir/ir.h(1347): error: member "torch::jit::ProfileOptionalOp::Kind" may not be initialized
1 error detected in the compilation of "C:/Users/dummy/AppData/Local/Temp/tmpxft_00000a20_00000000-10_fused_bias_act_kernel.cpp1.ii". fused_bias_act_kernel.cu ninja: build stopped: subcommand failed.
Traceback (most recent call last): File "run_train.py", line 106, in
main()
File "run_train.py", line 64, in main
G = load_generator(args.dict, weights_path)
File "I:\GANLatentDiscovery-master\loading.py", line 19, in load_generator
G = make_style_gan2(args['gan_resolution'], G_weights, args['w_shift'])
File "I:\GANLatentDiscovery-master\models\gan_load.py", line 109, in make_style_gan2
G = StyleGAN2Generator(size, 512, 8)
NameError: name 'StyleGAN2Generator' is not defined`
Can you help me ?