-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'utf-8' codec can't decode byte 0xd5 in position 1142: invalid continuation byte #638
Comments
help,please!help! |
Hi, I faced the same issue. This is because on windows there is no C++ compiler. To solve this you need:
Hope it will help. |
Hi,i'm really thank you for your help.But there is some trouble new ,please! Traceback (most recent call last): During handling of the above exception, another exception occurred: Traceback (most recent call last): |
Okay this seems to be the same error or really close one. Let's go step by step:
** Visual Studio 2022 Developer Command Prompt v17.3.3
|
Yeah thats good. So step 3: should be ok too but run |
May be this could help: |
I'm installing c++ clang tools. I'm a Chinese,so I don't know how to express my total appreciation to you!!!Really thanks! |
The second step was launching the Visual Dev Command Prompt. The idea is to go fetch all the tools install with Visual Studio, including clang. Clang is the Windows C++ compiler. The ninja fails is likely due to a compilation fails since by default there is no C++ compiler on windows. But the encoding can also be an issue, but I'm a bit further since I never met this kind of issue. |
Hello Neilstid!Lucky to meet you and have your instructions!But I still can't work it.I think I succeed to install clang(maybe,I'm not sure about it).I don't know how to thank you but I really need you to help me manage the trouble! This is my current error: Setting up PyTorch plugin "bias_act_plugin"... C:\Users\29125\anaconda3\envs\ganstyle\lib\site-packages\torch\utils\cpp_extension.py:305: UserWarning: Error checking compiler version for File "C:\Users\29125\anaconda3\envs\ganstyle\lib\site-packages\torch\utils\cpp_extension.py", line 1681, in _run_ninja_build |
Okay windows did not found path to clang :/. So normally, for now,, if you run |
I don't know whether I finished this requirement: The code relies heavily on custom PyTorch extensions that are compiled on the fly using NVCC. On Windows, the compilation requires Microsoft Visual Studio. We recommend installing Visual Studio Community Edition and adding it into using .PATH"C:\Program Files (x86)\Microsoft Visual Studio<VERSION>\Community\VC\Auxiliary\Build\vcvars64.bat" Does it mean add "D:\VS2022\VS\VC\Auxiliary\Build\vcvars64.bat" into environoment variable “Path”? |
Yes you need to add it too to PATH |
I will try right now! Wait for my good news! |
I really hope it will :D |
I'm sorry I've must missing a thing. Running Stylegan from this dev cmd prompt should have worked or at least not having compilation issue since you have clang :/ |
Sorry I don't understand what you said; |
Yes and thats what I don't understand: |
Is there any people can help me,ungerntly |
Is it the same error, or has it at least change ? |
Describe the bug
Setting up PyTorch plugin "bias_act_plugin"... C:\Users\29125\anaconda3\envs\stylegan3\lib\site-packages\torch\utils\cpp_extension.py:305: UserWarning: Error checking compiler version for
cl: Command 'cl' returned non-zero exit status 3221225781.
warnings.warn(f'Error checking compiler version for {compiler}: {error}')
Failed!
Traceback (most recent call last):
File "C:\Users\29125\anaconda3\envs\stylegan3\lib\site-packages\torch\utils\cpp_extension.py", line 1666, in _run_ninja_build
subprocess.run(
File "C:\Users\29125\anaconda3\envs\stylegan3\lib\subprocess.py", line 528, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\29125\PYcharm\keyanmodule\stylegan3\stylegan3-main\train.py", line 287, in
main() # pylint: disable=no-value-for-parameter
File "C:\Users\29125\anaconda3\envs\stylegan3\lib\site-packages\click\core.py", line 1157, in call
return self.main(*args, **kwargs)
File "C:\Users\29125\anaconda3\envs\stylegan3\lib\site-packages\click\core.py", line 1078, in main
rv = self.invoke(ctx)
File "C:\Users\29125\anaconda3\envs\stylegan3\lib\site-packages\click\core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "C:\Users\29125\anaconda3\envs\stylegan3\lib\site-packages\click\core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "D:\29125\PYcharm\keyanmodule\stylegan3\stylegan3-main\train.py", line 282, in main
launch_training(c=c, desc=desc, outdir=opts.outdir, dry_run=opts.dry_run)
File "D:\29125\PYcharm\keyanmodule\stylegan3\stylegan3-main\train.py", line 97, in launch_training
subprocess_fn(rank=0, c=c, temp_dir=temp_dir)
File "D:\29125\PYcharm\keyanmodule\stylegan3\stylegan3-main\train.py", line 48, in subprocess_fn
training_loop.training_loop(rank=rank, **c)
File "D:\29125\PYcharm\keyanmodule\stylegan3\stylegan3-main\training\training_loop.py", line 168, in training_loop
img = misc.print_module_summary(G, [z, c])
File "D:\29125\PYcharm\keyanmodule\stylegan3\stylegan3-main\torch_utils\misc.py", line 216, in print_module_summary
outputs = module(*inputs)
File "C:\Users\29125\anaconda3\envs\stylegan3\lib\site-packages\torch\nn\modules\module.py", line 1071, in _call_impl
result = forward_call(*input, **kwargs)
File "D:\29125\PYcharm\keyanmodule\stylegan3\stylegan3-main\training\networks_stylegan3.py", line 511, in forward
ws = self.mapping(z, c, truncation_psi=truncation_psi, truncation_cutoff=truncation_cutoff, update_emas=update_emas)
File "C:\Users\29125\anaconda3\envs\stylegan3\lib\site-packages\torch\nn\modules\module.py", line 1071, in _call_impl
result = forward_call(*input, **kwargs)
File "D:\29125\PYcharm\keyanmodule\stylegan3\stylegan3-main\training\networks_stylegan3.py", line 151, in forward
x = getattr(self, f'fc{idx}')(x)
File "C:\Users\29125\anaconda3\envs\stylegan3\lib\site-packages\torch\nn\modules\module.py", line 1071, in _call_impl
result = forward_call(*input, **kwargs)
File "D:\29125\PYcharm\keyanmodule\stylegan3\stylegan3-main\training\networks_stylegan3.py", line 100, in forward
x = bias_act.bias_act(x, b, act=self.activation)
File "D:\29125\PYcharm\keyanmodule\stylegan3\stylegan3-main\torch_utils\ops\bias_act.py", line 84, in bias_act
if impl == 'cuda' and x.device.type == 'cuda' and _init():
File "D:\29125\PYcharm\keyanmodule\stylegan3\stylegan3-main\torch_utils\ops\bias_act.py", line 41, in _init
_plugin = custom_ops.get_plugin(
File "D:\29125\PYcharm\keyanmodule\stylegan3\stylegan3-main\torch_utils\custom_ops.py", line 136, in get_plugin
torch.utils.cpp_extension.load(name=module_name, build_directory=cached_build_dir,
File "C:\Users\29125\anaconda3\envs\stylegan3\lib\site-packages\torch\utils\cpp_extension.py", line 1080, in load
return _jit_compile(
File "C:\Users\29125\anaconda3\envs\stylegan3\lib\site-packages\torch\utils\cpp_extension.py", line 1293, in _jit_compile
_write_ninja_file_and_build_library(
File "C:\Users\29125\anaconda3\envs\stylegan3\lib\site-packages\torch\utils\cpp_extension.py", line 1405, in _write_ninja_file_and_build_library
_run_ninja_build(
File "C:\Users\29125\anaconda3\envs\stylegan3\lib\site-packages\torch\utils\cpp_extension.py", line 1681, in _run_ninja_build
message += f": {error.output.decode()}" # type: ignore[union-attr]
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd5 in position 1142: invalid continuation byte
The text was updated successfully, but these errors were encountered: