Hi @dassima and @jerryzh168 - did you manage to get to the bottom of this? I’m seeing exactly the same error. A simple model exports fine without quantization.
Setting a break on the point of failure, I’m seeing the object to be detached is torch.qint8
Then dumping the state_dict for both non-quantized and quantized versions, the quantized version has this as an entry - (‘fc1._packed_params.dtype’, torch.qint8). The non quantized version has only tensors.
Any thoughts as to what’s going on greatly appreciated!
Thanks.