Torch jit load model error,help!

we use pytorch version of 1.7.0+cu101 to turn torchscript,and I successfully loaded the torchscript model in torch version of 1.7.0+cu101 to inference, but when I use pytorch version of 1.8.1+cu101 to inference, there are some error
python3 Traceback (most recent call last): File "", line 35, in <module> main(sys.argv[1], sys.argv[2]) File "", line 17, in main e2e_model = torch.jit.load(script_model) File "/data3/users/suziyi/Miniconda3/lib/python3.8/site-packages/torch/jit/", line 161, in load cpp_module = torch._C.import_ir_module(cu, str(f), map_location, _extra_files) RuntimeError: Class Namespace cannot be used as a value: Serialized File "code/__torch__/torchaudio/sox_effects/", line 5 effects: List[List[str]], channels_first: bool=True) -> Tuple[Tensor, int]: in_signal = __torch__.torch.classes.torchaudio.TensorSignal.__new__(__torch__.torch.classes.torchaudio.TensorSignal) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <--- HERE _0 = (in_signal).__init__(tensor, sample_rate, channels_first, ) out_signal = ops.torchaudio.sox_effects_apply_effects_tensor(in_signal, effects) 'apply_effects_tensor' is being compiled since it was called from 'SynthesizerTrn.forward' Serialized File "code/__torch__/", line 41 sr: Tensor, vol: Tensor) -> Tensor: _0 = __torch__.torchaudio.sox_effects.sox_effects.apply_effects_tensor ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <--- HERE _1 = torch.tensor([(torch.size(x))[-1]], dtype=None, device=None, requires_grad=False) x_lengths =, 4, False, False, None)
we use torchaudio to change audio speed,volume and so on, please help me
when we create torchscript the pytorch version is 1.7.0+cu101 , the torchaudio version is 0.7.0