ToTensor normalizes the tensor, so that all values lie in [0, 1].
If you’ve used it in the PyTorch script, you should definitely add it in your CoreML model.
I’m not familiar with CoreML and don’t know, how easy that is.
If you have trouble implementing it there, you might consider adding your preprocessing to the forward method of your model.