apex.amp is deprecated and you should use the native mixed-precision utility via torch.cuda.amp as described here 12.
With that being said, yes, it’s possible to activate autocast only for the inference. The docs 5 give you some examples and in particular you can skip the training utils (e.g. the GradScaler).