InterDigitalInc/CompressAI

'utf-8' UnicodeDecodeError: codec can't decode byte oxd6 in position 1: invalid continuation byte When export to ONNX

Opened this issue · 1 comments

Hi, I want to convert the 'ga', 'gs', 'ha', 'hs', 'entropy_bottleneck.compress' and 'gaussian_conditional.compress' from a compressai model into ONNX for export. However, I encountered this problem:
'utf-8' UnicodeDecodeError: codec can't decode byte oxd6 in position 1: invalid continuation byte.
I tried commenting out the ANS encoder, and it seems to work fine, but I need the bitstream output.
How can I fix this problem?

I have reviewed my code again and it appears that the automatic decoding of bytes during the ONNX export is a default behavior, which may cause the problem
I would like to understand how to prevent this from happening.